diff --git a/client/errors.go b/client/errors.go index 17c6a60..2c54bde 100644 --- a/client/errors.go +++ b/client/errors.go @@ -21,12 +21,11 @@ package client import ( "bytes" - - "github.com/apache/iotdb-client-go/rpc" + "github.com/apache/iotdb-client-go/common" ) type BatchError struct { - statuses []*rpc.TSStatus + statuses []*common.TSStatus } func (e *BatchError) Error() string { @@ -37,11 +36,11 @@ func (e *BatchError) Error() string { return buff.String() } -func (e *BatchError) GetStatuses() []*rpc.TSStatus { +func (e *BatchError) GetStatuses() []*common.TSStatus { return e.statuses } -func NewBatchError(statuses []*rpc.TSStatus) *BatchError { +func NewBatchError(statuses []*common.TSStatus) *BatchError { return &BatchError{ statuses: statuses, } diff --git a/client/rpcdataset.go b/client/rpcdataset.go index a9a4483..0dd77cd 100644 --- a/client/rpcdataset.go +++ b/client/rpcdataset.go @@ -24,6 +24,7 @@ import ( "encoding/binary" "errors" "fmt" + "github.com/apache/iotdb-client-go/common" "math" "time" @@ -63,7 +64,7 @@ type IoTDBRpcDataSet struct { currentBitmap []byte time []byte values [][]byte - client *rpc.TSIServiceClient + client *rpc.IClientRPCServiceClient emptyResultSet bool ignoreTimeStamp bool closed bool @@ -480,7 +481,7 @@ func (s *IoTDBRpcDataSet) Close() (err error) { QueryId: &s.queryId, } - var status *rpc.TSStatus + var status *common.TSStatus status, err = s.client.CloseOperation(context.Background(), closeRequest) if err == nil { err = VerifySuccess(status) @@ -509,7 +510,7 @@ func (s *IoTDBRpcDataSet) Close() (err error) { func NewIoTDBRpcDataSet(sql string, columnNameList []string, columnTypes []string, columnNameIndex map[string]int32, - queryId int64, client *rpc.TSIServiceClient, sessionId int64, queryDataSet *rpc.TSQueryDataSet, + queryId int64, client *rpc.IClientRPCServiceClient, sessionId int64, queryDataSet *rpc.TSQueryDataSet, ignoreTimeStamp bool, fetchSize int32, timeoutMs *int64) *IoTDBRpcDataSet { ds := &IoTDBRpcDataSet{ diff --git a/client/rpcdataset_test.go b/client/rpcdataset_test.go index 53070f4..4201401 100644 --- a/client/rpcdataset_test.go +++ b/client/rpcdataset_test.go @@ -40,7 +40,7 @@ func createIoTDBRpcDataSet() *IoTDBRpcDataSet { } var queyrId int64 = 1 var sessionId int64 = 1 - var client *rpc.TSIServiceClient = nil + var client *rpc.IClientRPCServiceClient = nil queryDataSet := rpc.TSQueryDataSet{ Time: []byte{0, 0, 1, 118, 76, 52, 0, 236, 0, 0, 1, 118, 76, 52, 25, 228, 0, 0, 1, 118, 76, 52, 41, 42, 0, 0, 1, 118, 76, 52, 243, 148, 0, 0, 1, 118, 76, 95, 98, 255}, ValueList: [][]byte{{0, 0, 0, 13, 84, 101, 115, 116, 32, 68, 101, 118, 105, 99, 101, 32, 49, 0, 0, 0, 13, 84, 101, 115, 116, 32, 68, 101, 118, 105, 99, 101, 32, 49, 0, 0, 0, 13, 84, 101, 115, 116, 32, 68, 101, 118, 105, 99, 101, 32, 49, 0, 0, 0, 13, 84, 101, 115, 116, 32, 68, 101, 118, 105, 99, 101, 32, 49, 0, 0, 0, 13, 84, 101, 115, 116, 32, 68, 101, 118, 105, 99, 101, 32, 49}, {64, 159, 16, 204, 204, 204, 204, 205, 64, 159, 16, 204, 204, 204, 204, 205, 64, 159, 16, 204, 204, 204, 204, 205, 64, 159, 16, 204, 204, 204, 204, 205, 64, 159, 16, 204, 204, 204, 204, 205}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1}, {1, 1, 1, 1, 1}, {65, 65, 153, 154, 65, 65, 153, 154, 65, 65, 153, 154, 65, 65, 153, 154, 65, 65, 153, 154}, {0, 0, 0, 0, 0, 50, 220, 213, 0, 0, 0, 0, 0, 50, 220, 213, 0, 0, 0, 0, 0, 50, 220, 213, 0, 0, 0, 0, 0, 50, 220, 213, 0, 0, 0, 0, 0, 50, 220, 213}}, diff --git a/client/session.go b/client/session.go index 1d1ee4c..cd6da9b 100644 --- a/client/session.go +++ b/client/session.go @@ -26,6 +26,7 @@ import ( "encoding/binary" "errors" "fmt" + "github.com/apache/iotdb-client-go/common" "log" "net" "reflect" @@ -57,7 +58,7 @@ type Config struct { type Session struct { config *Config - client *rpc.TSIServiceClient + client *rpc.IClientRPCServiceClient sessionId int64 trans thrift.TTransport requestStatementId int64 @@ -108,8 +109,8 @@ func (s *Session) Open(enableRPCCompression bool, connectionTimeoutInMs int) err } iprot := protocolFactory.GetProtocol(s.trans) oprot := protocolFactory.GetProtocol(s.trans) - s.client = rpc.NewTSIServiceClient(thrift.NewTStandardClient(iprot, oprot)) - req := rpc.TSOpenSessionReq{ClientProtocol: rpc.TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3, ZoneId: s.config.TimeZone, Username: &s.config.UserName, + s.client = rpc.NewIClientRPCServiceClient(thrift.NewTStandardClient(iprot, oprot)) + req := rpc.TSOpenSessionReq{ClientProtocol: rpc.TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3, ZoneId: s.config.TimeZone, Username: s.config.UserName, Password: &s.config.Password} resp, err := s.client.OpenSession(context.Background(), &req) if err != nil { @@ -131,7 +132,7 @@ type ClusterConfig struct { type ClusterSession struct { config *ClusterConfig - client *rpc.TSIServiceClient + client *rpc.IClientRPCServiceClient sessionId int64 trans thrift.TTransport requestStatementId int64 @@ -159,8 +160,8 @@ func (s *Session) OpenCluster(enableRPCCompression bool) error { } iprot := protocolFactory.GetProtocol(s.trans) oprot := protocolFactory.GetProtocol(s.trans) - s.client = rpc.NewTSIServiceClient(thrift.NewTStandardClient(iprot, oprot)) - req := rpc.TSOpenSessionReq{ClientProtocol: rpc.TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3, ZoneId: s.config.TimeZone, Username: &s.config.UserName, + s.client = rpc.NewIClientRPCServiceClient(thrift.NewTStandardClient(iprot, oprot)) + req := rpc.TSOpenSessionReq{ClientProtocol: rpc.TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3, ZoneId: s.config.TimeZone, Username: s.config.UserName, Password: &s.config.Password} resp, err := s.client.OpenSession(context.Background(), &req) @@ -172,7 +173,7 @@ func (s *Session) OpenCluster(enableRPCCompression bool) error { return err } -func (s *Session) Close() (r *rpc.TSStatus, err error) { +func (s *Session) Close() (r *common.TSStatus, err error) { req := rpc.NewTSCloseSessionReq() req.SessionId = s.sessionId _, err = s.client.CloseSession(context.Background(), req) @@ -189,7 +190,7 @@ func (s *Session) Close() (r *rpc.TSStatus, err error) { *return *error: correctness of operation */ -func (s *Session) SetStorageGroup(storageGroupId string) (r *rpc.TSStatus, err error) { +func (s *Session) SetStorageGroup(storageGroupId string) (r *common.TSStatus, err error) { r, err = s.client.SetStorageGroup(context.Background(), s.sessionId, storageGroupId) if err != nil && r == nil { if s.reconnect() { @@ -206,7 +207,7 @@ func (s *Session) SetStorageGroup(storageGroupId string) (r *rpc.TSStatus, err e *return *error: correctness of operation */ -func (s *Session) DeleteStorageGroup(storageGroupId string) (r *rpc.TSStatus, err error) { +func (s *Session) DeleteStorageGroup(storageGroupId string) (r *common.TSStatus, err error) { r, err = s.client.DeleteStorageGroups(context.Background(), s.sessionId, []string{storageGroupId}) if err != nil && r == nil { if s.reconnect() { @@ -223,7 +224,7 @@ func (s *Session) DeleteStorageGroup(storageGroupId string) (r *rpc.TSStatus, er *return *error: correctness of operation */ -func (s *Session) DeleteStorageGroups(storageGroupIds ...string) (r *rpc.TSStatus, err error) { +func (s *Session) DeleteStorageGroups(storageGroupIds ...string) (r *common.TSStatus, err error) { r, err = s.client.DeleteStorageGroups(context.Background(), s.sessionId, storageGroupIds) if err != nil && r == nil { if s.reconnect() { @@ -243,7 +244,7 @@ func (s *Session) DeleteStorageGroups(storageGroupIds ...string) (r *rpc.TSStatu *return *error: correctness of operation */ -func (s *Session) CreateTimeseries(path string, dataType TSDataType, encoding TSEncoding, compressor TSCompressionType, attributes map[string]string, tags map[string]string) (r *rpc.TSStatus, err error) { +func (s *Session) CreateTimeseries(path string, dataType TSDataType, encoding TSEncoding, compressor TSCompressionType, attributes map[string]string, tags map[string]string) (r *common.TSStatus, err error) { request := rpc.TSCreateTimeseriesReq{SessionId: s.sessionId, Path: path, DataType: int32(dataType), Encoding: int32(encoding), Compressor: int32(compressor), Attributes: attributes, Tags: tags} status, err := s.client.CreateTimeseries(context.Background(), &request) @@ -268,7 +269,7 @@ func (s *Session) CreateTimeseries(path string, dataType TSDataType, encoding TS *return *error: correctness of operation */ -func (s *Session) CreateAlignedTimeseries(prefixPath string, measurements []string, dataTypes []TSDataType, encodings []TSEncoding, compressors []TSCompressionType, measurementAlias []string) (r *rpc.TSStatus, err error) { +func (s *Session) CreateAlignedTimeseries(prefixPath string, measurements []string, dataTypes []TSDataType, encodings []TSEncoding, compressors []TSCompressionType, measurementAlias []string) (r *common.TSStatus, err error) { destTypes := make([]int32, len(dataTypes)) for i, t := range dataTypes { destTypes[i] = int32(t) @@ -313,7 +314,7 @@ func (s *Session) CreateAlignedTimeseries(prefixPath string, measurements []stri *return *error: correctness of operation */ -func (s *Session) CreateMultiTimeseries(paths []string, dataTypes []TSDataType, encodings []TSEncoding, compressors []TSCompressionType) (r *rpc.TSStatus, err error) { +func (s *Session) CreateMultiTimeseries(paths []string, dataTypes []TSDataType, encodings []TSEncoding, compressors []TSCompressionType) (r *common.TSStatus, err error) { destTypes := make([]int32, len(dataTypes)) for i, t := range dataTypes { destTypes[i] = int32(t) @@ -350,7 +351,7 @@ func (s *Session) CreateMultiTimeseries(paths []string, dataTypes []TSDataType, *return *error: correctness of operation */ -func (s *Session) DeleteTimeseries(paths []string) (r *rpc.TSStatus, err error) { +func (s *Session) DeleteTimeseries(paths []string) (r *common.TSStatus, err error) { r, err = s.client.DeleteTimeseries(context.Background(), s.sessionId, paths) if err != nil && r == nil { if s.reconnect() { @@ -369,7 +370,7 @@ func (s *Session) DeleteTimeseries(paths []string) (r *rpc.TSStatus, err error) *return *error: correctness of operation */ -func (s *Session) DeleteData(paths []string, startTime int64, endTime int64) (r *rpc.TSStatus, err error) { +func (s *Session) DeleteData(paths []string, startTime int64, endTime int64) (r *common.TSStatus, err error) { request := rpc.TSDeleteDataReq{SessionId: s.sessionId, Paths: paths, StartTime: startTime, EndTime: endTime} r, err = s.client.DeleteData(context.Background(), &request) if err != nil && r == nil { @@ -391,7 +392,7 @@ func (s *Session) DeleteData(paths []string, startTime int64, endTime int64) (r *return *error: correctness of operation */ -func (s *Session) InsertStringRecord(deviceId string, measurements []string, values []string, timestamp int64) (r *rpc.TSStatus, err error) { +func (s *Session) InsertStringRecord(deviceId string, measurements []string, values []string, timestamp int64) (r *common.TSStatus, err error) { request := rpc.TSInsertStringRecordReq{SessionId: s.sessionId, PrefixPath: deviceId, Measurements: measurements, Values: values, Timestamp: timestamp} r, err = s.client.InsertStringRecord(context.Background(), &request) @@ -412,7 +413,7 @@ func (s *Session) GetTimeZone() (string, error) { return resp.TimeZone, nil } -func (s *Session) SetTimeZone(timeZone string) (r *rpc.TSStatus, err error) { +func (s *Session) SetTimeZone(timeZone string) (r *common.TSStatus, err error) { request := rpc.TSSetTimeZoneReq{SessionId: s.sessionId, TimeZone: timeZone} r, err = s.client.SetTimeZone(context.Background(), &request) s.config.TimeZone = timeZone @@ -439,7 +440,7 @@ func (s *Session) ExecuteStatement(sql string) (*SessionDataSet, error) { return s.genDataSet(sql, resp), err } -func (s *Session) ExecuteNonQueryStatement(sql string) (r *rpc.TSStatus, err error) { +func (s *Session) ExecuteNonQueryStatement(sql string) (r *common.TSStatus, err error) { request := rpc.TSExecuteStatementReq{ SessionId: s.sessionId, Statement: sql, @@ -483,6 +484,59 @@ func (s *Session) ExecuteQueryStatement(sql string, timeoutMs *int64) (*SessionD } } +func (s *Session) ExecuteAggregationQuery(paths []string, aggregations []common.TAggregationType, + startTime *int64, endTime *int64, interval *int64, + timeoutMs *int64) (*SessionDataSet, error) { + + request := rpc.TSAggregationQueryReq{SessionId: s.sessionId, StatementId: s.requestStatementId, Paths: paths, + Aggregations: aggregations, StartTime: startTime, EndTime: endTime, Interval: interval, FetchSize: &s.config.FetchSize, Timeout: timeoutMs} + if resp, err := s.client.ExecuteAggregationQuery(context.Background(), &request); err == nil { + if statusErr := VerifySuccess(resp.Status); statusErr == nil { + return NewSessionDataSet("", resp.Columns, resp.DataTypeList, resp.ColumnNameIndexMap, *resp.QueryId, s.client, s.sessionId, resp.QueryDataSet, resp.IgnoreTimeStamp != nil && *resp.IgnoreTimeStamp, s.config.FetchSize, timeoutMs), err + } else { + return nil, statusErr + } + } else { + if s.reconnect() { + request.SessionId = s.sessionId + resp, err = s.client.ExecuteAggregationQuery(context.Background(), &request) + if statusErr := VerifySuccess(resp.Status); statusErr == nil { + return NewSessionDataSet("", resp.Columns, resp.DataTypeList, resp.ColumnNameIndexMap, *resp.QueryId, s.client, s.sessionId, resp.QueryDataSet, resp.IgnoreTimeStamp != nil && *resp.IgnoreTimeStamp, s.config.FetchSize, timeoutMs), err + } else { + return nil, statusErr + } + } + return nil, err + } +} + +func (s *Session) ExecuteAggregationQueryWithLegalNodes(paths []string, aggregations []common.TAggregationType, + startTime *int64, endTime *int64, interval *int64, + timeoutMs *int64, legalNodes *bool) (*SessionDataSet, error) { + + request := rpc.TSAggregationQueryReq{SessionId: s.sessionId, StatementId: s.requestStatementId, Paths: paths, + Aggregations: aggregations, StartTime: startTime, EndTime: endTime, Interval: interval, FetchSize: &s.config.FetchSize, + Timeout: timeoutMs, LegalPathNodes: legalNodes} + if resp, err := s.client.ExecuteAggregationQuery(context.Background(), &request); err == nil { + if statusErr := VerifySuccess(resp.Status); statusErr == nil { + return NewSessionDataSet("", resp.Columns, resp.DataTypeList, resp.ColumnNameIndexMap, *resp.QueryId, s.client, s.sessionId, resp.QueryDataSet, resp.IgnoreTimeStamp != nil && *resp.IgnoreTimeStamp, s.config.FetchSize, timeoutMs), err + } else { + return nil, statusErr + } + } else { + if s.reconnect() { + request.SessionId = s.sessionId + resp, err = s.client.ExecuteAggregationQuery(context.Background(), &request) + if statusErr := VerifySuccess(resp.Status); statusErr == nil { + return NewSessionDataSet("", resp.Columns, resp.DataTypeList, resp.ColumnNameIndexMap, *resp.QueryId, s.client, s.sessionId, resp.QueryDataSet, resp.IgnoreTimeStamp != nil && *resp.IgnoreTimeStamp, s.config.FetchSize, timeoutMs), err + } else { + return nil, statusErr + } + } + return nil, err + } +} + func (s *Session) genTSInsertRecordReq(deviceId string, time int64, measurements []string, types []TSDataType, @@ -502,7 +556,7 @@ func (s *Session) genTSInsertRecordReq(deviceId string, time int64, return request, nil } -func (s *Session) InsertRecord(deviceId string, measurements []string, dataTypes []TSDataType, values []interface{}, timestamp int64) (r *rpc.TSStatus, err error) { +func (s *Session) InsertRecord(deviceId string, measurements []string, dataTypes []TSDataType, values []interface{}, timestamp int64) (r *common.TSStatus, err error) { request, err := s.genTSInsertRecordReq(deviceId, timestamp, measurements, dataTypes, values, false) if err != nil { return nil, err @@ -519,7 +573,7 @@ func (s *Session) InsertRecord(deviceId string, measurements []string, dataTypes return r, err } -func (s *Session) InsertAlignedRecord(deviceId string, measurements []string, dataTypes []TSDataType, values []interface{}, timestamp int64) (r *rpc.TSStatus, err error) { +func (s *Session) InsertAlignedRecord(deviceId string, measurements []string, dataTypes []TSDataType, values []interface{}, timestamp int64) (r *common.TSStatus, err error) { request, err := s.genTSInsertRecordReq(deviceId, timestamp, measurements, dataTypes, values, true) if err != nil { return nil, err @@ -536,6 +590,54 @@ func (s *Session) InsertAlignedRecord(deviceId string, measurements []string, da return r, err } +func (s *Session) genFastInsertRecordReq(deviceIds []string, + timestamps []int64, + dataTypes [][]TSDataType, + values [][]interface{}) (*rpc.TSFastInsertRecordsReq, error) { + length := len(deviceIds) + if length != len(timestamps) || length != len(values) { + return nil, errLength + } + + request := rpc.TSFastInsertRecordsReq{ + SessionId: s.sessionId, + PrefixPaths: deviceIds, + Timestamps: timestamps, + } + + v := make([][]byte, length) + for i := 0; i < len(timestamps); i++ { + if bys, err := valuesToBytesForFast(dataTypes[i], values[i]); err == nil { + v[i] = bys + } else { + return nil, err + } + } + + request.ValuesList = v + return &request, nil +} + +func (s *Session) FastInsertRecords(deviceIds []string, + dataTypes [][]TSDataType, + values [][]interface{}, + timestamps []int64) (r *common.TSStatus, err error) { + request, err := s.genFastInsertRecordReq(deviceIds, timestamps, dataTypes, values) + if err != nil { + return nil, err + } else { + r, err = s.client.FastInsertRecords(context.Background(), request) + if err != nil && r == nil { + if s.reconnect() { + request.SessionId = s.sessionId + r, err = s.client.FastInsertRecords(context.Background(), request) + } + } + } + + return r, err +} + type deviceData struct { timestamps []int64 measurementsSlice [][]string @@ -563,7 +665,7 @@ func (d *deviceData) Swap(i, j int) { // executeBatch, we pack some insert request in batch and send them to server. If you want improve // your performance, please see insertTablet method // Each row is independent, which could have different deviceId, time, number of measurements -func (s *Session) InsertRecordsOfOneDevice(deviceId string, timestamps []int64, measurementsSlice [][]string, dataTypesSlice [][]TSDataType, valuesSlice [][]interface{}, sorted bool) (r *rpc.TSStatus, err error) { +func (s *Session) InsertRecordsOfOneDevice(deviceId string, timestamps []int64, measurementsSlice [][]string, dataTypesSlice [][]TSDataType, valuesSlice [][]interface{}, sorted bool) (r *common.TSStatus, err error) { length := len(timestamps) if len(measurementsSlice) != length || len(dataTypesSlice) != length || len(valuesSlice) != length { return nil, errors.New("timestamps, measurementsSlice and valuesSlice's size should be equal") @@ -605,7 +707,7 @@ func (s *Session) InsertRecordsOfOneDevice(deviceId string, timestamps []int64, return r, err } -func (s *Session) InsertAlignedRecordsOfOneDevice(deviceId string, timestamps []int64, measurementsSlice [][]string, dataTypesSlice [][]TSDataType, valuesSlice [][]interface{}, sorted bool) (r *rpc.TSStatus, err error) { +func (s *Session) InsertAlignedRecordsOfOneDevice(deviceId string, timestamps []int64, measurementsSlice [][]string, dataTypesSlice [][]TSDataType, valuesSlice [][]interface{}, sorted bool) (r *common.TSStatus, err error) { length := len(timestamps) if len(measurementsSlice) != length || len(dataTypesSlice) != length || len(valuesSlice) != length { return nil, errors.New("timestamps, measurementsSlice and valuesSlice's size should be equal") @@ -661,7 +763,7 @@ func (s *Session) InsertAlignedRecordsOfOneDevice(deviceId string, timestamps [] * */ func (s *Session) InsertRecords(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{}, - timestamps []int64) (r *rpc.TSStatus, err error) { + timestamps []int64) (r *common.TSStatus, err error) { request, err := s.genInsertRecordsReq(deviceIds, measurements, dataTypes, values, timestamps, false) if err != nil { return nil, err @@ -678,7 +780,7 @@ func (s *Session) InsertRecords(deviceIds []string, measurements [][]string, dat } func (s *Session) InsertAlignedRecords(deviceIds []string, measurements [][]string, dataTypes [][]TSDataType, values [][]interface{}, - timestamps []int64) (r *rpc.TSStatus, err error) { + timestamps []int64) (r *common.TSStatus, err error) { request, err := s.genInsertRecordsReq(deviceIds, measurements, dataTypes, values, timestamps, true) if err != nil { return nil, err @@ -699,7 +801,7 @@ func (s *Session) InsertAlignedRecords(deviceIds []string, measurements [][]stri *params *tablets: []*client.Tablet, list of tablets */ -func (s *Session) InsertTablets(tablets []*Tablet, sorted bool) (r *rpc.TSStatus, err error) { +func (s *Session) InsertTablets(tablets []*Tablet, sorted bool) (r *common.TSStatus, err error) { if !sorted { for _, t := range tablets { if err := t.Sort(); err != nil { @@ -721,7 +823,7 @@ func (s *Session) InsertTablets(tablets []*Tablet, sorted bool) (r *rpc.TSStatus return r, err } -func (s *Session) InsertAlignedTablets(tablets []*Tablet, sorted bool) (r *rpc.TSStatus, err error) { +func (s *Session) InsertAlignedTablets(tablets []*Tablet, sorted bool) (r *common.TSStatus, err error) { if !sorted { for _, t := range tablets { if err := t.Sort(); err != nil { @@ -743,7 +845,7 @@ func (s *Session) InsertAlignedTablets(tablets []*Tablet, sorted bool) (r *rpc.T return r, err } -func (s *Session) ExecuteBatchStatement(inserts []string) (r *rpc.TSStatus, err error) { +func (s *Session) ExecuteBatchStatement(inserts []string) (r *common.TSStatus, err error) { request := rpc.TSExecuteBatchStatementReq{ SessionId: s.sessionId, Statements: inserts, @@ -801,7 +903,14 @@ func (s *Session) ExecuteUpdateStatement(sql string) (*SessionDataSet, error) { } func (s *Session) genDataSet(sql string, resp *rpc.TSExecuteStatementResp) *SessionDataSet { - return NewSessionDataSet(sql, resp.Columns, resp.DataTypeList, resp.ColumnNameIndexMap, *resp.QueryId, s.client, s.sessionId, resp.QueryDataSet, resp.IgnoreTimeStamp != nil && *resp.IgnoreTimeStamp, s.config.FetchSize, nil) + var queryId int64 + if resp.QueryId == nil { + queryId = 0 + } else { + queryId = *resp.QueryId + } + return NewSessionDataSet(sql, resp.Columns, resp.DataTypeList, resp.ColumnNameIndexMap, + queryId, s.client, s.sessionId, resp.QueryDataSet, resp.IgnoreTimeStamp != nil && *resp.IgnoreTimeStamp, s.config.FetchSize, nil) } func (s *Session) genInsertTabletsReq(tablets []*Tablet, isAligned bool) (*rpc.TSInsertTabletsReq, error) { @@ -927,7 +1036,67 @@ func valuesToBytes(dataTypes []TSDataType, values []interface{}) ([]byte, error) return buff.Bytes(), nil } -func (s *Session) InsertTablet(tablet *Tablet, sorted bool) (r *rpc.TSStatus, err error) { +func valuesToBytesForFast(dataTypes []TSDataType, values []interface{}) ([]byte, error) { + buff := &bytes.Buffer{} + for i, t := range dataTypes { + v := values[i] + if v == nil { + return nil, fmt.Errorf("values[%d] can't be nil", i) + } + + switch t { + case BOOLEAN: + switch v.(type) { + case bool: + binary.Write(buff, binary.BigEndian, v) + default: + return nil, fmt.Errorf("values[%d] %v(%v) must be bool", i, v, reflect.TypeOf(v)) + } + case INT32: + switch v.(type) { + case int32: + binary.Write(buff, binary.BigEndian, v) + default: + return nil, fmt.Errorf("values[%d] %v(%v) must be int32", i, v, reflect.TypeOf(v)) + } + case INT64: + switch v.(type) { + case int64: + binary.Write(buff, binary.BigEndian, v) + default: + return nil, fmt.Errorf("values[%d] %v(%v) must be int64", i, v, reflect.TypeOf(v)) + } + case FLOAT: + switch v.(type) { + case float32: + binary.Write(buff, binary.BigEndian, v) + default: + return nil, fmt.Errorf("values[%d] %v(%v) must be float32", i, v, reflect.TypeOf(v)) + } + case DOUBLE: + switch v.(type) { + case float64: + binary.Write(buff, binary.BigEndian, v) + default: + return nil, fmt.Errorf("values[%d] %v(%v) must be float64", i, v, reflect.TypeOf(v)) + } + case TEXT: + switch s := v.(type) { + case string: + size := len(s) + binary.Write(buff, binary.BigEndian, int32(size)) + binary.Write(buff, binary.BigEndian, []byte(s)) + default: + return nil, fmt.Errorf("values[%d] %v(%v) must be string", i, v, reflect.TypeOf(v)) + } + default: + return nil, fmt.Errorf("types[%d] is incorrect, it must in (BOOLEAN, INT32, INT64, FLOAT, DOUBLE, TEXT)", i) + } + } + return buff.Bytes(), nil +} + +func (s *Session) InsertTablet(tablet *Tablet, sorted bool) (r *common.TSStatus, err error) { if !sorted { if err := tablet.Sort(); err != nil { return nil, err @@ -950,7 +1119,7 @@ func (s *Session) InsertTablet(tablet *Tablet, sorted bool) (r *rpc.TSStatus, er return r, err } -func (s *Session) InsertAlignedTablet(tablet *Tablet, sorted bool) (r *rpc.TSStatus, err error) { +func (s *Session) InsertAlignedTablet(tablet *Tablet, sorted bool) (r *common.TSStatus, err error) { if !sorted { if err := tablet.Sort(); err != nil { return nil, err @@ -1072,8 +1241,8 @@ func (s *Session) initClusterConn(node endPoint) error { protocolFactory = thrift.NewTBinaryProtocolFactoryDefault() iprot := protocolFactory.GetProtocol(s.trans) oprot := protocolFactory.GetProtocol(s.trans) - s.client = rpc.NewTSIServiceClient(thrift.NewTStandardClient(iprot, oprot)) - req := rpc.TSOpenSessionReq{ClientProtocol: rpc.TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3, ZoneId: s.config.TimeZone, Username: &s.config.UserName, + s.client = rpc.NewIClientRPCServiceClient(thrift.NewTStandardClient(iprot, oprot)) + req := rpc.TSOpenSessionReq{ClientProtocol: rpc.TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V3, ZoneId: s.config.TimeZone, Username: s.config.UserName, Password: &s.config.Password} resp, err := s.client.OpenSession(context.Background(), &req) diff --git a/client/sessiondataset.go b/client/sessiondataset.go index dc4ed37..2bce854 100644 --- a/client/sessiondataset.go +++ b/client/sessiondataset.go @@ -112,7 +112,7 @@ func (s *SessionDataSet) Close() error { func NewSessionDataSet(sql string, columnNameList []string, columnTypeList []string, columnNameIndex map[string]int32, - queryId int64, client *rpc.TSIServiceClient, sessionId int64, queryDataSet *rpc.TSQueryDataSet, + queryId int64, client *rpc.IClientRPCServiceClient, sessionId int64, queryDataSet *rpc.TSQueryDataSet, ignoreTimeStamp bool, fetchSize int32, timeoutMs *int64) *SessionDataSet { return &SessionDataSet{ diff --git a/client/tablet.go b/client/tablet.go index 02528e9..ff4ef57 100644 --- a/client/tablet.go +++ b/client/tablet.go @@ -194,6 +194,7 @@ func (t *Tablet) GetValueAt(columnIndex, rowIndex int) (interface{}, error) { return nil, fmt.Errorf("illegal argument columnIndex %d", columnIndex) } + if rowIndex < 0 || rowIndex > t.maxRowNumber { return nil, fmt.Errorf("illegal argument rowIndex %d", rowIndex) } diff --git a/client/utils.go b/client/utils.go index 15354e1..f3c465b 100644 --- a/client/utils.go +++ b/client/utils.go @@ -23,9 +23,8 @@ import ( "bytes" "encoding/binary" "fmt" + "github.com/apache/iotdb-client-go/common" "strconv" - - "github.com/apache/iotdb-client-go/rpc" ) func int32ToString(n int32) string { @@ -70,7 +69,7 @@ func bytesToInt64(bys []byte) int64 { return int64(data) } -func verifySuccesses(statuses []*rpc.TSStatus) error { +func verifySuccesses(statuses []*common.TSStatus) error { buff := bytes.Buffer{} for _, status := range statuses { if status.Code != SuccessStatus && status.Code != RedirectionRecommend { @@ -84,7 +83,7 @@ func verifySuccesses(statuses []*rpc.TSStatus) error { return nil } -func VerifySuccess(status *rpc.TSStatus) error { +func VerifySuccess(status *common.TSStatus) error { if status.Code == RedirectionRecommend { return nil } diff --git a/client/utils_test.go b/client/utils_test.go index 1714282..f59a34b 100644 --- a/client/utils_test.go +++ b/client/utils_test.go @@ -20,9 +20,8 @@ package client import ( + "github.com/apache/iotdb-client-go/common" "testing" - - "github.com/apache/iotdb-client-go/rpc" ) func Test_bytesToInt32(t *testing.T) { @@ -183,7 +182,7 @@ func Test_float64ToString(t *testing.T) { func Test_verifySuccess(t *testing.T) { type args struct { - status *rpc.TSStatus + status *common.TSStatus } var errMsg string = "error occurred" tests := []struct { @@ -194,30 +193,30 @@ func Test_verifySuccess(t *testing.T) { { name: "RedirectionRecommend", args: args{ - status: &rpc.TSStatus{ + status: &common.TSStatus{ Code: RedirectionRecommend, Message: &errMsg, - SubStatus: []*rpc.TSStatus{}, + SubStatus: []*common.TSStatus{}, }, }, wantErr: false, }, { name: "SuccessStatus", args: args{ - status: &rpc.TSStatus{ + status: &common.TSStatus{ Code: SuccessStatus, Message: &errMsg, - SubStatus: []*rpc.TSStatus{}, + SubStatus: []*common.TSStatus{}, }, }, wantErr: false, }, { name: "MultipleError", args: args{ - status: &rpc.TSStatus{ + status: &common.TSStatus{ Code: MultipleError, Message: &errMsg, - SubStatus: []*rpc.TSStatus{ + SubStatus: []*common.TSStatus{ { Code: ShutDownError, Message: &errMsg, @@ -229,10 +228,10 @@ func Test_verifySuccess(t *testing.T) { }, { name: "CloseOperationError", args: args{ - status: &rpc.TSStatus{ + status: &common.TSStatus{ Code: CloseOperationError, Message: &errMsg, - SubStatus: []*rpc.TSStatus{}, + SubStatus: []*common.TSStatus{}, }, }, wantErr: true, @@ -249,7 +248,7 @@ func Test_verifySuccess(t *testing.T) { func Test_verifySuccesses(t *testing.T) { type args struct { - statuses []*rpc.TSStatus + statuses []*common.TSStatus } var internalServerError string = "InternalServerError" var success string = "Success" @@ -262,11 +261,11 @@ func Test_verifySuccesses(t *testing.T) { { name: "InternalServerError", args: args{ - statuses: []*rpc.TSStatus{ + statuses: []*common.TSStatus{ { Code: InternalServerError, Message: &internalServerError, - SubStatus: []*rpc.TSStatus{}, + SubStatus: []*common.TSStatus{}, }, }, }, @@ -274,11 +273,11 @@ func Test_verifySuccesses(t *testing.T) { }, { name: "SuccessStatus", args: args{ - statuses: []*rpc.TSStatus{ + statuses: []*common.TSStatus{ { Code: SuccessStatus, Message: &success, - SubStatus: []*rpc.TSStatus{}, + SubStatus: []*common.TSStatus{}, }, }, }, @@ -287,11 +286,11 @@ func Test_verifySuccesses(t *testing.T) { { name: "RedirectionRecommend", args: args{ - statuses: []*rpc.TSStatus{ + statuses: []*common.TSStatus{ { Code: RedirectionRecommend, Message: &redirectionRecommend, - SubStatus: []*rpc.TSStatus{}, + SubStatus: []*common.TSStatus{}, }, }, }, diff --git a/common/GoUnusedProtection__.go b/common/GoUnusedProtection__.go new file mode 100644 index 0000000..6febe34 --- /dev/null +++ b/common/GoUnusedProtection__.go @@ -0,0 +1,6 @@ +// Code generated by Thrift Compiler (0.14.1). DO NOT EDIT. + +package common + +var GoUnusedProtection__ int; + diff --git a/rpc/rpc-consts.go b/common/common-consts.go similarity index 95% rename from rpc/rpc-consts.go rename to common/common-consts.go index 37fc423..229d4a7 100644 --- a/rpc/rpc-consts.go +++ b/common/common-consts.go @@ -1,6 +1,6 @@ // Code generated by Thrift Compiler (0.14.1). DO NOT EDIT. -package rpc +package common import( "bytes" diff --git a/common/common.go b/common/common.go new file mode 100644 index 0000000..80de2d6 --- /dev/null +++ b/common/common.go @@ -0,0 +1,4133 @@ +// Code generated by Thrift Compiler (0.14.1). DO NOT EDIT. + +package common + +import( + "bytes" + "context" + "database/sql/driver" + "errors" + "fmt" + "time" + "github.com/apache/thrift/lib/go/thrift" +) + +// (needed to ensure safety because of naive import list construction.) +var _ = thrift.ZERO +var _ = fmt.Printf +var _ = context.Background +var _ = time.Now +var _ = bytes.Equal + +type TConsensusGroupType int64 +const ( + TConsensusGroupType_ConfigRegion TConsensusGroupType = 0 + TConsensusGroupType_DataRegion TConsensusGroupType = 1 + TConsensusGroupType_SchemaRegion TConsensusGroupType = 2 +) + +func (p TConsensusGroupType) String() string { + switch p { + case TConsensusGroupType_ConfigRegion: return "ConfigRegion" + case TConsensusGroupType_DataRegion: return "DataRegion" + case TConsensusGroupType_SchemaRegion: return "SchemaRegion" + } + return "" +} + +func TConsensusGroupTypeFromString(s string) (TConsensusGroupType, error) { + switch s { + case "ConfigRegion": return TConsensusGroupType_ConfigRegion, nil + case "DataRegion": return TConsensusGroupType_DataRegion, nil + case "SchemaRegion": return TConsensusGroupType_SchemaRegion, nil + } + return TConsensusGroupType(0), fmt.Errorf("not a valid TConsensusGroupType string") +} + + +func TConsensusGroupTypePtr(v TConsensusGroupType) *TConsensusGroupType { return &v } + +func (p TConsensusGroupType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TConsensusGroupType) UnmarshalText(text []byte) error { +q, err := TConsensusGroupTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TConsensusGroupType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TConsensusGroupType(v) +return nil +} + +func (p * TConsensusGroupType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +type TRegionMigrateFailedType int64 +const ( + TRegionMigrateFailedType_AddPeerFailed TRegionMigrateFailedType = 0 + TRegionMigrateFailedType_RemovePeerFailed TRegionMigrateFailedType = 1 + TRegionMigrateFailedType_RemoveConsensusGroupFailed TRegionMigrateFailedType = 2 + TRegionMigrateFailedType_DeleteRegionFailed TRegionMigrateFailedType = 3 + TRegionMigrateFailedType_CreateRegionFailed TRegionMigrateFailedType = 4 +) + +func (p TRegionMigrateFailedType) String() string { + switch p { + case TRegionMigrateFailedType_AddPeerFailed: return "AddPeerFailed" + case TRegionMigrateFailedType_RemovePeerFailed: return "RemovePeerFailed" + case TRegionMigrateFailedType_RemoveConsensusGroupFailed: return "RemoveConsensusGroupFailed" + case TRegionMigrateFailedType_DeleteRegionFailed: return "DeleteRegionFailed" + case TRegionMigrateFailedType_CreateRegionFailed: return "CreateRegionFailed" + } + return "" +} + +func TRegionMigrateFailedTypeFromString(s string) (TRegionMigrateFailedType, error) { + switch s { + case "AddPeerFailed": return TRegionMigrateFailedType_AddPeerFailed, nil + case "RemovePeerFailed": return TRegionMigrateFailedType_RemovePeerFailed, nil + case "RemoveConsensusGroupFailed": return TRegionMigrateFailedType_RemoveConsensusGroupFailed, nil + case "DeleteRegionFailed": return TRegionMigrateFailedType_DeleteRegionFailed, nil + case "CreateRegionFailed": return TRegionMigrateFailedType_CreateRegionFailed, nil + } + return TRegionMigrateFailedType(0), fmt.Errorf("not a valid TRegionMigrateFailedType string") +} + + +func TRegionMigrateFailedTypePtr(v TRegionMigrateFailedType) *TRegionMigrateFailedType { return &v } + +func (p TRegionMigrateFailedType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TRegionMigrateFailedType) UnmarshalText(text []byte) error { +q, err := TRegionMigrateFailedTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TRegionMigrateFailedType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TRegionMigrateFailedType(v) +return nil +} + +func (p * TRegionMigrateFailedType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +type ThrottleType int64 +const ( + ThrottleType_REQUEST_NUMBER ThrottleType = 0 + ThrottleType_REQUEST_SIZE ThrottleType = 1 + ThrottleType_WRITE_NUMBER ThrottleType = 2 + ThrottleType_WRITE_SIZE ThrottleType = 3 + ThrottleType_READ_NUMBER ThrottleType = 4 + ThrottleType_READ_SIZE ThrottleType = 5 +) + +func (p ThrottleType) String() string { + switch p { + case ThrottleType_REQUEST_NUMBER: return "REQUEST_NUMBER" + case ThrottleType_REQUEST_SIZE: return "REQUEST_SIZE" + case ThrottleType_WRITE_NUMBER: return "WRITE_NUMBER" + case ThrottleType_WRITE_SIZE: return "WRITE_SIZE" + case ThrottleType_READ_NUMBER: return "READ_NUMBER" + case ThrottleType_READ_SIZE: return "READ_SIZE" + } + return "" +} + +func ThrottleTypeFromString(s string) (ThrottleType, error) { + switch s { + case "REQUEST_NUMBER": return ThrottleType_REQUEST_NUMBER, nil + case "REQUEST_SIZE": return ThrottleType_REQUEST_SIZE, nil + case "WRITE_NUMBER": return ThrottleType_WRITE_NUMBER, nil + case "WRITE_SIZE": return ThrottleType_WRITE_SIZE, nil + case "READ_NUMBER": return ThrottleType_READ_NUMBER, nil + case "READ_SIZE": return ThrottleType_READ_SIZE, nil + } + return ThrottleType(0), fmt.Errorf("not a valid ThrottleType string") +} + + +func ThrottleTypePtr(v ThrottleType) *ThrottleType { return &v } + +func (p ThrottleType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *ThrottleType) UnmarshalText(text []byte) error { +q, err := ThrottleTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *ThrottleType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = ThrottleType(v) +return nil +} + +func (p * ThrottleType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +type TAggregationType int64 +const ( + TAggregationType_COUNT TAggregationType = 0 + TAggregationType_AVG TAggregationType = 1 + TAggregationType_SUM TAggregationType = 2 + TAggregationType_FIRST_VALUE TAggregationType = 3 + TAggregationType_LAST_VALUE TAggregationType = 4 + TAggregationType_MAX_TIME TAggregationType = 5 + TAggregationType_MIN_TIME TAggregationType = 6 + TAggregationType_MAX_VALUE TAggregationType = 7 + TAggregationType_MIN_VALUE TAggregationType = 8 + TAggregationType_EXTREME TAggregationType = 9 + TAggregationType_COUNT_IF TAggregationType = 10 + TAggregationType_TIME_DURATION TAggregationType = 11 + TAggregationType_MODE TAggregationType = 12 +) + +func (p TAggregationType) String() string { + switch p { + case TAggregationType_COUNT: return "COUNT" + case TAggregationType_AVG: return "AVG" + case TAggregationType_SUM: return "SUM" + case TAggregationType_FIRST_VALUE: return "FIRST_VALUE" + case TAggregationType_LAST_VALUE: return "LAST_VALUE" + case TAggregationType_MAX_TIME: return "MAX_TIME" + case TAggregationType_MIN_TIME: return "MIN_TIME" + case TAggregationType_MAX_VALUE: return "MAX_VALUE" + case TAggregationType_MIN_VALUE: return "MIN_VALUE" + case TAggregationType_EXTREME: return "EXTREME" + case TAggregationType_COUNT_IF: return "COUNT_IF" + case TAggregationType_TIME_DURATION: return "TIME_DURATION" + case TAggregationType_MODE: return "MODE" + } + return "" +} + +func TAggregationTypeFromString(s string) (TAggregationType, error) { + switch s { + case "COUNT": return TAggregationType_COUNT, nil + case "AVG": return TAggregationType_AVG, nil + case "SUM": return TAggregationType_SUM, nil + case "FIRST_VALUE": return TAggregationType_FIRST_VALUE, nil + case "LAST_VALUE": return TAggregationType_LAST_VALUE, nil + case "MAX_TIME": return TAggregationType_MAX_TIME, nil + case "MIN_TIME": return TAggregationType_MIN_TIME, nil + case "MAX_VALUE": return TAggregationType_MAX_VALUE, nil + case "MIN_VALUE": return TAggregationType_MIN_VALUE, nil + case "EXTREME": return TAggregationType_EXTREME, nil + case "COUNT_IF": return TAggregationType_COUNT_IF, nil + case "TIME_DURATION": return TAggregationType_TIME_DURATION, nil + case "MODE": return TAggregationType_MODE, nil + } + return TAggregationType(0), fmt.Errorf("not a valid TAggregationType string") +} + + +func TAggregationTypePtr(v TAggregationType) *TAggregationType { return &v } + +func (p TAggregationType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TAggregationType) UnmarshalText(text []byte) error { +q, err := TAggregationTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TAggregationType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TAggregationType(v) +return nil +} + +func (p * TAggregationType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +type TrainingState int64 +const ( + TrainingState_PENDING TrainingState = 0 + TrainingState_RUNNING TrainingState = 1 + TrainingState_FINISHED TrainingState = 2 + TrainingState_FAILED TrainingState = 3 + TrainingState_DROPPING TrainingState = 4 +) + +func (p TrainingState) String() string { + switch p { + case TrainingState_PENDING: return "PENDING" + case TrainingState_RUNNING: return "RUNNING" + case TrainingState_FINISHED: return "FINISHED" + case TrainingState_FAILED: return "FAILED" + case TrainingState_DROPPING: return "DROPPING" + } + return "" +} + +func TrainingStateFromString(s string) (TrainingState, error) { + switch s { + case "PENDING": return TrainingState_PENDING, nil + case "RUNNING": return TrainingState_RUNNING, nil + case "FINISHED": return TrainingState_FINISHED, nil + case "FAILED": return TrainingState_FAILED, nil + case "DROPPING": return TrainingState_DROPPING, nil + } + return TrainingState(0), fmt.Errorf("not a valid TrainingState string") +} + + +func TrainingStatePtr(v TrainingState) *TrainingState { return &v } + +func (p TrainingState) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TrainingState) UnmarshalText(text []byte) error { +q, err := TrainingStateFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TrainingState) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TrainingState(v) +return nil +} + +func (p * TrainingState) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +type ModelTask int64 +const ( + ModelTask_FORECAST ModelTask = 0 +) + +func (p ModelTask) String() string { + switch p { + case ModelTask_FORECAST: return "FORECAST" + } + return "" +} + +func ModelTaskFromString(s string) (ModelTask, error) { + switch s { + case "FORECAST": return ModelTask_FORECAST, nil + } + return ModelTask(0), fmt.Errorf("not a valid ModelTask string") +} + + +func ModelTaskPtr(v ModelTask) *ModelTask { return &v } + +func (p ModelTask) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *ModelTask) UnmarshalText(text []byte) error { +q, err := ModelTaskFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *ModelTask) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = ModelTask(v) +return nil +} + +func (p * ModelTask) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +// Attributes: +// - IP +// - Port +type TEndPoint struct { + IP string `thrift:"ip,1,required" db:"ip" json:"ip"` + Port int32 `thrift:"port,2,required" db:"port" json:"port"` +} + +func NewTEndPoint() *TEndPoint { + return &TEndPoint{} +} + + +func (p *TEndPoint) GetIP() string { + return p.IP +} + +func (p *TEndPoint) GetPort() int32 { + return p.Port +} +func (p *TEndPoint) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetIP bool = false; + var issetPort bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetIP = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I32 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetPort = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetIP{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IP is not set")); + } + if !issetPort{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Port is not set")); + } + return nil +} + +func (p *TEndPoint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.IP = v +} + return nil +} + +func (p *TEndPoint) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Port = v +} + return nil +} + +func (p *TEndPoint) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TEndPoint"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TEndPoint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "ip", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ip: ", p), err) } + if err := oprot.WriteString(ctx, string(p.IP)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.ip (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ip: ", p), err) } + return err +} + +func (p *TEndPoint) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "port", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:port: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Port)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.port (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:port: ", p), err) } + return err +} + +func (p *TEndPoint) Equals(other *TEndPoint) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.IP != other.IP { return false } + if p.Port != other.Port { return false } + return true +} + +func (p *TEndPoint) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TEndPoint(%+v)", *p) +} + +// Attributes: +// - Code +// - Message +// - SubStatus +// - RedirectNode +type TSStatus struct { + Code int32 `thrift:"code,1,required" db:"code" json:"code"` + Message *string `thrift:"message,2" db:"message" json:"message,omitempty"` + SubStatus []*TSStatus `thrift:"subStatus,3" db:"subStatus" json:"subStatus,omitempty"` + RedirectNode *TEndPoint `thrift:"redirectNode,4" db:"redirectNode" json:"redirectNode,omitempty"` +} + +func NewTSStatus() *TSStatus { + return &TSStatus{} +} + + +func (p *TSStatus) GetCode() int32 { + return p.Code +} +var TSStatus_Message_DEFAULT string +func (p *TSStatus) GetMessage() string { + if !p.IsSetMessage() { + return TSStatus_Message_DEFAULT + } +return *p.Message +} +var TSStatus_SubStatus_DEFAULT []*TSStatus + +func (p *TSStatus) GetSubStatus() []*TSStatus { + return p.SubStatus +} +var TSStatus_RedirectNode_DEFAULT *TEndPoint +func (p *TSStatus) GetRedirectNode() *TEndPoint { + if !p.IsSetRedirectNode() { + return TSStatus_RedirectNode_DEFAULT + } +return p.RedirectNode +} +func (p *TSStatus) IsSetMessage() bool { + return p.Message != nil +} + +func (p *TSStatus) IsSetSubStatus() bool { + return p.SubStatus != nil +} + +func (p *TSStatus) IsSetRedirectNode() bool { + return p.RedirectNode != nil +} + +func (p *TSStatus) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetCode bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetCode = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetCode{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Code is not set")); + } + return nil +} + +func (p *TSStatus) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Code = v +} + return nil +} + +func (p *TSStatus) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Message = &v +} + return nil +} + +func (p *TSStatus) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TSStatus, 0, size) + p.SubStatus = tSlice + for i := 0; i < size; i ++ { + _elem0 := &TSStatus{} + if err := _elem0.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err) + } + p.SubStatus = append(p.SubStatus, _elem0) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSStatus) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + p.RedirectNode = &TEndPoint{} + if err := p.RedirectNode.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.RedirectNode), err) + } + return nil +} + +func (p *TSStatus) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSStatus"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSStatus) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "code", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Code)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.code (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } + return err +} + +func (p *TSStatus) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMessage() { + if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:message: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.message (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:message: ", p), err) } + } + return err +} + +func (p *TSStatus) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSubStatus() { + if err := oprot.WriteFieldBegin(ctx, "subStatus", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:subStatus: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.SubStatus)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.SubStatus { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:subStatus: ", p), err) } + } + return err +} + +func (p *TSStatus) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRedirectNode() { + if err := oprot.WriteFieldBegin(ctx, "redirectNode", thrift.STRUCT, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:redirectNode: ", p), err) } + if err := p.RedirectNode.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.RedirectNode), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:redirectNode: ", p), err) } + } + return err +} + +func (p *TSStatus) Equals(other *TSStatus) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Code != other.Code { return false } + if p.Message != other.Message { + if p.Message == nil || other.Message == nil { + return false + } + if (*p.Message) != (*other.Message) { return false } + } + if len(p.SubStatus) != len(other.SubStatus) { return false } + for i, _tgt := range p.SubStatus { + _src1 := other.SubStatus[i] + if !_tgt.Equals(_src1) { return false } + } + if !p.RedirectNode.Equals(other.RedirectNode) { return false } + return true +} + +func (p *TSStatus) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSStatus(%+v)", *p) +} + +// Attributes: +// - Type +// - ID +type TConsensusGroupId struct { + Type TConsensusGroupType `thrift:"type,1,required" db:"type" json:"type"` + ID int32 `thrift:"id,2,required" db:"id" json:"id"` +} + +func NewTConsensusGroupId() *TConsensusGroupId { + return &TConsensusGroupId{} +} + + +func (p *TConsensusGroupId) GetType() TConsensusGroupType { + return p.Type +} + +func (p *TConsensusGroupId) GetID() int32 { + return p.ID +} +func (p *TConsensusGroupId) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetType bool = false; + var issetID bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetType = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I32 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetID = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")); + } + if !issetID{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ID is not set")); + } + return nil +} + +func (p *TConsensusGroupId) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + temp := TConsensusGroupType(v) + p.Type = temp +} + return nil +} + +func (p *TConsensusGroupId) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.ID = v +} + return nil +} + +func (p *TConsensusGroupId) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TConsensusGroupId"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TConsensusGroupId) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:type: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:type: ", p), err) } + return err +} + +func (p *TConsensusGroupId) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:id: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.id (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:id: ", p), err) } + return err +} + +func (p *TConsensusGroupId) Equals(other *TConsensusGroupId) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Type != other.Type { return false } + if p.ID != other.ID { return false } + return true +} + +func (p *TConsensusGroupId) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TConsensusGroupId(%+v)", *p) +} + +// Attributes: +// - SlotId +type TSeriesPartitionSlot struct { + SlotId int32 `thrift:"slotId,1,required" db:"slotId" json:"slotId"` +} + +func NewTSeriesPartitionSlot() *TSeriesPartitionSlot { + return &TSeriesPartitionSlot{} +} + + +func (p *TSeriesPartitionSlot) GetSlotId() int32 { + return p.SlotId +} +func (p *TSeriesPartitionSlot) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetSlotId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetSlotId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetSlotId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SlotId is not set")); + } + return nil +} + +func (p *TSeriesPartitionSlot) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.SlotId = v +} + return nil +} + +func (p *TSeriesPartitionSlot) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSeriesPartitionSlot"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSeriesPartitionSlot) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "slotId", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:slotId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.SlotId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.slotId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:slotId: ", p), err) } + return err +} + +func (p *TSeriesPartitionSlot) Equals(other *TSeriesPartitionSlot) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.SlotId != other.SlotId { return false } + return true +} + +func (p *TSeriesPartitionSlot) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSeriesPartitionSlot(%+v)", *p) +} + +// Attributes: +// - StartTime +type TTimePartitionSlot struct { + StartTime int64 `thrift:"startTime,1,required" db:"startTime" json:"startTime"` +} + +func NewTTimePartitionSlot() *TTimePartitionSlot { + return &TTimePartitionSlot{} +} + + +func (p *TTimePartitionSlot) GetStartTime() int64 { + return p.StartTime +} +func (p *TTimePartitionSlot) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetStartTime bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetStartTime = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetStartTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set")); + } + return nil +} + +func (p *TTimePartitionSlot) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.StartTime = v +} + return nil +} + +func (p *TTimePartitionSlot) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TTimePartitionSlot"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TTimePartitionSlot) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:startTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startTime (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:startTime: ", p), err) } + return err +} + +func (p *TTimePartitionSlot) Equals(other *TTimePartitionSlot) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.StartTime != other.StartTime { return false } + return true +} + +func (p *TTimePartitionSlot) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TTimePartitionSlot(%+v)", *p) +} + +// Attributes: +// - RegionId +// - DataNodeLocations +type TRegionReplicaSet struct { + RegionId *TConsensusGroupId `thrift:"regionId,1,required" db:"regionId" json:"regionId"` + DataNodeLocations []*TDataNodeLocation `thrift:"dataNodeLocations,2,required" db:"dataNodeLocations" json:"dataNodeLocations"` +} + +func NewTRegionReplicaSet() *TRegionReplicaSet { + return &TRegionReplicaSet{} +} + +var TRegionReplicaSet_RegionId_DEFAULT *TConsensusGroupId +func (p *TRegionReplicaSet) GetRegionId() *TConsensusGroupId { + if !p.IsSetRegionId() { + return TRegionReplicaSet_RegionId_DEFAULT + } +return p.RegionId +} + +func (p *TRegionReplicaSet) GetDataNodeLocations() []*TDataNodeLocation { + return p.DataNodeLocations +} +func (p *TRegionReplicaSet) IsSetRegionId() bool { + return p.RegionId != nil +} + +func (p *TRegionReplicaSet) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetRegionId bool = false; + var issetDataNodeLocations bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetRegionId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetDataNodeLocations = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetRegionId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field RegionId is not set")); + } + if !issetDataNodeLocations{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataNodeLocations is not set")); + } + return nil +} + +func (p *TRegionReplicaSet) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.RegionId = &TConsensusGroupId{} + if err := p.RegionId.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.RegionId), err) + } + return nil +} + +func (p *TRegionReplicaSet) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TDataNodeLocation, 0, size) + p.DataNodeLocations = tSlice + for i := 0; i < size; i ++ { + _elem2 := &TDataNodeLocation{} + if err := _elem2.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem2), err) + } + p.DataNodeLocations = append(p.DataNodeLocations, _elem2) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TRegionReplicaSet) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TRegionReplicaSet"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TRegionReplicaSet) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "regionId", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:regionId: ", p), err) } + if err := p.RegionId.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.RegionId), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:regionId: ", p), err) } + return err +} + +func (p *TRegionReplicaSet) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "dataNodeLocations", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:dataNodeLocations: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.DataNodeLocations)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.DataNodeLocations { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:dataNodeLocations: ", p), err) } + return err +} + +func (p *TRegionReplicaSet) Equals(other *TRegionReplicaSet) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.RegionId.Equals(other.RegionId) { return false } + if len(p.DataNodeLocations) != len(other.DataNodeLocations) { return false } + for i, _tgt := range p.DataNodeLocations { + _src3 := other.DataNodeLocations[i] + if !_tgt.Equals(_src3) { return false } + } + return true +} + +func (p *TRegionReplicaSet) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TRegionReplicaSet(%+v)", *p) +} + +// Attributes: +// - CpuCoreNum +// - MaxMemory +type TNodeResource struct { + CpuCoreNum int32 `thrift:"cpuCoreNum,1,required" db:"cpuCoreNum" json:"cpuCoreNum"` + MaxMemory int64 `thrift:"maxMemory,2,required" db:"maxMemory" json:"maxMemory"` +} + +func NewTNodeResource() *TNodeResource { + return &TNodeResource{} +} + + +func (p *TNodeResource) GetCpuCoreNum() int32 { + return p.CpuCoreNum +} + +func (p *TNodeResource) GetMaxMemory() int64 { + return p.MaxMemory +} +func (p *TNodeResource) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetCpuCoreNum bool = false; + var issetMaxMemory bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetCpuCoreNum = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetMaxMemory = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetCpuCoreNum{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field CpuCoreNum is not set")); + } + if !issetMaxMemory{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MaxMemory is not set")); + } + return nil +} + +func (p *TNodeResource) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.CpuCoreNum = v +} + return nil +} + +func (p *TNodeResource) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.MaxMemory = v +} + return nil +} + +func (p *TNodeResource) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TNodeResource"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TNodeResource) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "cpuCoreNum", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:cpuCoreNum: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.CpuCoreNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.cpuCoreNum (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:cpuCoreNum: ", p), err) } + return err +} + +func (p *TNodeResource) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "maxMemory", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:maxMemory: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.MaxMemory)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.maxMemory (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:maxMemory: ", p), err) } + return err +} + +func (p *TNodeResource) Equals(other *TNodeResource) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.CpuCoreNum != other.CpuCoreNum { return false } + if p.MaxMemory != other.MaxMemory { return false } + return true +} + +func (p *TNodeResource) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TNodeResource(%+v)", *p) +} + +// Attributes: +// - ConfigNodeId +// - InternalEndPoint +// - ConsensusEndPoint +type TConfigNodeLocation struct { + ConfigNodeId int32 `thrift:"configNodeId,1,required" db:"configNodeId" json:"configNodeId"` + InternalEndPoint *TEndPoint `thrift:"internalEndPoint,2,required" db:"internalEndPoint" json:"internalEndPoint"` + ConsensusEndPoint *TEndPoint `thrift:"consensusEndPoint,3,required" db:"consensusEndPoint" json:"consensusEndPoint"` +} + +func NewTConfigNodeLocation() *TConfigNodeLocation { + return &TConfigNodeLocation{} +} + + +func (p *TConfigNodeLocation) GetConfigNodeId() int32 { + return p.ConfigNodeId +} +var TConfigNodeLocation_InternalEndPoint_DEFAULT *TEndPoint +func (p *TConfigNodeLocation) GetInternalEndPoint() *TEndPoint { + if !p.IsSetInternalEndPoint() { + return TConfigNodeLocation_InternalEndPoint_DEFAULT + } +return p.InternalEndPoint +} +var TConfigNodeLocation_ConsensusEndPoint_DEFAULT *TEndPoint +func (p *TConfigNodeLocation) GetConsensusEndPoint() *TEndPoint { + if !p.IsSetConsensusEndPoint() { + return TConfigNodeLocation_ConsensusEndPoint_DEFAULT + } +return p.ConsensusEndPoint +} +func (p *TConfigNodeLocation) IsSetInternalEndPoint() bool { + return p.InternalEndPoint != nil +} + +func (p *TConfigNodeLocation) IsSetConsensusEndPoint() bool { + return p.ConsensusEndPoint != nil +} + +func (p *TConfigNodeLocation) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetConfigNodeId bool = false; + var issetInternalEndPoint bool = false; + var issetConsensusEndPoint bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetConfigNodeId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetInternalEndPoint = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetConsensusEndPoint = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetConfigNodeId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ConfigNodeId is not set")); + } + if !issetInternalEndPoint{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field InternalEndPoint is not set")); + } + if !issetConsensusEndPoint{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ConsensusEndPoint is not set")); + } + return nil +} + +func (p *TConfigNodeLocation) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ConfigNodeId = v +} + return nil +} + +func (p *TConfigNodeLocation) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.InternalEndPoint = &TEndPoint{} + if err := p.InternalEndPoint.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.InternalEndPoint), err) + } + return nil +} + +func (p *TConfigNodeLocation) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.ConsensusEndPoint = &TEndPoint{} + if err := p.ConsensusEndPoint.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ConsensusEndPoint), err) + } + return nil +} + +func (p *TConfigNodeLocation) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TConfigNodeLocation"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TConfigNodeLocation) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "configNodeId", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:configNodeId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.ConfigNodeId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.configNodeId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:configNodeId: ", p), err) } + return err +} + +func (p *TConfigNodeLocation) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "internalEndPoint", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:internalEndPoint: ", p), err) } + if err := p.InternalEndPoint.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.InternalEndPoint), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:internalEndPoint: ", p), err) } + return err +} + +func (p *TConfigNodeLocation) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "consensusEndPoint", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:consensusEndPoint: ", p), err) } + if err := p.ConsensusEndPoint.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ConsensusEndPoint), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:consensusEndPoint: ", p), err) } + return err +} + +func (p *TConfigNodeLocation) Equals(other *TConfigNodeLocation) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ConfigNodeId != other.ConfigNodeId { return false } + if !p.InternalEndPoint.Equals(other.InternalEndPoint) { return false } + if !p.ConsensusEndPoint.Equals(other.ConsensusEndPoint) { return false } + return true +} + +func (p *TConfigNodeLocation) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TConfigNodeLocation(%+v)", *p) +} + +// Attributes: +// - DataNodeId +// - ClientRpcEndPoint +// - InternalEndPoint +// - MPPDataExchangeEndPoint +// - DataRegionConsensusEndPoint +// - SchemaRegionConsensusEndPoint +type TDataNodeLocation struct { + DataNodeId int32 `thrift:"dataNodeId,1,required" db:"dataNodeId" json:"dataNodeId"` + ClientRpcEndPoint *TEndPoint `thrift:"clientRpcEndPoint,2,required" db:"clientRpcEndPoint" json:"clientRpcEndPoint"` + InternalEndPoint *TEndPoint `thrift:"internalEndPoint,3,required" db:"internalEndPoint" json:"internalEndPoint"` + MPPDataExchangeEndPoint *TEndPoint `thrift:"mPPDataExchangeEndPoint,4,required" db:"mPPDataExchangeEndPoint" json:"mPPDataExchangeEndPoint"` + DataRegionConsensusEndPoint *TEndPoint `thrift:"dataRegionConsensusEndPoint,5,required" db:"dataRegionConsensusEndPoint" json:"dataRegionConsensusEndPoint"` + SchemaRegionConsensusEndPoint *TEndPoint `thrift:"schemaRegionConsensusEndPoint,6,required" db:"schemaRegionConsensusEndPoint" json:"schemaRegionConsensusEndPoint"` +} + +func NewTDataNodeLocation() *TDataNodeLocation { + return &TDataNodeLocation{} +} + + +func (p *TDataNodeLocation) GetDataNodeId() int32 { + return p.DataNodeId +} +var TDataNodeLocation_ClientRpcEndPoint_DEFAULT *TEndPoint +func (p *TDataNodeLocation) GetClientRpcEndPoint() *TEndPoint { + if !p.IsSetClientRpcEndPoint() { + return TDataNodeLocation_ClientRpcEndPoint_DEFAULT + } +return p.ClientRpcEndPoint +} +var TDataNodeLocation_InternalEndPoint_DEFAULT *TEndPoint +func (p *TDataNodeLocation) GetInternalEndPoint() *TEndPoint { + if !p.IsSetInternalEndPoint() { + return TDataNodeLocation_InternalEndPoint_DEFAULT + } +return p.InternalEndPoint +} +var TDataNodeLocation_MPPDataExchangeEndPoint_DEFAULT *TEndPoint +func (p *TDataNodeLocation) GetMPPDataExchangeEndPoint() *TEndPoint { + if !p.IsSetMPPDataExchangeEndPoint() { + return TDataNodeLocation_MPPDataExchangeEndPoint_DEFAULT + } +return p.MPPDataExchangeEndPoint +} +var TDataNodeLocation_DataRegionConsensusEndPoint_DEFAULT *TEndPoint +func (p *TDataNodeLocation) GetDataRegionConsensusEndPoint() *TEndPoint { + if !p.IsSetDataRegionConsensusEndPoint() { + return TDataNodeLocation_DataRegionConsensusEndPoint_DEFAULT + } +return p.DataRegionConsensusEndPoint +} +var TDataNodeLocation_SchemaRegionConsensusEndPoint_DEFAULT *TEndPoint +func (p *TDataNodeLocation) GetSchemaRegionConsensusEndPoint() *TEndPoint { + if !p.IsSetSchemaRegionConsensusEndPoint() { + return TDataNodeLocation_SchemaRegionConsensusEndPoint_DEFAULT + } +return p.SchemaRegionConsensusEndPoint +} +func (p *TDataNodeLocation) IsSetClientRpcEndPoint() bool { + return p.ClientRpcEndPoint != nil +} + +func (p *TDataNodeLocation) IsSetInternalEndPoint() bool { + return p.InternalEndPoint != nil +} + +func (p *TDataNodeLocation) IsSetMPPDataExchangeEndPoint() bool { + return p.MPPDataExchangeEndPoint != nil +} + +func (p *TDataNodeLocation) IsSetDataRegionConsensusEndPoint() bool { + return p.DataRegionConsensusEndPoint != nil +} + +func (p *TDataNodeLocation) IsSetSchemaRegionConsensusEndPoint() bool { + return p.SchemaRegionConsensusEndPoint != nil +} + +func (p *TDataNodeLocation) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetDataNodeId bool = false; + var issetClientRpcEndPoint bool = false; + var issetInternalEndPoint bool = false; + var issetMPPDataExchangeEndPoint bool = false; + var issetDataRegionConsensusEndPoint bool = false; + var issetSchemaRegionConsensusEndPoint bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetDataNodeId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetClientRpcEndPoint = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetInternalEndPoint = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetMPPDataExchangeEndPoint = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + issetDataRegionConsensusEndPoint = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + issetSchemaRegionConsensusEndPoint = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetDataNodeId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataNodeId is not set")); + } + if !issetClientRpcEndPoint{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ClientRpcEndPoint is not set")); + } + if !issetInternalEndPoint{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field InternalEndPoint is not set")); + } + if !issetMPPDataExchangeEndPoint{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MPPDataExchangeEndPoint is not set")); + } + if !issetDataRegionConsensusEndPoint{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataRegionConsensusEndPoint is not set")); + } + if !issetSchemaRegionConsensusEndPoint{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SchemaRegionConsensusEndPoint is not set")); + } + return nil +} + +func (p *TDataNodeLocation) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.DataNodeId = v +} + return nil +} + +func (p *TDataNodeLocation) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.ClientRpcEndPoint = &TEndPoint{} + if err := p.ClientRpcEndPoint.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ClientRpcEndPoint), err) + } + return nil +} + +func (p *TDataNodeLocation) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.InternalEndPoint = &TEndPoint{} + if err := p.InternalEndPoint.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.InternalEndPoint), err) + } + return nil +} + +func (p *TDataNodeLocation) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + p.MPPDataExchangeEndPoint = &TEndPoint{} + if err := p.MPPDataExchangeEndPoint.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MPPDataExchangeEndPoint), err) + } + return nil +} + +func (p *TDataNodeLocation) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + p.DataRegionConsensusEndPoint = &TEndPoint{} + if err := p.DataRegionConsensusEndPoint.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DataRegionConsensusEndPoint), err) + } + return nil +} + +func (p *TDataNodeLocation) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + p.SchemaRegionConsensusEndPoint = &TEndPoint{} + if err := p.SchemaRegionConsensusEndPoint.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.SchemaRegionConsensusEndPoint), err) + } + return nil +} + +func (p *TDataNodeLocation) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TDataNodeLocation"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TDataNodeLocation) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "dataNodeId", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:dataNodeId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.DataNodeId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.dataNodeId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:dataNodeId: ", p), err) } + return err +} + +func (p *TDataNodeLocation) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "clientRpcEndPoint", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clientRpcEndPoint: ", p), err) } + if err := p.ClientRpcEndPoint.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ClientRpcEndPoint), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clientRpcEndPoint: ", p), err) } + return err +} + +func (p *TDataNodeLocation) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "internalEndPoint", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:internalEndPoint: ", p), err) } + if err := p.InternalEndPoint.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.InternalEndPoint), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:internalEndPoint: ", p), err) } + return err +} + +func (p *TDataNodeLocation) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mPPDataExchangeEndPoint", thrift.STRUCT, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:mPPDataExchangeEndPoint: ", p), err) } + if err := p.MPPDataExchangeEndPoint.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MPPDataExchangeEndPoint), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:mPPDataExchangeEndPoint: ", p), err) } + return err +} + +func (p *TDataNodeLocation) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "dataRegionConsensusEndPoint", thrift.STRUCT, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:dataRegionConsensusEndPoint: ", p), err) } + if err := p.DataRegionConsensusEndPoint.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DataRegionConsensusEndPoint), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:dataRegionConsensusEndPoint: ", p), err) } + return err +} + +func (p *TDataNodeLocation) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "schemaRegionConsensusEndPoint", thrift.STRUCT, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:schemaRegionConsensusEndPoint: ", p), err) } + if err := p.SchemaRegionConsensusEndPoint.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.SchemaRegionConsensusEndPoint), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:schemaRegionConsensusEndPoint: ", p), err) } + return err +} + +func (p *TDataNodeLocation) Equals(other *TDataNodeLocation) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.DataNodeId != other.DataNodeId { return false } + if !p.ClientRpcEndPoint.Equals(other.ClientRpcEndPoint) { return false } + if !p.InternalEndPoint.Equals(other.InternalEndPoint) { return false } + if !p.MPPDataExchangeEndPoint.Equals(other.MPPDataExchangeEndPoint) { return false } + if !p.DataRegionConsensusEndPoint.Equals(other.DataRegionConsensusEndPoint) { return false } + if !p.SchemaRegionConsensusEndPoint.Equals(other.SchemaRegionConsensusEndPoint) { return false } + return true +} + +func (p *TDataNodeLocation) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TDataNodeLocation(%+v)", *p) +} + +// Attributes: +// - Location +// - Resource +type TDataNodeConfiguration struct { + Location *TDataNodeLocation `thrift:"location,1,required" db:"location" json:"location"` + Resource *TNodeResource `thrift:"resource,2,required" db:"resource" json:"resource"` +} + +func NewTDataNodeConfiguration() *TDataNodeConfiguration { + return &TDataNodeConfiguration{} +} + +var TDataNodeConfiguration_Location_DEFAULT *TDataNodeLocation +func (p *TDataNodeConfiguration) GetLocation() *TDataNodeLocation { + if !p.IsSetLocation() { + return TDataNodeConfiguration_Location_DEFAULT + } +return p.Location +} +var TDataNodeConfiguration_Resource_DEFAULT *TNodeResource +func (p *TDataNodeConfiguration) GetResource() *TNodeResource { + if !p.IsSetResource() { + return TDataNodeConfiguration_Resource_DEFAULT + } +return p.Resource +} +func (p *TDataNodeConfiguration) IsSetLocation() bool { + return p.Location != nil +} + +func (p *TDataNodeConfiguration) IsSetResource() bool { + return p.Resource != nil +} + +func (p *TDataNodeConfiguration) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetLocation bool = false; + var issetResource bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetLocation = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetResource = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetLocation{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Location is not set")); + } + if !issetResource{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Resource is not set")); + } + return nil +} + +func (p *TDataNodeConfiguration) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Location = &TDataNodeLocation{} + if err := p.Location.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Location), err) + } + return nil +} + +func (p *TDataNodeConfiguration) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Resource = &TNodeResource{} + if err := p.Resource.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Resource), err) + } + return nil +} + +func (p *TDataNodeConfiguration) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TDataNodeConfiguration"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TDataNodeConfiguration) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "location", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:location: ", p), err) } + if err := p.Location.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Location), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:location: ", p), err) } + return err +} + +func (p *TDataNodeConfiguration) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "resource", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:resource: ", p), err) } + if err := p.Resource.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Resource), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:resource: ", p), err) } + return err +} + +func (p *TDataNodeConfiguration) Equals(other *TDataNodeConfiguration) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Location.Equals(other.Location) { return false } + if !p.Resource.Equals(other.Resource) { return false } + return true +} + +func (p *TDataNodeConfiguration) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TDataNodeConfiguration(%+v)", *p) +} + +// Attributes: +// - IsSeq +// - StorageGroups +type TFlushReq struct { + IsSeq *string `thrift:"isSeq,1" db:"isSeq" json:"isSeq,omitempty"` + StorageGroups []string `thrift:"storageGroups,2" db:"storageGroups" json:"storageGroups,omitempty"` +} + +func NewTFlushReq() *TFlushReq { + return &TFlushReq{} +} + +var TFlushReq_IsSeq_DEFAULT string +func (p *TFlushReq) GetIsSeq() string { + if !p.IsSetIsSeq() { + return TFlushReq_IsSeq_DEFAULT + } +return *p.IsSeq +} +var TFlushReq_StorageGroups_DEFAULT []string + +func (p *TFlushReq) GetStorageGroups() []string { + return p.StorageGroups +} +func (p *TFlushReq) IsSetIsSeq() bool { + return p.IsSeq != nil +} + +func (p *TFlushReq) IsSetStorageGroups() bool { + return p.StorageGroups != nil +} + +func (p *TFlushReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TFlushReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.IsSeq = &v +} + return nil +} + +func (p *TFlushReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.StorageGroups = tSlice + for i := 0; i < size; i ++ { +var _elem4 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem4 = v +} + p.StorageGroups = append(p.StorageGroups, _elem4) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TFlushReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TFlushReq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TFlushReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIsSeq() { + if err := oprot.WriteFieldBegin(ctx, "isSeq", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:isSeq: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.IsSeq)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.isSeq (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:isSeq: ", p), err) } + } + return err +} + +func (p *TFlushReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStorageGroups() { + if err := oprot.WriteFieldBegin(ctx, "storageGroups", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:storageGroups: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.StorageGroups)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.StorageGroups { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:storageGroups: ", p), err) } + } + return err +} + +func (p *TFlushReq) Equals(other *TFlushReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.IsSeq != other.IsSeq { + if p.IsSeq == nil || other.IsSeq == nil { + return false + } + if (*p.IsSeq) != (*other.IsSeq) { return false } + } + if len(p.StorageGroups) != len(other.StorageGroups) { return false } + for i, _tgt := range p.StorageGroups { + _src5 := other.StorageGroups[i] + if _tgt != _src5 { return false } + } + return true +} + +func (p *TFlushReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TFlushReq(%+v)", *p) +} + +// Attributes: +// - Paths +type TSettleReq struct { + Paths []string `thrift:"paths,1,required" db:"paths" json:"paths"` +} + +func NewTSettleReq() *TSettleReq { + return &TSettleReq{} +} + + +func (p *TSettleReq) GetPaths() []string { + return p.Paths +} +func (p *TSettleReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetPaths bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.LIST { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetPaths = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetPaths{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")); + } + return nil +} + +func (p *TSettleReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Paths = tSlice + for i := 0; i < size; i ++ { +var _elem6 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem6 = v +} + p.Paths = append(p.Paths, _elem6) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSettleReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSettleReq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSettleReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:paths: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Paths { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:paths: ", p), err) } + return err +} + +func (p *TSettleReq) Equals(other *TSettleReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.Paths) != len(other.Paths) { return false } + for i, _tgt := range p.Paths { + _src7 := other.Paths[i] + if _tgt != _src7 { return false } + } + return true +} + +func (p *TSettleReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSettleReq(%+v)", *p) +} + +// Attributes: +// - NodeName +// - NodeType +type TSchemaNode struct { + NodeName string `thrift:"nodeName,1,required" db:"nodeName" json:"nodeName"` + NodeType int8 `thrift:"nodeType,2,required" db:"nodeType" json:"nodeType"` +} + +func NewTSchemaNode() *TSchemaNode { + return &TSchemaNode{} +} + + +func (p *TSchemaNode) GetNodeName() string { + return p.NodeName +} + +func (p *TSchemaNode) GetNodeType() int8 { + return p.NodeType +} +func (p *TSchemaNode) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetNodeName bool = false; + var issetNodeType bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetNodeName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.BYTE { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetNodeType = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetNodeName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field NodeName is not set")); + } + if !issetNodeType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field NodeType is not set")); + } + return nil +} + +func (p *TSchemaNode) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.NodeName = v +} + return nil +} + +func (p *TSchemaNode) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadByte(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + temp := int8(v) + p.NodeType = temp +} + return nil +} + +func (p *TSchemaNode) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSchemaNode"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSchemaNode) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "nodeName", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:nodeName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.NodeName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.nodeName (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:nodeName: ", p), err) } + return err +} + +func (p *TSchemaNode) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "nodeType", thrift.BYTE, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:nodeType: ", p), err) } + if err := oprot.WriteByte(ctx, int8(p.NodeType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.nodeType (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:nodeType: ", p), err) } + return err +} + +func (p *TSchemaNode) Equals(other *TSchemaNode) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.NodeName != other.NodeName { return false } + if p.NodeType != other.NodeType { return false } + return true +} + +func (p *TSchemaNode) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSchemaNode(%+v)", *p) +} + +// Attributes: +// - StorageGroupPathPattern +// - TTL +type TSetTTLReq struct { + StorageGroupPathPattern []string `thrift:"storageGroupPathPattern,1,required" db:"storageGroupPathPattern" json:"storageGroupPathPattern"` + TTL int64 `thrift:"TTL,2,required" db:"TTL" json:"TTL"` +} + +func NewTSetTTLReq() *TSetTTLReq { + return &TSetTTLReq{} +} + + +func (p *TSetTTLReq) GetStorageGroupPathPattern() []string { + return p.StorageGroupPathPattern +} + +func (p *TSetTTLReq) GetTTL() int64 { + return p.TTL +} +func (p *TSetTTLReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetStorageGroupPathPattern bool = false; + var issetTTL bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.LIST { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetStorageGroupPathPattern = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTTL = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetStorageGroupPathPattern{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StorageGroupPathPattern is not set")); + } + if !issetTTL{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TTL is not set")); + } + return nil +} + +func (p *TSetTTLReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.StorageGroupPathPattern = tSlice + for i := 0; i < size; i ++ { +var _elem8 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem8 = v +} + p.StorageGroupPathPattern = append(p.StorageGroupPathPattern, _elem8) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSetTTLReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.TTL = v +} + return nil +} + +func (p *TSetTTLReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSetTTLReq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSetTTLReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "storageGroupPathPattern", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:storageGroupPathPattern: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.StorageGroupPathPattern)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.StorageGroupPathPattern { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:storageGroupPathPattern: ", p), err) } + return err +} + +func (p *TSetTTLReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "TTL", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:TTL: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.TTL)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.TTL (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:TTL: ", p), err) } + return err +} + +func (p *TSetTTLReq) Equals(other *TSetTTLReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.StorageGroupPathPattern) != len(other.StorageGroupPathPattern) { return false } + for i, _tgt := range p.StorageGroupPathPattern { + _src9 := other.StorageGroupPathPattern[i] + if _tgt != _src9 { return false } + } + if p.TTL != other.TTL { return false } + return true +} + +func (p *TSetTTLReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSetTTLReq(%+v)", *p) +} + +// Attributes: +// - FileName +// - File +type TFile struct { + FileName string `thrift:"fileName,1,required" db:"fileName" json:"fileName"` + File []byte `thrift:"file,2,required" db:"file" json:"file"` +} + +func NewTFile() *TFile { + return &TFile{} +} + + +func (p *TFile) GetFileName() string { + return p.FileName +} + +func (p *TFile) GetFile() []byte { + return p.File +} +func (p *TFile) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetFileName bool = false; + var issetFile bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetFileName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetFile = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetFileName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field FileName is not set")); + } + if !issetFile{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field File is not set")); + } + return nil +} + +func (p *TFile) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.FileName = v +} + return nil +} + +func (p *TFile) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.File = v +} + return nil +} + +func (p *TFile) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TFile"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TFile) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "fileName", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fileName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.FileName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.fileName (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fileName: ", p), err) } + return err +} + +func (p *TFile) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "file", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:file: ", p), err) } + if err := oprot.WriteBinary(ctx, p.File); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.file (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:file: ", p), err) } + return err +} + +func (p *TFile) Equals(other *TFile) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.FileName != other.FileName { return false } + if bytes.Compare(p.File, other.File) != 0 { return false } + return true +} + +func (p *TFile) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TFile(%+v)", *p) +} + +// Attributes: +// - Status +// - Files +type TFilesResp struct { + Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` + Files []*TFile `thrift:"files,2,required" db:"files" json:"files"` +} + +func NewTFilesResp() *TFilesResp { + return &TFilesResp{} +} + +var TFilesResp_Status_DEFAULT *TSStatus +func (p *TFilesResp) GetStatus() *TSStatus { + if !p.IsSetStatus() { + return TFilesResp_Status_DEFAULT + } +return p.Status +} + +func (p *TFilesResp) GetFiles() []*TFile { + return p.Files +} +func (p *TFilesResp) IsSetStatus() bool { + return p.Status != nil +} + +func (p *TFilesResp) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetStatus bool = false; + var issetFiles bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetStatus = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetFiles = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetStatus{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); + } + if !issetFiles{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Files is not set")); + } + return nil +} + +func (p *TFilesResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Status = &TSStatus{} + if err := p.Status.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) + } + return nil +} + +func (p *TFilesResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TFile, 0, size) + p.Files = tSlice + for i := 0; i < size; i ++ { + _elem10 := &TFile{} + if err := _elem10.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem10), err) + } + p.Files = append(p.Files, _elem10) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TFilesResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TFilesResp"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TFilesResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } + if err := p.Status.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } + return err +} + +func (p *TFilesResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "files", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:files: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Files)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Files { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:files: ", p), err) } + return err +} + +func (p *TFilesResp) Equals(other *TFilesResp) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Status.Equals(other.Status) { return false } + if len(p.Files) != len(other.Files) { return false } + for i, _tgt := range p.Files { + _src11 := other.Files[i] + if !_tgt.Equals(_src11) { return false } + } + return true +} + +func (p *TFilesResp) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TFilesResp(%+v)", *p) +} + +// Attributes: +// - DiskSize +// - DeviceNum +// - TimeserieNum +type TSpaceQuota struct { + DiskSize *int64 `thrift:"diskSize,1" db:"diskSize" json:"diskSize,omitempty"` + DeviceNum *int64 `thrift:"deviceNum,2" db:"deviceNum" json:"deviceNum,omitempty"` + TimeserieNum *int64 `thrift:"timeserieNum,3" db:"timeserieNum" json:"timeserieNum,omitempty"` +} + +func NewTSpaceQuota() *TSpaceQuota { + return &TSpaceQuota{} +} + +var TSpaceQuota_DiskSize_DEFAULT int64 +func (p *TSpaceQuota) GetDiskSize() int64 { + if !p.IsSetDiskSize() { + return TSpaceQuota_DiskSize_DEFAULT + } +return *p.DiskSize +} +var TSpaceQuota_DeviceNum_DEFAULT int64 +func (p *TSpaceQuota) GetDeviceNum() int64 { + if !p.IsSetDeviceNum() { + return TSpaceQuota_DeviceNum_DEFAULT + } +return *p.DeviceNum +} +var TSpaceQuota_TimeserieNum_DEFAULT int64 +func (p *TSpaceQuota) GetTimeserieNum() int64 { + if !p.IsSetTimeserieNum() { + return TSpaceQuota_TimeserieNum_DEFAULT + } +return *p.TimeserieNum +} +func (p *TSpaceQuota) IsSetDiskSize() bool { + return p.DiskSize != nil +} + +func (p *TSpaceQuota) IsSetDeviceNum() bool { + return p.DeviceNum != nil +} + +func (p *TSpaceQuota) IsSetTimeserieNum() bool { + return p.TimeserieNum != nil +} + +func (p *TSpaceQuota) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I64 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TSpaceQuota) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.DiskSize = &v +} + return nil +} + +func (p *TSpaceQuota) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.DeviceNum = &v +} + return nil +} + +func (p *TSpaceQuota) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.TimeserieNum = &v +} + return nil +} + +func (p *TSpaceQuota) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSpaceQuota"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSpaceQuota) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDiskSize() { + if err := oprot.WriteFieldBegin(ctx, "diskSize", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:diskSize: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.DiskSize)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.diskSize (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:diskSize: ", p), err) } + } + return err +} + +func (p *TSpaceQuota) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDeviceNum() { + if err := oprot.WriteFieldBegin(ctx, "deviceNum", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:deviceNum: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.DeviceNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.deviceNum (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:deviceNum: ", p), err) } + } + return err +} + +func (p *TSpaceQuota) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimeserieNum() { + if err := oprot.WriteFieldBegin(ctx, "timeserieNum", thrift.I64, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timeserieNum: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.TimeserieNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timeserieNum (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timeserieNum: ", p), err) } + } + return err +} + +func (p *TSpaceQuota) Equals(other *TSpaceQuota) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.DiskSize != other.DiskSize { + if p.DiskSize == nil || other.DiskSize == nil { + return false + } + if (*p.DiskSize) != (*other.DiskSize) { return false } + } + if p.DeviceNum != other.DeviceNum { + if p.DeviceNum == nil || other.DeviceNum == nil { + return false + } + if (*p.DeviceNum) != (*other.DeviceNum) { return false } + } + if p.TimeserieNum != other.TimeserieNum { + if p.TimeserieNum == nil || other.TimeserieNum == nil { + return false + } + if (*p.TimeserieNum) != (*other.TimeserieNum) { return false } + } + return true +} + +func (p *TSpaceQuota) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSpaceQuota(%+v)", *p) +} + +// Attributes: +// - TimeUnit +// - SoftLimit +type TTimedQuota struct { + TimeUnit int64 `thrift:"timeUnit,1,required" db:"timeUnit" json:"timeUnit"` + SoftLimit int64 `thrift:"softLimit,2,required" db:"softLimit" json:"softLimit"` +} + +func NewTTimedQuota() *TTimedQuota { + return &TTimedQuota{} +} + + +func (p *TTimedQuota) GetTimeUnit() int64 { + return p.TimeUnit +} + +func (p *TTimedQuota) GetSoftLimit() int64 { + return p.SoftLimit +} +func (p *TTimedQuota) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTimeUnit bool = false; + var issetSoftLimit bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTimeUnit = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetSoftLimit = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTimeUnit{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimeUnit is not set")); + } + if !issetSoftLimit{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SoftLimit is not set")); + } + return nil +} + +func (p *TTimedQuota) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.TimeUnit = v +} + return nil +} + +func (p *TTimedQuota) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.SoftLimit = v +} + return nil +} + +func (p *TTimedQuota) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TTimedQuota"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TTimedQuota) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timeUnit", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timeUnit: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.TimeUnit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timeUnit (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timeUnit: ", p), err) } + return err +} + +func (p *TTimedQuota) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "softLimit", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:softLimit: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SoftLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.softLimit (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:softLimit: ", p), err) } + return err +} + +func (p *TTimedQuota) Equals(other *TTimedQuota) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.TimeUnit != other.TimeUnit { return false } + if p.SoftLimit != other.SoftLimit { return false } + return true +} + +func (p *TTimedQuota) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TTimedQuota(%+v)", *p) +} + +// Attributes: +// - ThrottleLimit +// - MemLimit +// - CpuLimit +type TThrottleQuota struct { + ThrottleLimit map[ThrottleType]*TTimedQuota `thrift:"throttleLimit,1" db:"throttleLimit" json:"throttleLimit,omitempty"` + MemLimit *int64 `thrift:"memLimit,2" db:"memLimit" json:"memLimit,omitempty"` + CpuLimit *int32 `thrift:"cpuLimit,3" db:"cpuLimit" json:"cpuLimit,omitempty"` +} + +func NewTThrottleQuota() *TThrottleQuota { + return &TThrottleQuota{} +} + +var TThrottleQuota_ThrottleLimit_DEFAULT map[ThrottleType]*TTimedQuota + +func (p *TThrottleQuota) GetThrottleLimit() map[ThrottleType]*TTimedQuota { + return p.ThrottleLimit +} +var TThrottleQuota_MemLimit_DEFAULT int64 +func (p *TThrottleQuota) GetMemLimit() int64 { + if !p.IsSetMemLimit() { + return TThrottleQuota_MemLimit_DEFAULT + } +return *p.MemLimit +} +var TThrottleQuota_CpuLimit_DEFAULT int32 +func (p *TThrottleQuota) GetCpuLimit() int32 { + if !p.IsSetCpuLimit() { + return TThrottleQuota_CpuLimit_DEFAULT + } +return *p.CpuLimit +} +func (p *TThrottleQuota) IsSetThrottleLimit() bool { + return p.ThrottleLimit != nil +} + +func (p *TThrottleQuota) IsSetMemLimit() bool { + return p.MemLimit != nil +} + +func (p *TThrottleQuota) IsSetCpuLimit() bool { + return p.CpuLimit != nil +} + +func (p *TThrottleQuota) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.MAP { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I32 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TThrottleQuota) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[ThrottleType]*TTimedQuota, size) + p.ThrottleLimit = tMap + for i := 0; i < size; i ++ { +var _key12 ThrottleType + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + temp := ThrottleType(v) + _key12 = temp +} + _val13 := &TTimedQuota{} + if err := _val13.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _val13), err) + } + p.ThrottleLimit[_key12] = _val13 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TThrottleQuota) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.MemLimit = &v +} + return nil +} + +func (p *TThrottleQuota) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.CpuLimit = &v +} + return nil +} + +func (p *TThrottleQuota) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TThrottleQuota"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TThrottleQuota) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetThrottleLimit() { + if err := oprot.WriteFieldBegin(ctx, "throttleLimit", thrift.MAP, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:throttleLimit: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.I32, thrift.STRUCT, len(p.ThrottleLimit)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ThrottleLimit { + if err := oprot.WriteI32(ctx, int32(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:throttleLimit: ", p), err) } + } + return err +} + +func (p *TThrottleQuota) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMemLimit() { + if err := oprot.WriteFieldBegin(ctx, "memLimit", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:memLimit: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.MemLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.memLimit (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:memLimit: ", p), err) } + } + return err +} + +func (p *TThrottleQuota) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCpuLimit() { + if err := oprot.WriteFieldBegin(ctx, "cpuLimit", thrift.I32, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:cpuLimit: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.CpuLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.cpuLimit (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:cpuLimit: ", p), err) } + } + return err +} + +func (p *TThrottleQuota) Equals(other *TThrottleQuota) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.ThrottleLimit) != len(other.ThrottleLimit) { return false } + for k, _tgt := range p.ThrottleLimit { + _src14 := other.ThrottleLimit[k] + if !_tgt.Equals(_src14) { return false } + } + if p.MemLimit != other.MemLimit { + if p.MemLimit == nil || other.MemLimit == nil { + return false + } + if (*p.MemLimit) != (*other.MemLimit) { return false } + } + if p.CpuLimit != other.CpuLimit { + if p.CpuLimit == nil || other.CpuLimit == nil { + return false + } + if (*p.CpuLimit) != (*other.CpuLimit) { return false } + } + return true +} + +func (p *TThrottleQuota) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TThrottleQuota(%+v)", *p) +} + +// Attributes: +// - Database +// - SpaceLimit +type TSetSpaceQuotaReq struct { + Database []string `thrift:"database,1,required" db:"database" json:"database"` + SpaceLimit *TSpaceQuota `thrift:"spaceLimit,2,required" db:"spaceLimit" json:"spaceLimit"` +} + +func NewTSetSpaceQuotaReq() *TSetSpaceQuotaReq { + return &TSetSpaceQuotaReq{} +} + + +func (p *TSetSpaceQuotaReq) GetDatabase() []string { + return p.Database +} +var TSetSpaceQuotaReq_SpaceLimit_DEFAULT *TSpaceQuota +func (p *TSetSpaceQuotaReq) GetSpaceLimit() *TSpaceQuota { + if !p.IsSetSpaceLimit() { + return TSetSpaceQuotaReq_SpaceLimit_DEFAULT + } +return p.SpaceLimit +} +func (p *TSetSpaceQuotaReq) IsSetSpaceLimit() bool { + return p.SpaceLimit != nil +} + +func (p *TSetSpaceQuotaReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetDatabase bool = false; + var issetSpaceLimit bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.LIST { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetDatabase = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetSpaceLimit = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetDatabase{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Database is not set")); + } + if !issetSpaceLimit{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SpaceLimit is not set")); + } + return nil +} + +func (p *TSetSpaceQuotaReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Database = tSlice + for i := 0; i < size; i ++ { +var _elem15 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem15 = v +} + p.Database = append(p.Database, _elem15) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSetSpaceQuotaReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.SpaceLimit = &TSpaceQuota{} + if err := p.SpaceLimit.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.SpaceLimit), err) + } + return nil +} + +func (p *TSetSpaceQuotaReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSetSpaceQuotaReq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSetSpaceQuotaReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "database", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:database: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Database)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Database { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:database: ", p), err) } + return err +} + +func (p *TSetSpaceQuotaReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "spaceLimit", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:spaceLimit: ", p), err) } + if err := p.SpaceLimit.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.SpaceLimit), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:spaceLimit: ", p), err) } + return err +} + +func (p *TSetSpaceQuotaReq) Equals(other *TSetSpaceQuotaReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.Database) != len(other.Database) { return false } + for i, _tgt := range p.Database { + _src16 := other.Database[i] + if _tgt != _src16 { return false } + } + if !p.SpaceLimit.Equals(other.SpaceLimit) { return false } + return true +} + +func (p *TSetSpaceQuotaReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSetSpaceQuotaReq(%+v)", *p) +} + +// Attributes: +// - UserName +// - ThrottleQuota +type TSetThrottleQuotaReq struct { + UserName string `thrift:"userName,1,required" db:"userName" json:"userName"` + ThrottleQuota *TThrottleQuota `thrift:"throttleQuota,2,required" db:"throttleQuota" json:"throttleQuota"` +} + +func NewTSetThrottleQuotaReq() *TSetThrottleQuotaReq { + return &TSetThrottleQuotaReq{} +} + + +func (p *TSetThrottleQuotaReq) GetUserName() string { + return p.UserName +} +var TSetThrottleQuotaReq_ThrottleQuota_DEFAULT *TThrottleQuota +func (p *TSetThrottleQuotaReq) GetThrottleQuota() *TThrottleQuota { + if !p.IsSetThrottleQuota() { + return TSetThrottleQuotaReq_ThrottleQuota_DEFAULT + } +return p.ThrottleQuota +} +func (p *TSetThrottleQuotaReq) IsSetThrottleQuota() bool { + return p.ThrottleQuota != nil +} + +func (p *TSetThrottleQuotaReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetUserName bool = false; + var issetThrottleQuota bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetUserName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetThrottleQuota = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetUserName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field UserName is not set")); + } + if !issetThrottleQuota{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThrottleQuota is not set")); + } + return nil +} + +func (p *TSetThrottleQuotaReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.UserName = v +} + return nil +} + +func (p *TSetThrottleQuotaReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.ThrottleQuota = &TThrottleQuota{} + if err := p.ThrottleQuota.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ThrottleQuota), err) + } + return nil +} + +func (p *TSetThrottleQuotaReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSetThrottleQuotaReq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSetThrottleQuotaReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "userName", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:userName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.UserName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.userName (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:userName: ", p), err) } + return err +} + +func (p *TSetThrottleQuotaReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "throttleQuota", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:throttleQuota: ", p), err) } + if err := p.ThrottleQuota.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ThrottleQuota), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:throttleQuota: ", p), err) } + return err +} + +func (p *TSetThrottleQuotaReq) Equals(other *TSetThrottleQuotaReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.UserName != other.UserName { return false } + if !p.ThrottleQuota.Equals(other.ThrottleQuota) { return false } + return true +} + +func (p *TSetThrottleQuotaReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSetThrottleQuotaReq(%+v)", *p) +} + diff --git a/example/session_example.go b/example/session_example.go index ad0b244..bb85240 100644 --- a/example/session_example.go +++ b/example/session_example.go @@ -22,13 +22,13 @@ package main import ( "flag" "fmt" + "github.com/apache/iotdb-client-go/common" "log" "math/rand" "strings" "time" "github.com/apache/iotdb-client-go/client" - "github.com/apache/iotdb-client-go/rpc" ) var ( @@ -57,6 +57,8 @@ func main() { } defer session.Close() + fastInsertRecords() + setStorageGroup("root.ln1") deleteStorageGroup("root.ln1") @@ -113,6 +115,11 @@ func main() { executeRawDataQuery() executeBatchStatement() + var startTime int64 = 1 + var endTime int64 = 10 + var interval int64 = 2 + executeAggregationQueryStatementWithLegalNodes([]string{"root.ln.wf02.wt02.s5"}, []common.TAggregationType{common.TAggregationType_COUNT}, &startTime, &endTime, &interval) + deleteTimeseries("root.sg1.dev1.status") deleteTimeseries("root.ln.wf02.wt02.s5") @@ -169,7 +176,7 @@ func printDevice1(sds *client.SessionDataSet) { // var description string // var status string - if err := sds.Scan(&restartCount, &price, &tickCount, &temperature, &description, &status); err != nil { + if err := sds.Scan(&restartCount, &tickCount, &price, &temperature, &description, &status); err != nil { log.Fatal(err) } @@ -376,6 +383,26 @@ func insertAlignedRecord() { fmt.Println() } +func fastInsertRecords() { + var ( + deviceIds = []string{"root.fast.d1", "root.fast.d2"} + dataTypes = [][]client.TSDataType{{client.INT32, client.INT32}, {client.INT32, client.INT32}} + values = [][]interface{}{{int32(120), int32(121)}, {int32(130), int32(131)}} + timestamp = []int64{12, 13} + ) + checkError(session.FastInsertRecords(deviceIds, dataTypes, values, timestamp)) + sessionDataSet, err := session.ExecuteStatement("show devices") + if err == nil { + printDataSet0(sessionDataSet) + sessionDataSet.Close() + } else { + log.Println(err) + } + + deleteTimeseries("root.fast.**") + fmt.Println() +} + func insertRecords() { var ( deviceId = []string{"root.sg1.dev1"} @@ -604,12 +631,25 @@ func executeQueryStatement(sql string) { } } +func executeAggregationQueryStatementWithLegalNodes(paths []string, aggregations []common.TAggregationType, + startTime *int64, endTime *int64, interval *int64) { + var timeout int64 = 1000 + var legal bool = true + sessionDataSet, err := session.ExecuteAggregationQueryWithLegalNodes(paths, aggregations, startTime, endTime, interval, &timeout, &legal) + if err == nil { + printDataSet1(sessionDataSet) + sessionDataSet.Close() + } else { + log.Println(err) + } +} + func executeRawDataQuery() { session.ExecuteUpdateStatement("insert into root.ln.wf02.wt02(time,s5) values(1,true)") var ( - paths []string = []string{"root.ln.wf02.wt02.s5"} - startTime int64 = 1 - endTime int64 = 200 + paths = []string{"root.ln.wf02.wt02.s5"} + startTime int64 = 1 + endTime int64 = 200 ) sessionDataSet, err := session.ExecuteRawDataQuery(paths, startTime, endTime) if err == nil { @@ -638,7 +678,7 @@ func executeBatchStatement() { } } -func checkError(status *rpc.TSStatus, err error) { +func checkError(status *common.TSStatus, err error) { if err != nil { log.Fatal(err) } diff --git a/example/session_pool/session_pool_example.go b/example/session_pool/session_pool_example.go index ecd630b..a4641d9 100644 --- a/example/session_pool/session_pool_example.go +++ b/example/session_pool/session_pool_example.go @@ -22,6 +22,7 @@ package main import ( "flag" "fmt" + "github.com/apache/iotdb-client-go/common" "log" "math/rand" "strings" @@ -29,7 +30,6 @@ import ( "time" "github.com/apache/iotdb-client-go/client" - "github.com/apache/iotdb-client-go/rpc" ) var ( @@ -641,7 +641,7 @@ func printDevice1(sds *client.SessionDataSet) { // var description string // var status string - if err := sds.Scan(&restartCount, &price, &tickCount, &temperature, &description, &status); err != nil { + if err := sds.Scan(&restartCount, &tickCount, &price, &temperature, &description, &status); err != nil { log.Fatal(err) } @@ -751,7 +751,7 @@ func printDataSet2(sds *client.SessionDataSet) { } } -func checkError(status *rpc.TSStatus, err error) { +func checkError(status *common.TSStatus, err error) { if err != nil { log.Fatal(err) } diff --git a/rpc/client-consts.go b/rpc/client-consts.go new file mode 100644 index 0000000..d1e6cf5 --- /dev/null +++ b/rpc/client-consts.go @@ -0,0 +1,26 @@ +// Code generated by Thrift Compiler (0.14.1). DO NOT EDIT. + +package rpc + +import( + "bytes" + "context" + "fmt" + "time" + "github.com/apache/thrift/lib/go/thrift" + "github.com/apache/iotdb-client-go/common" + +) + +// (needed to ensure safety because of naive import list construction.) +var _ = thrift.ZERO +var _ = fmt.Printf +var _ = context.Background +var _ = time.Now +var _ = bytes.Equal + +var _ = common.GoUnusedProtection__ + +func init() { +} + diff --git a/rpc/rpc.go b/rpc/client.go similarity index 70% rename from rpc/rpc.go rename to rpc/client.go index 79a52bb..b3668b8 100644 --- a/rpc/rpc.go +++ b/rpc/client.go @@ -10,6 +10,8 @@ import( "fmt" "time" "github.com/apache/thrift/lib/go/thrift" + "github.com/apache/iotdb-client-go/common" + ) // (needed to ensure safety because of naive import list construction.) @@ -19,6 +21,7 @@ var _ = context.Background var _ = time.Now var _ = bytes.Equal +var _ = common.GoUnusedProtection__ type TSProtocolVersion int64 const ( TSProtocolVersion_IOTDB_SERVICE_PROTOCOL_V1 TSProtocolVersion = 0 @@ -75,33 +78,96 @@ func (p * TSProtocolVersion) Value() (driver.Value, error) { } return int64(*p), nil } +type TSConnectionType int64 +const ( + TSConnectionType_THRIFT_BASED TSConnectionType = 0 + TSConnectionType_MQTT_BASED TSConnectionType = 1 + TSConnectionType_INTERNAL TSConnectionType = 2 +) + +func (p TSConnectionType) String() string { + switch p { + case TSConnectionType_THRIFT_BASED: return "THRIFT_BASED" + case TSConnectionType_MQTT_BASED: return "MQTT_BASED" + case TSConnectionType_INTERNAL: return "INTERNAL" + } + return "" +} + +func TSConnectionTypeFromString(s string) (TSConnectionType, error) { + switch s { + case "THRIFT_BASED": return TSConnectionType_THRIFT_BASED, nil + case "MQTT_BASED": return TSConnectionType_MQTT_BASED, nil + case "INTERNAL": return TSConnectionType_INTERNAL, nil + } + return TSConnectionType(0), fmt.Errorf("not a valid TSConnectionType string") +} + + +func TSConnectionTypePtr(v TSConnectionType) *TSConnectionType { return &v } + +func (p TSConnectionType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TSConnectionType) UnmarshalText(text []byte) error { +q, err := TSConnectionTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TSConnectionType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TSConnectionType(v) +return nil +} + +func (p * TSConnectionType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} // Attributes: -// - IP -// - Port -type EndPoint struct { - IP string `thrift:"ip,1,required" db:"ip" json:"ip"` - Port int32 `thrift:"port,2,required" db:"port" json:"port"` +// - Time +// - ValueList +// - BitmapList +type TSQueryDataSet struct { + Time []byte `thrift:"time,1,required" db:"time" json:"time"` + ValueList [][]byte `thrift:"valueList,2,required" db:"valueList" json:"valueList"` + BitmapList [][]byte `thrift:"bitmapList,3,required" db:"bitmapList" json:"bitmapList"` } -func NewEndPoint() *EndPoint { - return &EndPoint{} +func NewTSQueryDataSet() *TSQueryDataSet { + return &TSQueryDataSet{} } -func (p *EndPoint) GetIP() string { - return p.IP +func (p *TSQueryDataSet) GetTime() []byte { + return p.Time +} + +func (p *TSQueryDataSet) GetValueList() [][]byte { + return p.ValueList } -func (p *EndPoint) GetPort() int32 { - return p.Port +func (p *TSQueryDataSet) GetBitmapList() [][]byte { + return p.BitmapList } -func (p *EndPoint) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSQueryDataSet) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - var issetIP bool = false; - var issetPort bool = false; + var issetTime bool = false; + var issetValueList bool = false; + var issetBitmapList bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -115,18 +181,29 @@ func (p *EndPoint) Read(ctx context.Context, iprot thrift.TProtocol) error { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetIP = true + issetTime = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.LIST { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetPort = true + issetValueList = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetBitmapList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -144,39 +221,78 @@ func (p *EndPoint) Read(ctx context.Context, iprot thrift.TProtocol) error { if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if !issetIP{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IP is not set")); + if !issetTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Time is not set")); + } + if !issetValueList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValueList is not set")); } - if !issetPort{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Port is not set")); + if !issetBitmapList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field BitmapList is not set")); } return nil } -func (p *EndPoint) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TSQueryDataSet) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { - p.IP = v + p.Time = v } return nil } -func (p *EndPoint) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) +func (p *TSQueryDataSet) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.ValueList = tSlice + for i := 0; i < size; i ++ { +var _elem0 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.Port = v + _elem0 = v } + p.ValueList = append(p.ValueList, _elem0) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSQueryDataSet) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.BitmapList = tSlice + for i := 0; i < size; i ++ { +var _elem1 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem1 = v +} + p.BitmapList = append(p.BitmapList, _elem1) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *EndPoint) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "EndPoint"); err != nil { +func (p *TSQueryDataSet) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSQueryDataSet"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -185,101 +301,106 @@ func (p *EndPoint) Write(ctx context.Context, oprot thrift.TProtocol) error { return nil } -func (p *EndPoint) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "ip", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ip: ", p), err) } - if err := oprot.WriteString(ctx, string(p.IP)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.ip (1) field write error: ", p), err) } +func (p *TSQueryDataSet) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "time", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:time: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Time); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.time (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:time: ", p), err) } + return err +} + +func (p *TSQueryDataSet) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "valueList", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:valueList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValueList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ValueList { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ip: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:valueList: ", p), err) } return err } -func (p *EndPoint) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "port", thrift.I32, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:port: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Port)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.port (2) field write error: ", p), err) } +func (p *TSQueryDataSet) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "bitmapList", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:bitmapList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.BitmapList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.BitmapList { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:port: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:bitmapList: ", p), err) } return err } -func (p *EndPoint) Equals(other *EndPoint) bool { +func (p *TSQueryDataSet) Equals(other *TSQueryDataSet) bool { if p == other { return true } else if p == nil || other == nil { return false } - if p.IP != other.IP { return false } - if p.Port != other.Port { return false } + if bytes.Compare(p.Time, other.Time) != 0 { return false } + if len(p.ValueList) != len(other.ValueList) { return false } + for i, _tgt := range p.ValueList { + _src2 := other.ValueList[i] + if bytes.Compare(_tgt, _src2) != 0 { return false } + } + if len(p.BitmapList) != len(other.BitmapList) { return false } + for i, _tgt := range p.BitmapList { + _src3 := other.BitmapList[i] + if bytes.Compare(_tgt, _src3) != 0 { return false } + } return true } -func (p *EndPoint) String() string { +func (p *TSQueryDataSet) String() string { if p == nil { return "" } - return fmt.Sprintf("EndPoint(%+v)", *p) + return fmt.Sprintf("TSQueryDataSet(%+v)", *p) } // Attributes: -// - Code -// - Message -// - SubStatus -// - RedirectNode -type TSStatus struct { - Code int32 `thrift:"code,1,required" db:"code" json:"code"` - Message *string `thrift:"message,2" db:"message" json:"message,omitempty"` - SubStatus []*TSStatus `thrift:"subStatus,3" db:"subStatus" json:"subStatus,omitempty"` - RedirectNode *EndPoint `thrift:"redirectNode,4" db:"redirectNode" json:"redirectNode,omitempty"` -} - -func NewTSStatus() *TSStatus { - return &TSStatus{} +// - TimeList +// - ValueList +type TSQueryNonAlignDataSet struct { + TimeList [][]byte `thrift:"timeList,1,required" db:"timeList" json:"timeList"` + ValueList [][]byte `thrift:"valueList,2,required" db:"valueList" json:"valueList"` } - -func (p *TSStatus) GetCode() int32 { - return p.Code -} -var TSStatus_Message_DEFAULT string -func (p *TSStatus) GetMessage() string { - if !p.IsSetMessage() { - return TSStatus_Message_DEFAULT - } -return *p.Message +func NewTSQueryNonAlignDataSet() *TSQueryNonAlignDataSet { + return &TSQueryNonAlignDataSet{} } -var TSStatus_SubStatus_DEFAULT []*TSStatus -func (p *TSStatus) GetSubStatus() []*TSStatus { - return p.SubStatus -} -var TSStatus_RedirectNode_DEFAULT *EndPoint -func (p *TSStatus) GetRedirectNode() *EndPoint { - if !p.IsSetRedirectNode() { - return TSStatus_RedirectNode_DEFAULT - } -return p.RedirectNode -} -func (p *TSStatus) IsSetMessage() bool { - return p.Message != nil -} -func (p *TSStatus) IsSetSubStatus() bool { - return p.SubStatus != nil +func (p *TSQueryNonAlignDataSet) GetTimeList() [][]byte { + return p.TimeList } -func (p *TSStatus) IsSetRedirectNode() bool { - return p.RedirectNode != nil +func (p *TSQueryNonAlignDataSet) GetValueList() [][]byte { + return p.ValueList } - -func (p *TSStatus) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSQueryNonAlignDataSet) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - var issetCode bool = false; + var issetTimeList bool = false; + var issetValueList bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -289,41 +410,22 @@ func (p *TSStatus) Read(ctx context.Context, iprot thrift.TProtocol) error { if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.LIST { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetCode = true + issetTimeList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 3: if fieldTypeId == thrift.LIST { - if err := p.ReadField3(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 4: - if fieldTypeId == thrift.STRUCT { - if err := p.ReadField4(ctx, iprot); err != nil { + if err := p.ReadField2(ctx, iprot); err != nil { return err } + issetValueList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -341,43 +443,52 @@ func (p *TSStatus) Read(ctx context.Context, iprot thrift.TProtocol) error { if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if !issetCode{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Code is not set")); + if !issetTimeList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimeList is not set")); + } + if !issetValueList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValueList is not set")); } return nil } -func (p *TSStatus) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) -} else { - p.Code = v -} - return nil -} - -func (p *TSStatus) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) +func (p *TSQueryNonAlignDataSet) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.TimeList = tSlice + for i := 0; i < size; i ++ { +var _elem4 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.Message = &v + _elem4 = v } + p.TimeList = append(p.TimeList, _elem4) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSStatus) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSQueryNonAlignDataSet) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } - tSlice := make([]*TSStatus, 0, size) - p.SubStatus = tSlice + tSlice := make([][]byte, 0, size) + p.ValueList = tSlice for i := 0; i < size; i ++ { - _elem0 := &TSStatus{} - if err := _elem0.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err) - } - p.SubStatus = append(p.SubStatus, _elem0) +var _elem5 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem5 = v +} + p.ValueList = append(p.ValueList, _elem5) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -385,22 +496,12 @@ func (p *TSStatus) ReadField3(ctx context.Context, iprot thrift.TProtocol) erro return nil } -func (p *TSStatus) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - p.RedirectNode = &EndPoint{} - if err := p.RedirectNode.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.RedirectNode), err) - } - return nil -} - -func (p *TSStatus) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSStatus"); err != nil { +func (p *TSQueryNonAlignDataSet) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSQueryNonAlignDataSet"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } - if err := p.writeField3(ctx, oprot); err != nil { return err } - if err := p.writeField4(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -409,125 +510,212 @@ func (p *TSStatus) Write(ctx context.Context, oprot thrift.TProtocol) error { return nil } -func (p *TSStatus) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "code", thrift.I32, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Code)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.code (1) field write error: ", p), err) } +func (p *TSQueryNonAlignDataSet) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timeList", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timeList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.TimeList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.TimeList { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timeList: ", p), err) } return err } -func (p *TSStatus) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetMessage() { - if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:message: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.message (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:message: ", p), err) } +func (p *TSQueryNonAlignDataSet) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "valueList", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:valueList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValueList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) } - return err -} - -func (p *TSStatus) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetSubStatus() { - if err := oprot.WriteFieldBegin(ctx, "subStatus", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:subStatus: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.SubStatus)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.SubStatus { - if err := v.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:subStatus: ", p), err) } + for _, v := range p.ValueList { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - return err -} - -func (p *TSStatus) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetRedirectNode() { - if err := oprot.WriteFieldBegin(ctx, "redirectNode", thrift.STRUCT, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:redirectNode: ", p), err) } - if err := p.RedirectNode.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.RedirectNode), err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:redirectNode: ", p), err) } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:valueList: ", p), err) } return err } -func (p *TSStatus) Equals(other *TSStatus) bool { +func (p *TSQueryNonAlignDataSet) Equals(other *TSQueryNonAlignDataSet) bool { if p == other { return true } else if p == nil || other == nil { return false } - if p.Code != other.Code { return false } - if p.Message != other.Message { - if p.Message == nil || other.Message == nil { - return false - } - if (*p.Message) != (*other.Message) { return false } + if len(p.TimeList) != len(other.TimeList) { return false } + for i, _tgt := range p.TimeList { + _src6 := other.TimeList[i] + if bytes.Compare(_tgt, _src6) != 0 { return false } } - if len(p.SubStatus) != len(other.SubStatus) { return false } - for i, _tgt := range p.SubStatus { - _src1 := other.SubStatus[i] - if !_tgt.Equals(_src1) { return false } + if len(p.ValueList) != len(other.ValueList) { return false } + for i, _tgt := range p.ValueList { + _src7 := other.ValueList[i] + if bytes.Compare(_tgt, _src7) != 0 { return false } } - if !p.RedirectNode.Equals(other.RedirectNode) { return false } return true } -func (p *TSStatus) String() string { +func (p *TSQueryNonAlignDataSet) String() string { if p == nil { return "" } - return fmt.Sprintf("TSStatus(%+v)", *p) + return fmt.Sprintf("TSQueryNonAlignDataSet(%+v)", *p) } // Attributes: -// - Time -// - ValueList -// - BitmapList -type TSQueryDataSet struct { - Time []byte `thrift:"time,1,required" db:"time" json:"time"` - ValueList [][]byte `thrift:"valueList,2,required" db:"valueList" json:"valueList"` - BitmapList [][]byte `thrift:"bitmapList,3,required" db:"bitmapList" json:"bitmapList"` +// - ActivityList +// - ElapsedTimeList +// - SeriesPathNum +// - SeqFileNum +// - UnSeqFileNum +// - SequenceChunkNum +// - SequenceChunkPointNum +// - UnsequenceChunkNum +// - UnsequenceChunkPointNum +// - TotalPageNum +// - OverlappedPageNum +type TSTracingInfo struct { + ActivityList []string `thrift:"activityList,1,required" db:"activityList" json:"activityList"` + ElapsedTimeList []int64 `thrift:"elapsedTimeList,2,required" db:"elapsedTimeList" json:"elapsedTimeList"` + SeriesPathNum *int32 `thrift:"seriesPathNum,3" db:"seriesPathNum" json:"seriesPathNum,omitempty"` + SeqFileNum *int32 `thrift:"seqFileNum,4" db:"seqFileNum" json:"seqFileNum,omitempty"` + UnSeqFileNum *int32 `thrift:"unSeqFileNum,5" db:"unSeqFileNum" json:"unSeqFileNum,omitempty"` + SequenceChunkNum *int32 `thrift:"sequenceChunkNum,6" db:"sequenceChunkNum" json:"sequenceChunkNum,omitempty"` + SequenceChunkPointNum *int64 `thrift:"sequenceChunkPointNum,7" db:"sequenceChunkPointNum" json:"sequenceChunkPointNum,omitempty"` + UnsequenceChunkNum *int32 `thrift:"unsequenceChunkNum,8" db:"unsequenceChunkNum" json:"unsequenceChunkNum,omitempty"` + UnsequenceChunkPointNum *int64 `thrift:"unsequenceChunkPointNum,9" db:"unsequenceChunkPointNum" json:"unsequenceChunkPointNum,omitempty"` + TotalPageNum *int32 `thrift:"totalPageNum,10" db:"totalPageNum" json:"totalPageNum,omitempty"` + OverlappedPageNum *int32 `thrift:"overlappedPageNum,11" db:"overlappedPageNum" json:"overlappedPageNum,omitempty"` } -func NewTSQueryDataSet() *TSQueryDataSet { - return &TSQueryDataSet{} +func NewTSTracingInfo() *TSTracingInfo { + return &TSTracingInfo{} } -func (p *TSQueryDataSet) GetTime() []byte { - return p.Time +func (p *TSTracingInfo) GetActivityList() []string { + return p.ActivityList } -func (p *TSQueryDataSet) GetValueList() [][]byte { - return p.ValueList +func (p *TSTracingInfo) GetElapsedTimeList() []int64 { + return p.ElapsedTimeList +} +var TSTracingInfo_SeriesPathNum_DEFAULT int32 +func (p *TSTracingInfo) GetSeriesPathNum() int32 { + if !p.IsSetSeriesPathNum() { + return TSTracingInfo_SeriesPathNum_DEFAULT + } +return *p.SeriesPathNum +} +var TSTracingInfo_SeqFileNum_DEFAULT int32 +func (p *TSTracingInfo) GetSeqFileNum() int32 { + if !p.IsSetSeqFileNum() { + return TSTracingInfo_SeqFileNum_DEFAULT + } +return *p.SeqFileNum +} +var TSTracingInfo_UnSeqFileNum_DEFAULT int32 +func (p *TSTracingInfo) GetUnSeqFileNum() int32 { + if !p.IsSetUnSeqFileNum() { + return TSTracingInfo_UnSeqFileNum_DEFAULT + } +return *p.UnSeqFileNum +} +var TSTracingInfo_SequenceChunkNum_DEFAULT int32 +func (p *TSTracingInfo) GetSequenceChunkNum() int32 { + if !p.IsSetSequenceChunkNum() { + return TSTracingInfo_SequenceChunkNum_DEFAULT + } +return *p.SequenceChunkNum +} +var TSTracingInfo_SequenceChunkPointNum_DEFAULT int64 +func (p *TSTracingInfo) GetSequenceChunkPointNum() int64 { + if !p.IsSetSequenceChunkPointNum() { + return TSTracingInfo_SequenceChunkPointNum_DEFAULT + } +return *p.SequenceChunkPointNum +} +var TSTracingInfo_UnsequenceChunkNum_DEFAULT int32 +func (p *TSTracingInfo) GetUnsequenceChunkNum() int32 { + if !p.IsSetUnsequenceChunkNum() { + return TSTracingInfo_UnsequenceChunkNum_DEFAULT + } +return *p.UnsequenceChunkNum +} +var TSTracingInfo_UnsequenceChunkPointNum_DEFAULT int64 +func (p *TSTracingInfo) GetUnsequenceChunkPointNum() int64 { + if !p.IsSetUnsequenceChunkPointNum() { + return TSTracingInfo_UnsequenceChunkPointNum_DEFAULT + } +return *p.UnsequenceChunkPointNum +} +var TSTracingInfo_TotalPageNum_DEFAULT int32 +func (p *TSTracingInfo) GetTotalPageNum() int32 { + if !p.IsSetTotalPageNum() { + return TSTracingInfo_TotalPageNum_DEFAULT + } +return *p.TotalPageNum +} +var TSTracingInfo_OverlappedPageNum_DEFAULT int32 +func (p *TSTracingInfo) GetOverlappedPageNum() int32 { + if !p.IsSetOverlappedPageNum() { + return TSTracingInfo_OverlappedPageNum_DEFAULT + } +return *p.OverlappedPageNum +} +func (p *TSTracingInfo) IsSetSeriesPathNum() bool { + return p.SeriesPathNum != nil } -func (p *TSQueryDataSet) GetBitmapList() [][]byte { - return p.BitmapList +func (p *TSTracingInfo) IsSetSeqFileNum() bool { + return p.SeqFileNum != nil } -func (p *TSQueryDataSet) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *TSTracingInfo) IsSetUnSeqFileNum() bool { + return p.UnSeqFileNum != nil +} + +func (p *TSTracingInfo) IsSetSequenceChunkNum() bool { + return p.SequenceChunkNum != nil +} + +func (p *TSTracingInfo) IsSetSequenceChunkPointNum() bool { + return p.SequenceChunkPointNum != nil +} + +func (p *TSTracingInfo) IsSetUnsequenceChunkNum() bool { + return p.UnsequenceChunkNum != nil +} + +func (p *TSTracingInfo) IsSetUnsequenceChunkPointNum() bool { + return p.UnsequenceChunkPointNum != nil +} + +func (p *TSTracingInfo) IsSetTotalPageNum() bool { + return p.TotalPageNum != nil +} + +func (p *TSTracingInfo) IsSetOverlappedPageNum() bool { + return p.OverlappedPageNum != nil +} + +func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - var issetTime bool = false; - var issetValueList bool = false; - var issetBitmapList bool = false; + var issetActivityList bool = false; + var issetElapsedTimeList bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -537,11 +725,11 @@ func (p *TSQueryDataSet) Read(ctx context.Context, iprot thrift.TProtocol) error if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.LIST { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetTime = true + issetActivityList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -552,71 +740,138 @@ func (p *TSQueryDataSet) Read(ctx context.Context, iprot thrift.TProtocol) error if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetValueList = true + issetElapsedTimeList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I32 { if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetBitmapList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } } - } - if err := iprot.ReadFieldEnd(ctx); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTime{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Time is not set")); - } - if !issetValueList{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValueList is not set")); - } - if !issetBitmapList{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field BitmapList is not set")); - } - return nil -} - -func (p *TSQueryDataSet) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) -} else { - p.Time = v -} - return nil + case 5: + if fieldTypeId == thrift.I32 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.I32 { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.I64 { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.I32 { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.I64 { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.I32 { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.I32 { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetActivityList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ActivityList is not set")); + } + if !issetElapsedTimeList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ElapsedTimeList is not set")); + } + return nil } -func (p *TSQueryDataSet) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSTracingInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } - tSlice := make([][]byte, 0, size) - p.ValueList = tSlice + tSlice := make([]string, 0, size) + p.ActivityList = tSlice for i := 0; i < size; i ++ { -var _elem2 []byte - if v, err := iprot.ReadBinary(ctx); err != nil { +var _elem8 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem2 = v + _elem8 = v } - p.ValueList = append(p.ValueList, _elem2) + p.ActivityList = append(p.ActivityList, _elem8) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -624,21 +879,21 @@ var _elem2 []byte return nil } -func (p *TSQueryDataSet) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSTracingInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } - tSlice := make([][]byte, 0, size) - p.BitmapList = tSlice + tSlice := make([]int64, 0, size) + p.ElapsedTimeList = tSlice for i := 0; i < size; i ++ { -var _elem3 []byte - if v, err := iprot.ReadBinary(ctx); err != nil { +var _elem9 int64 + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem3 = v + _elem9 = v } - p.BitmapList = append(p.BitmapList, _elem3) + p.ElapsedTimeList = append(p.ElapsedTimeList, _elem9) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -646,13 +901,102 @@ var _elem3 []byte return nil } -func (p *TSQueryDataSet) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSQueryDataSet"); err != nil { +func (p *TSTracingInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.SeriesPathNum = &v +} + return nil +} + +func (p *TSTracingInfo) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.SeqFileNum = &v +} + return nil +} + +func (p *TSTracingInfo) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.UnSeqFileNum = &v +} + return nil +} + +func (p *TSTracingInfo) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.SequenceChunkNum = &v +} + return nil +} + +func (p *TSTracingInfo) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.SequenceChunkPointNum = &v +} + return nil +} + +func (p *TSTracingInfo) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 8: ", err) +} else { + p.UnsequenceChunkNum = &v +} + return nil +} + +func (p *TSTracingInfo) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 9: ", err) +} else { + p.UnsequenceChunkPointNum = &v +} + return nil +} + +func (p *TSTracingInfo) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 10: ", err) +} else { + p.TotalPageNum = &v +} + return nil +} + +func (p *TSTracingInfo) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 11: ", err) +} else { + p.OverlappedPageNum = &v +} + return nil +} + +func (p *TSTracingInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSTracingInfo"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -661,423 +1005,416 @@ func (p *TSQueryDataSet) Write(ctx context.Context, oprot thrift.TProtocol) erro return nil } -func (p *TSQueryDataSet) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "time", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:time: ", p), err) } - if err := oprot.WriteBinary(ctx, p.Time); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.time (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:time: ", p), err) } - return err -} - -func (p *TSQueryDataSet) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "valueList", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:valueList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValueList)); err != nil { +func (p *TSTracingInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "activityList", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:activityList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ActivityList)); err != nil { return thrift.PrependError("error writing list begin: ", err) } - for _, v := range p.ValueList { - if err := oprot.WriteBinary(ctx, v); err != nil { + for _, v := range p.ActivityList { + if err := oprot.WriteString(ctx, string(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:valueList: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:activityList: ", p), err) } return err } -func (p *TSQueryDataSet) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "bitmapList", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:bitmapList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.BitmapList)); err != nil { +func (p *TSTracingInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "elapsedTimeList", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:elapsedTimeList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.ElapsedTimeList)); err != nil { return thrift.PrependError("error writing list begin: ", err) } - for _, v := range p.BitmapList { - if err := oprot.WriteBinary(ctx, v); err != nil { + for _, v := range p.ElapsedTimeList { + if err := oprot.WriteI64(ctx, int64(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:bitmapList: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:elapsedTimeList: ", p), err) } return err } -func (p *TSQueryDataSet) Equals(other *TSQueryDataSet) bool { - if p == other { - return true - } else if p == nil || other == nil { - return false - } - if bytes.Compare(p.Time, other.Time) != 0 { return false } - if len(p.ValueList) != len(other.ValueList) { return false } - for i, _tgt := range p.ValueList { - _src4 := other.ValueList[i] - if bytes.Compare(_tgt, _src4) != 0 { return false } - } - if len(p.BitmapList) != len(other.BitmapList) { return false } - for i, _tgt := range p.BitmapList { - _src5 := other.BitmapList[i] - if bytes.Compare(_tgt, _src5) != 0 { return false } +func (p *TSTracingInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSeriesPathNum() { + if err := oprot.WriteFieldBegin(ctx, "seriesPathNum", thrift.I32, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:seriesPathNum: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.SeriesPathNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.seriesPathNum (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:seriesPathNum: ", p), err) } } - return true + return err } -func (p *TSQueryDataSet) String() string { - if p == nil { - return "" +func (p *TSTracingInfo) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSeqFileNum() { + if err := oprot.WriteFieldBegin(ctx, "seqFileNum", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:seqFileNum: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.SeqFileNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.seqFileNum (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:seqFileNum: ", p), err) } } - return fmt.Sprintf("TSQueryDataSet(%+v)", *p) -} - -// Attributes: -// - TimeList -// - ValueList -type TSQueryNonAlignDataSet struct { - TimeList [][]byte `thrift:"timeList,1,required" db:"timeList" json:"timeList"` - ValueList [][]byte `thrift:"valueList,2,required" db:"valueList" json:"valueList"` -} - -func NewTSQueryNonAlignDataSet() *TSQueryNonAlignDataSet { - return &TSQueryNonAlignDataSet{} -} - - -func (p *TSQueryNonAlignDataSet) GetTimeList() [][]byte { - return p.TimeList -} - -func (p *TSQueryNonAlignDataSet) GetValueList() [][]byte { - return p.ValueList + return err } -func (p *TSQueryNonAlignDataSet) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - var issetTimeList bool = false; - var issetValueList bool = false; - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { break; } - switch fieldId { - case 1: - if fieldTypeId == thrift.LIST { - if err := p.ReadField1(ctx, iprot); err != nil { - return err - } - issetTimeList = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 2: - if fieldTypeId == thrift.LIST { - if err := p.ReadField2(ctx, iprot); err != nil { - return err - } - issetValueList = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(ctx); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTimeList{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimeList is not set")); - } - if !issetValueList{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValueList is not set")); +func (p *TSTracingInfo) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetUnSeqFileNum() { + if err := oprot.WriteFieldBegin(ctx, "unSeqFileNum", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:unSeqFileNum: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.UnSeqFileNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.unSeqFileNum (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:unSeqFileNum: ", p), err) } } - return nil + return err } -func (p *TSQueryNonAlignDataSet) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([][]byte, 0, size) - p.TimeList = tSlice - for i := 0; i < size; i ++ { -var _elem6 []byte - if v, err := iprot.ReadBinary(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _elem6 = v -} - p.TimeList = append(p.TimeList, _elem6) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) +func (p *TSTracingInfo) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSequenceChunkNum() { + if err := oprot.WriteFieldBegin(ctx, "sequenceChunkNum", thrift.I32, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:sequenceChunkNum: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.SequenceChunkNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sequenceChunkNum (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:sequenceChunkNum: ", p), err) } } - return nil + return err } -func (p *TSQueryNonAlignDataSet) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) +func (p *TSTracingInfo) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSequenceChunkPointNum() { + if err := oprot.WriteFieldBegin(ctx, "sequenceChunkPointNum", thrift.I64, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:sequenceChunkPointNum: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.SequenceChunkPointNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sequenceChunkPointNum (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:sequenceChunkPointNum: ", p), err) } } - tSlice := make([][]byte, 0, size) - p.ValueList = tSlice - for i := 0; i < size; i ++ { -var _elem7 []byte - if v, err := iprot.ReadBinary(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _elem7 = v + return err } - p.ValueList = append(p.ValueList, _elem7) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) + +func (p *TSTracingInfo) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetUnsequenceChunkNum() { + if err := oprot.WriteFieldBegin(ctx, "unsequenceChunkNum", thrift.I32, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:unsequenceChunkNum: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.UnsequenceChunkNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.unsequenceChunkNum (8) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:unsequenceChunkNum: ", p), err) } } - return nil + return err } -func (p *TSQueryNonAlignDataSet) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSQueryNonAlignDataSet"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } - if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } +func (p *TSTracingInfo) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetUnsequenceChunkPointNum() { + if err := oprot.WriteFieldBegin(ctx, "unsequenceChunkPointNum", thrift.I64, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:unsequenceChunkPointNum: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.UnsequenceChunkPointNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.unsequenceChunkPointNum (9) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:unsequenceChunkPointNum: ", p), err) } } - if err := oprot.WriteFieldStop(ctx); err != nil { - return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { - return thrift.PrependError("write struct stop error: ", err) } - return nil + return err } -func (p *TSQueryNonAlignDataSet) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "timeList", thrift.LIST, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timeList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.TimeList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.TimeList { - if err := oprot.WriteBinary(ctx, v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) +func (p *TSTracingInfo) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTotalPageNum() { + if err := oprot.WriteFieldBegin(ctx, "totalPageNum", thrift.I32, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:totalPageNum: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.TotalPageNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.totalPageNum (10) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:totalPageNum: ", p), err) } } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timeList: ", p), err) } return err } -func (p *TSQueryNonAlignDataSet) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "valueList", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:valueList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValueList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ValueList { - if err := oprot.WriteBinary(ctx, v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) +func (p *TSTracingInfo) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetOverlappedPageNum() { + if err := oprot.WriteFieldBegin(ctx, "overlappedPageNum", thrift.I32, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:overlappedPageNum: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.OverlappedPageNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.overlappedPageNum (11) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:overlappedPageNum: ", p), err) } } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:valueList: ", p), err) } return err } -func (p *TSQueryNonAlignDataSet) Equals(other *TSQueryNonAlignDataSet) bool { +func (p *TSTracingInfo) Equals(other *TSTracingInfo) bool { if p == other { return true } else if p == nil || other == nil { return false } - if len(p.TimeList) != len(other.TimeList) { return false } - for i, _tgt := range p.TimeList { - _src8 := other.TimeList[i] - if bytes.Compare(_tgt, _src8) != 0 { return false } + if len(p.ActivityList) != len(other.ActivityList) { return false } + for i, _tgt := range p.ActivityList { + _src10 := other.ActivityList[i] + if _tgt != _src10 { return false } } - if len(p.ValueList) != len(other.ValueList) { return false } - for i, _tgt := range p.ValueList { - _src9 := other.ValueList[i] - if bytes.Compare(_tgt, _src9) != 0 { return false } + if len(p.ElapsedTimeList) != len(other.ElapsedTimeList) { return false } + for i, _tgt := range p.ElapsedTimeList { + _src11 := other.ElapsedTimeList[i] + if _tgt != _src11 { return false } } - return true -} - -func (p *TSQueryNonAlignDataSet) String() string { - if p == nil { - return "" + if p.SeriesPathNum != other.SeriesPathNum { + if p.SeriesPathNum == nil || other.SeriesPathNum == nil { + return false + } + if (*p.SeriesPathNum) != (*other.SeriesPathNum) { return false } } - return fmt.Sprintf("TSQueryNonAlignDataSet(%+v)", *p) -} - -// Attributes: -// - ActivityList -// - ElapsedTimeList -// - SeriesPathNum -// - SeqFileNum -// - UnSeqFileNum -// - SequenceChunkNum -// - SequenceChunkPointNum -// - UnsequenceChunkNum -// - UnsequenceChunkPointNum -// - TotalPageNum -// - OverlappedPageNum -type TSTracingInfo struct { - ActivityList []string `thrift:"activityList,1,required" db:"activityList" json:"activityList"` - ElapsedTimeList []int64 `thrift:"elapsedTimeList,2,required" db:"elapsedTimeList" json:"elapsedTimeList"` - SeriesPathNum *int32 `thrift:"seriesPathNum,3" db:"seriesPathNum" json:"seriesPathNum,omitempty"` - SeqFileNum *int32 `thrift:"seqFileNum,4" db:"seqFileNum" json:"seqFileNum,omitempty"` - UnSeqFileNum *int32 `thrift:"unSeqFileNum,5" db:"unSeqFileNum" json:"unSeqFileNum,omitempty"` - SequenceChunkNum *int32 `thrift:"sequenceChunkNum,6" db:"sequenceChunkNum" json:"sequenceChunkNum,omitempty"` - SequenceChunkPointNum *int64 `thrift:"sequenceChunkPointNum,7" db:"sequenceChunkPointNum" json:"sequenceChunkPointNum,omitempty"` - UnsequenceChunkNum *int32 `thrift:"unsequenceChunkNum,8" db:"unsequenceChunkNum" json:"unsequenceChunkNum,omitempty"` - UnsequenceChunkPointNum *int64 `thrift:"unsequenceChunkPointNum,9" db:"unsequenceChunkPointNum" json:"unsequenceChunkPointNum,omitempty"` - TotalPageNum *int32 `thrift:"totalPageNum,10" db:"totalPageNum" json:"totalPageNum,omitempty"` - OverlappedPageNum *int32 `thrift:"overlappedPageNum,11" db:"overlappedPageNum" json:"overlappedPageNum,omitempty"` + if p.SeqFileNum != other.SeqFileNum { + if p.SeqFileNum == nil || other.SeqFileNum == nil { + return false + } + if (*p.SeqFileNum) != (*other.SeqFileNum) { return false } + } + if p.UnSeqFileNum != other.UnSeqFileNum { + if p.UnSeqFileNum == nil || other.UnSeqFileNum == nil { + return false + } + if (*p.UnSeqFileNum) != (*other.UnSeqFileNum) { return false } + } + if p.SequenceChunkNum != other.SequenceChunkNum { + if p.SequenceChunkNum == nil || other.SequenceChunkNum == nil { + return false + } + if (*p.SequenceChunkNum) != (*other.SequenceChunkNum) { return false } + } + if p.SequenceChunkPointNum != other.SequenceChunkPointNum { + if p.SequenceChunkPointNum == nil || other.SequenceChunkPointNum == nil { + return false + } + if (*p.SequenceChunkPointNum) != (*other.SequenceChunkPointNum) { return false } + } + if p.UnsequenceChunkNum != other.UnsequenceChunkNum { + if p.UnsequenceChunkNum == nil || other.UnsequenceChunkNum == nil { + return false + } + if (*p.UnsequenceChunkNum) != (*other.UnsequenceChunkNum) { return false } + } + if p.UnsequenceChunkPointNum != other.UnsequenceChunkPointNum { + if p.UnsequenceChunkPointNum == nil || other.UnsequenceChunkPointNum == nil { + return false + } + if (*p.UnsequenceChunkPointNum) != (*other.UnsequenceChunkPointNum) { return false } + } + if p.TotalPageNum != other.TotalPageNum { + if p.TotalPageNum == nil || other.TotalPageNum == nil { + return false + } + if (*p.TotalPageNum) != (*other.TotalPageNum) { return false } + } + if p.OverlappedPageNum != other.OverlappedPageNum { + if p.OverlappedPageNum == nil || other.OverlappedPageNum == nil { + return false + } + if (*p.OverlappedPageNum) != (*other.OverlappedPageNum) { return false } + } + return true } -func NewTSTracingInfo() *TSTracingInfo { - return &TSTracingInfo{} +func (p *TSTracingInfo) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSTracingInfo(%+v)", *p) } - -func (p *TSTracingInfo) GetActivityList() []string { - return p.ActivityList +// Attributes: +// - Status +// - QueryId +// - Columns +// - OperationType +// - IgnoreTimeStamp +// - DataTypeList +// - QueryDataSet +// - NonAlignQueryDataSet +// - ColumnNameIndexMap +// - SgColumns +// - AliasColumns +// - TracingInfo +// - QueryResult_ +// - MoreData +type TSExecuteStatementResp struct { + Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` + QueryId *int64 `thrift:"queryId,2" db:"queryId" json:"queryId,omitempty"` + Columns []string `thrift:"columns,3" db:"columns" json:"columns,omitempty"` + OperationType *string `thrift:"operationType,4" db:"operationType" json:"operationType,omitempty"` + IgnoreTimeStamp *bool `thrift:"ignoreTimeStamp,5" db:"ignoreTimeStamp" json:"ignoreTimeStamp,omitempty"` + DataTypeList []string `thrift:"dataTypeList,6" db:"dataTypeList" json:"dataTypeList,omitempty"` + QueryDataSet *TSQueryDataSet `thrift:"queryDataSet,7" db:"queryDataSet" json:"queryDataSet,omitempty"` + NonAlignQueryDataSet *TSQueryNonAlignDataSet `thrift:"nonAlignQueryDataSet,8" db:"nonAlignQueryDataSet" json:"nonAlignQueryDataSet,omitempty"` + ColumnNameIndexMap map[string]int32 `thrift:"columnNameIndexMap,9" db:"columnNameIndexMap" json:"columnNameIndexMap,omitempty"` + SgColumns []string `thrift:"sgColumns,10" db:"sgColumns" json:"sgColumns,omitempty"` + AliasColumns []int8 `thrift:"aliasColumns,11" db:"aliasColumns" json:"aliasColumns,omitempty"` + TracingInfo *TSTracingInfo `thrift:"tracingInfo,12" db:"tracingInfo" json:"tracingInfo,omitempty"` + QueryResult_ [][]byte `thrift:"queryResult,13" db:"queryResult" json:"queryResult,omitempty"` + MoreData *bool `thrift:"moreData,14" db:"moreData" json:"moreData,omitempty"` } -func (p *TSTracingInfo) GetElapsedTimeList() []int64 { - return p.ElapsedTimeList +func NewTSExecuteStatementResp() *TSExecuteStatementResp { + return &TSExecuteStatementResp{} } -var TSTracingInfo_SeriesPathNum_DEFAULT int32 -func (p *TSTracingInfo) GetSeriesPathNum() int32 { - if !p.IsSetSeriesPathNum() { - return TSTracingInfo_SeriesPathNum_DEFAULT + +var TSExecuteStatementResp_Status_DEFAULT *common.TSStatus +func (p *TSExecuteStatementResp) GetStatus() *common.TSStatus { + if !p.IsSetStatus() { + return TSExecuteStatementResp_Status_DEFAULT } -return *p.SeriesPathNum +return p.Status } -var TSTracingInfo_SeqFileNum_DEFAULT int32 -func (p *TSTracingInfo) GetSeqFileNum() int32 { - if !p.IsSetSeqFileNum() { - return TSTracingInfo_SeqFileNum_DEFAULT +var TSExecuteStatementResp_QueryId_DEFAULT int64 +func (p *TSExecuteStatementResp) GetQueryId() int64 { + if !p.IsSetQueryId() { + return TSExecuteStatementResp_QueryId_DEFAULT } -return *p.SeqFileNum +return *p.QueryId } -var TSTracingInfo_UnSeqFileNum_DEFAULT int32 -func (p *TSTracingInfo) GetUnSeqFileNum() int32 { - if !p.IsSetUnSeqFileNum() { - return TSTracingInfo_UnSeqFileNum_DEFAULT - } -return *p.UnSeqFileNum +var TSExecuteStatementResp_Columns_DEFAULT []string + +func (p *TSExecuteStatementResp) GetColumns() []string { + return p.Columns } -var TSTracingInfo_SequenceChunkNum_DEFAULT int32 -func (p *TSTracingInfo) GetSequenceChunkNum() int32 { - if !p.IsSetSequenceChunkNum() { - return TSTracingInfo_SequenceChunkNum_DEFAULT +var TSExecuteStatementResp_OperationType_DEFAULT string +func (p *TSExecuteStatementResp) GetOperationType() string { + if !p.IsSetOperationType() { + return TSExecuteStatementResp_OperationType_DEFAULT } -return *p.SequenceChunkNum +return *p.OperationType } -var TSTracingInfo_SequenceChunkPointNum_DEFAULT int64 -func (p *TSTracingInfo) GetSequenceChunkPointNum() int64 { - if !p.IsSetSequenceChunkPointNum() { - return TSTracingInfo_SequenceChunkPointNum_DEFAULT +var TSExecuteStatementResp_IgnoreTimeStamp_DEFAULT bool +func (p *TSExecuteStatementResp) GetIgnoreTimeStamp() bool { + if !p.IsSetIgnoreTimeStamp() { + return TSExecuteStatementResp_IgnoreTimeStamp_DEFAULT } -return *p.SequenceChunkPointNum +return *p.IgnoreTimeStamp } -var TSTracingInfo_UnsequenceChunkNum_DEFAULT int32 -func (p *TSTracingInfo) GetUnsequenceChunkNum() int32 { - if !p.IsSetUnsequenceChunkNum() { - return TSTracingInfo_UnsequenceChunkNum_DEFAULT +var TSExecuteStatementResp_DataTypeList_DEFAULT []string + +func (p *TSExecuteStatementResp) GetDataTypeList() []string { + return p.DataTypeList +} +var TSExecuteStatementResp_QueryDataSet_DEFAULT *TSQueryDataSet +func (p *TSExecuteStatementResp) GetQueryDataSet() *TSQueryDataSet { + if !p.IsSetQueryDataSet() { + return TSExecuteStatementResp_QueryDataSet_DEFAULT } -return *p.UnsequenceChunkNum +return p.QueryDataSet } -var TSTracingInfo_UnsequenceChunkPointNum_DEFAULT int64 -func (p *TSTracingInfo) GetUnsequenceChunkPointNum() int64 { - if !p.IsSetUnsequenceChunkPointNum() { - return TSTracingInfo_UnsequenceChunkPointNum_DEFAULT +var TSExecuteStatementResp_NonAlignQueryDataSet_DEFAULT *TSQueryNonAlignDataSet +func (p *TSExecuteStatementResp) GetNonAlignQueryDataSet() *TSQueryNonAlignDataSet { + if !p.IsSetNonAlignQueryDataSet() { + return TSExecuteStatementResp_NonAlignQueryDataSet_DEFAULT } -return *p.UnsequenceChunkPointNum +return p.NonAlignQueryDataSet } -var TSTracingInfo_TotalPageNum_DEFAULT int32 -func (p *TSTracingInfo) GetTotalPageNum() int32 { - if !p.IsSetTotalPageNum() { - return TSTracingInfo_TotalPageNum_DEFAULT +var TSExecuteStatementResp_ColumnNameIndexMap_DEFAULT map[string]int32 + +func (p *TSExecuteStatementResp) GetColumnNameIndexMap() map[string]int32 { + return p.ColumnNameIndexMap +} +var TSExecuteStatementResp_SgColumns_DEFAULT []string + +func (p *TSExecuteStatementResp) GetSgColumns() []string { + return p.SgColumns +} +var TSExecuteStatementResp_AliasColumns_DEFAULT []int8 + +func (p *TSExecuteStatementResp) GetAliasColumns() []int8 { + return p.AliasColumns +} +var TSExecuteStatementResp_TracingInfo_DEFAULT *TSTracingInfo +func (p *TSExecuteStatementResp) GetTracingInfo() *TSTracingInfo { + if !p.IsSetTracingInfo() { + return TSExecuteStatementResp_TracingInfo_DEFAULT } -return *p.TotalPageNum +return p.TracingInfo } -var TSTracingInfo_OverlappedPageNum_DEFAULT int32 -func (p *TSTracingInfo) GetOverlappedPageNum() int32 { - if !p.IsSetOverlappedPageNum() { - return TSTracingInfo_OverlappedPageNum_DEFAULT +var TSExecuteStatementResp_QueryResult__DEFAULT [][]byte + +func (p *TSExecuteStatementResp) GetQueryResult_() [][]byte { + return p.QueryResult_ +} +var TSExecuteStatementResp_MoreData_DEFAULT bool +func (p *TSExecuteStatementResp) GetMoreData() bool { + if !p.IsSetMoreData() { + return TSExecuteStatementResp_MoreData_DEFAULT } -return *p.OverlappedPageNum +return *p.MoreData } -func (p *TSTracingInfo) IsSetSeriesPathNum() bool { - return p.SeriesPathNum != nil +func (p *TSExecuteStatementResp) IsSetStatus() bool { + return p.Status != nil } -func (p *TSTracingInfo) IsSetSeqFileNum() bool { - return p.SeqFileNum != nil +func (p *TSExecuteStatementResp) IsSetQueryId() bool { + return p.QueryId != nil } -func (p *TSTracingInfo) IsSetUnSeqFileNum() bool { - return p.UnSeqFileNum != nil +func (p *TSExecuteStatementResp) IsSetColumns() bool { + return p.Columns != nil } -func (p *TSTracingInfo) IsSetSequenceChunkNum() bool { - return p.SequenceChunkNum != nil +func (p *TSExecuteStatementResp) IsSetOperationType() bool { + return p.OperationType != nil } -func (p *TSTracingInfo) IsSetSequenceChunkPointNum() bool { - return p.SequenceChunkPointNum != nil +func (p *TSExecuteStatementResp) IsSetIgnoreTimeStamp() bool { + return p.IgnoreTimeStamp != nil } -func (p *TSTracingInfo) IsSetUnsequenceChunkNum() bool { - return p.UnsequenceChunkNum != nil +func (p *TSExecuteStatementResp) IsSetDataTypeList() bool { + return p.DataTypeList != nil } -func (p *TSTracingInfo) IsSetUnsequenceChunkPointNum() bool { - return p.UnsequenceChunkPointNum != nil +func (p *TSExecuteStatementResp) IsSetQueryDataSet() bool { + return p.QueryDataSet != nil } -func (p *TSTracingInfo) IsSetTotalPageNum() bool { - return p.TotalPageNum != nil +func (p *TSExecuteStatementResp) IsSetNonAlignQueryDataSet() bool { + return p.NonAlignQueryDataSet != nil } -func (p *TSTracingInfo) IsSetOverlappedPageNum() bool { - return p.OverlappedPageNum != nil +func (p *TSExecuteStatementResp) IsSetColumnNameIndexMap() bool { + return p.ColumnNameIndexMap != nil } -func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } +func (p *TSExecuteStatementResp) IsSetSgColumns() bool { + return p.SgColumns != nil +} - var issetActivityList bool = false; - var issetElapsedTimeList bool = false; +func (p *TSExecuteStatementResp) IsSetAliasColumns() bool { + return p.AliasColumns != nil +} - for { +func (p *TSExecuteStatementResp) IsSetTracingInfo() bool { + return p.TracingInfo != nil +} + +func (p *TSExecuteStatementResp) IsSetQueryResult_() bool { + return p.QueryResult_ != nil +} + +func (p *TSExecuteStatementResp) IsSetMoreData() bool { + return p.MoreData != nil +} + +func (p *TSExecuteStatementResp) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetStatus bool = false; + + for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) if err != nil { return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) @@ -1085,29 +1422,28 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetActivityList = true + issetStatus = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I64 { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetElapsedTimeList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.LIST { if err := p.ReadField3(ctx, iprot); err != nil { return err } @@ -1117,7 +1453,7 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error } } case 4: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.STRING { if err := p.ReadField4(ctx, iprot); err != nil { return err } @@ -1127,7 +1463,7 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error } } case 5: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.BOOL { if err := p.ReadField5(ctx, iprot); err != nil { return err } @@ -1137,7 +1473,7 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error } } case 6: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.LIST { if err := p.ReadField6(ctx, iprot); err != nil { return err } @@ -1147,7 +1483,7 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error } } case 7: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField7(ctx, iprot); err != nil { return err } @@ -1157,7 +1493,7 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error } } case 8: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField8(ctx, iprot); err != nil { return err } @@ -1167,7 +1503,7 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error } } case 9: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.MAP { if err := p.ReadField9(ctx, iprot); err != nil { return err } @@ -1177,7 +1513,7 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error } } case 10: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.LIST { if err := p.ReadField10(ctx, iprot); err != nil { return err } @@ -1187,7 +1523,7 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error } } case 11: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.LIST { if err := p.ReadField11(ctx, iprot); err != nil { return err } @@ -1196,6 +1532,36 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error return err } } + case 12: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField12(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 13: + if fieldTypeId == thrift.LIST { + if err := p.ReadField13(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 14: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField14(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -1208,30 +1574,44 @@ func (p *TSTracingInfo) Read(ctx context.Context, iprot thrift.TProtocol) error if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if !issetActivityList{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ActivityList is not set")); + if !issetStatus{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); } - if !issetElapsedTimeList{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ElapsedTimeList is not set")); + return nil +} + +func (p *TSExecuteStatementResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Status = &common.TSStatus{} + if err := p.Status.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) } return nil } -func (p *TSTracingInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSExecuteStatementResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.QueryId = &v +} + return nil +} + +func (p *TSExecuteStatementResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - p.ActivityList = tSlice + p.Columns = tSlice for i := 0; i < size; i ++ { -var _elem10 string +var _elem12 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem10 = v + _elem12 = v } - p.ActivityList = append(p.ActivityList, _elem10) + p.Columns = append(p.Columns, _elem12) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -1239,21 +1619,39 @@ var _elem10 string return nil } -func (p *TSTracingInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSExecuteStatementResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.OperationType = &v +} + return nil +} + +func (p *TSExecuteStatementResp) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.IgnoreTimeStamp = &v +} + return nil +} + +func (p *TSExecuteStatementResp) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } - tSlice := make([]int64, 0, size) - p.ElapsedTimeList = tSlice + tSlice := make([]string, 0, size) + p.DataTypeList = tSlice for i := 0; i < size; i ++ { -var _elem11 int64 - if v, err := iprot.ReadI64(ctx); err != nil { +var _elem13 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem11 = v + _elem13 = v } - p.ElapsedTimeList = append(p.ElapsedTimeList, _elem11) + p.DataTypeList = append(p.DataTypeList, _elem13) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -1261,89 +1659,136 @@ var _elem11 int64 return nil } -func (p *TSTracingInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) -} else { - p.SeriesPathNum = &v -} +func (p *TSExecuteStatementResp) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + p.QueryDataSet = &TSQueryDataSet{} + if err := p.QueryDataSet.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.QueryDataSet), err) + } return nil } -func (p *TSTracingInfo) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 4: ", err) -} else { - p.SeqFileNum = &v -} +func (p *TSExecuteStatementResp) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + p.NonAlignQueryDataSet = &TSQueryNonAlignDataSet{} + if err := p.NonAlignQueryDataSet.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NonAlignQueryDataSet), err) + } return nil } -func (p *TSTracingInfo) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 5: ", err) +func (p *TSExecuteStatementResp) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]int32, size) + p.ColumnNameIndexMap = tMap + for i := 0; i < size; i ++ { +var _key14 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.UnSeqFileNum = &v -} - return nil + _key14 = v } - -func (p *TSTracingInfo) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 6: ", err) +var _val15 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.SequenceChunkNum = &v + _val15 = v } + p.ColumnNameIndexMap[_key14] = _val15 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } return nil } -func (p *TSTracingInfo) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 7: ", err) +func (p *TSExecuteStatementResp) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.SgColumns = tSlice + for i := 0; i < size; i ++ { +var _elem16 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.SequenceChunkPointNum = &v + _elem16 = v } + p.SgColumns = append(p.SgColumns, _elem16) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSTracingInfo) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 8: ", err) +func (p *TSExecuteStatementResp) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int8, 0, size) + p.AliasColumns = tSlice + for i := 0; i < size; i ++ { +var _elem17 int8 + if v, err := iprot.ReadByte(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.UnsequenceChunkNum = &v + temp := int8(v) + _elem17 = temp } + p.AliasColumns = append(p.AliasColumns, _elem17) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSTracingInfo) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 9: ", err) -} else { - p.UnsequenceChunkPointNum = &v -} +func (p *TSExecuteStatementResp) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + p.TracingInfo = &TSTracingInfo{} + if err := p.TracingInfo.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TracingInfo), err) + } return nil } -func (p *TSTracingInfo) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 10: ", err) +func (p *TSExecuteStatementResp) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.QueryResult_ = tSlice + for i := 0; i < size; i ++ { +var _elem18 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.TotalPageNum = &v + _elem18 = v } + p.QueryResult_ = append(p.QueryResult_, _elem18) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSTracingInfo) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 11: ", err) +func (p *TSExecuteStatementResp) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 14: ", err) } else { - p.OverlappedPageNum = &v + p.MoreData = &v } return nil } -func (p *TSTracingInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSTracingInfo"); err != nil { +func (p *TSExecuteStatementResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSExecuteStatementResp"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -1357,6 +1802,9 @@ func (p *TSTracingInfo) Write(ctx context.Context, oprot thrift.TProtocol) error if err := p.writeField9(ctx, oprot); err != nil { return err } if err := p.writeField10(ctx, oprot); err != nil { return err } if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField12(ctx, oprot); err != nil { return err } + if err := p.writeField13(ctx, oprot); err != nil { return err } + if err := p.writeField14(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -1365,390 +1813,360 @@ func (p *TSTracingInfo) Write(ctx context.Context, oprot thrift.TProtocol) error return nil } -func (p *TSTracingInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "activityList", thrift.LIST, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:activityList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ActivityList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ActivityList { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) +func (p *TSExecuteStatementResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } + if err := p.Status.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:activityList: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } return err } -func (p *TSTracingInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "elapsedTimeList", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:elapsedTimeList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.ElapsedTimeList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) +func (p *TSExecuteStatementResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetQueryId() { + if err := oprot.WriteFieldBegin(ctx, "queryId", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.QueryId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.queryId (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryId: ", p), err) } } - for _, v := range p.ElapsedTimeList { - if err := oprot.WriteI64(ctx, int64(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + return err +} + +func (p *TSExecuteStatementResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetColumns() { + if err := oprot.WriteFieldBegin(ctx, "columns", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:columns: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Columns)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Columns { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:columns: ", p), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) + return err +} + +func (p *TSExecuteStatementResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetOperationType() { + if err := oprot.WriteFieldBegin(ctx, "operationType", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:operationType: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.OperationType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.operationType (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:operationType: ", p), err) } } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:elapsedTimeList: ", p), err) } return err } -func (p *TSTracingInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetSeriesPathNum() { - if err := oprot.WriteFieldBegin(ctx, "seriesPathNum", thrift.I32, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:seriesPathNum: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.SeriesPathNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.seriesPathNum (3) field write error: ", p), err) } +func (p *TSExecuteStatementResp) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIgnoreTimeStamp() { + if err := oprot.WriteFieldBegin(ctx, "ignoreTimeStamp", thrift.BOOL, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:ignoreTimeStamp: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.IgnoreTimeStamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.ignoreTimeStamp (5) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:seriesPathNum: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:ignoreTimeStamp: ", p), err) } } return err } -func (p *TSTracingInfo) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetSeqFileNum() { - if err := oprot.WriteFieldBegin(ctx, "seqFileNum", thrift.I32, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:seqFileNum: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.SeqFileNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.seqFileNum (4) field write error: ", p), err) } +func (p *TSExecuteStatementResp) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDataTypeList() { + if err := oprot.WriteFieldBegin(ctx, "dataTypeList", thrift.LIST, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:dataTypeList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.DataTypeList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.DataTypeList { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:seqFileNum: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:dataTypeList: ", p), err) } } return err } -func (p *TSTracingInfo) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetUnSeqFileNum() { - if err := oprot.WriteFieldBegin(ctx, "unSeqFileNum", thrift.I32, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:unSeqFileNum: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.UnSeqFileNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.unSeqFileNum (5) field write error: ", p), err) } +func (p *TSExecuteStatementResp) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetQueryDataSet() { + if err := oprot.WriteFieldBegin(ctx, "queryDataSet", thrift.STRUCT, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:queryDataSet: ", p), err) } + if err := p.QueryDataSet.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.QueryDataSet), err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:unSeqFileNum: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:queryDataSet: ", p), err) } } return err } -func (p *TSTracingInfo) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetSequenceChunkNum() { - if err := oprot.WriteFieldBegin(ctx, "sequenceChunkNum", thrift.I32, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:sequenceChunkNum: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.SequenceChunkNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sequenceChunkNum (6) field write error: ", p), err) } +func (p *TSExecuteStatementResp) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetNonAlignQueryDataSet() { + if err := oprot.WriteFieldBegin(ctx, "nonAlignQueryDataSet", thrift.STRUCT, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:nonAlignQueryDataSet: ", p), err) } + if err := p.NonAlignQueryDataSet.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NonAlignQueryDataSet), err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:sequenceChunkNum: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:nonAlignQueryDataSet: ", p), err) } } return err } -func (p *TSTracingInfo) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetSequenceChunkPointNum() { - if err := oprot.WriteFieldBegin(ctx, "sequenceChunkPointNum", thrift.I64, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:sequenceChunkPointNum: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.SequenceChunkPointNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sequenceChunkPointNum (7) field write error: ", p), err) } +func (p *TSExecuteStatementResp) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetColumnNameIndexMap() { + if err := oprot.WriteFieldBegin(ctx, "columnNameIndexMap", thrift.MAP, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:columnNameIndexMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.I32, len(p.ColumnNameIndexMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ColumnNameIndexMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:sequenceChunkPointNum: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:columnNameIndexMap: ", p), err) } } return err } -func (p *TSTracingInfo) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetUnsequenceChunkNum() { - if err := oprot.WriteFieldBegin(ctx, "unsequenceChunkNum", thrift.I32, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:unsequenceChunkNum: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.UnsequenceChunkNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.unsequenceChunkNum (8) field write error: ", p), err) } +func (p *TSExecuteStatementResp) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSgColumns() { + if err := oprot.WriteFieldBegin(ctx, "sgColumns", thrift.LIST, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:sgColumns: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.SgColumns)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.SgColumns { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:unsequenceChunkNum: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:sgColumns: ", p), err) } } return err } -func (p *TSTracingInfo) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetUnsequenceChunkPointNum() { - if err := oprot.WriteFieldBegin(ctx, "unsequenceChunkPointNum", thrift.I64, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:unsequenceChunkPointNum: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.UnsequenceChunkPointNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.unsequenceChunkPointNum (9) field write error: ", p), err) } +func (p *TSExecuteStatementResp) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAliasColumns() { + if err := oprot.WriteFieldBegin(ctx, "aliasColumns", thrift.LIST, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:aliasColumns: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.BYTE, len(p.AliasColumns)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.AliasColumns { + if err := oprot.WriteByte(ctx, int8(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:unsequenceChunkPointNum: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:aliasColumns: ", p), err) } } return err } -func (p *TSTracingInfo) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetTotalPageNum() { - if err := oprot.WriteFieldBegin(ctx, "totalPageNum", thrift.I32, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:totalPageNum: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.TotalPageNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.totalPageNum (10) field write error: ", p), err) } +func (p *TSExecuteStatementResp) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTracingInfo() { + if err := oprot.WriteFieldBegin(ctx, "tracingInfo", thrift.STRUCT, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:tracingInfo: ", p), err) } + if err := p.TracingInfo.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TracingInfo), err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:totalPageNum: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:tracingInfo: ", p), err) } } return err } -func (p *TSTracingInfo) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetOverlappedPageNum() { - if err := oprot.WriteFieldBegin(ctx, "overlappedPageNum", thrift.I32, 11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:overlappedPageNum: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.OverlappedPageNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.overlappedPageNum (11) field write error: ", p), err) } +func (p *TSExecuteStatementResp) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetQueryResult_() { + if err := oprot.WriteFieldBegin(ctx, "queryResult", thrift.LIST, 13); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:queryResult: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.QueryResult_)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.QueryResult_ { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 11:overlappedPageNum: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 13:queryResult: ", p), err) } } return err } -func (p *TSTracingInfo) Equals(other *TSTracingInfo) bool { +func (p *TSExecuteStatementResp) writeField14(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMoreData() { + if err := oprot.WriteFieldBegin(ctx, "moreData", thrift.BOOL, 14); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:moreData: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.MoreData)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.moreData (14) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 14:moreData: ", p), err) } + } + return err +} + +func (p *TSExecuteStatementResp) Equals(other *TSExecuteStatementResp) bool { if p == other { return true } else if p == nil || other == nil { return false } - if len(p.ActivityList) != len(other.ActivityList) { return false } - for i, _tgt := range p.ActivityList { - _src12 := other.ActivityList[i] - if _tgt != _src12 { return false } - } - if len(p.ElapsedTimeList) != len(other.ElapsedTimeList) { return false } - for i, _tgt := range p.ElapsedTimeList { - _src13 := other.ElapsedTimeList[i] - if _tgt != _src13 { return false } - } - if p.SeriesPathNum != other.SeriesPathNum { - if p.SeriesPathNum == nil || other.SeriesPathNum == nil { + if !p.Status.Equals(other.Status) { return false } + if p.QueryId != other.QueryId { + if p.QueryId == nil || other.QueryId == nil { return false } - if (*p.SeriesPathNum) != (*other.SeriesPathNum) { return false } + if (*p.QueryId) != (*other.QueryId) { return false } } - if p.SeqFileNum != other.SeqFileNum { - if p.SeqFileNum == nil || other.SeqFileNum == nil { - return false - } - if (*p.SeqFileNum) != (*other.SeqFileNum) { return false } + if len(p.Columns) != len(other.Columns) { return false } + for i, _tgt := range p.Columns { + _src19 := other.Columns[i] + if _tgt != _src19 { return false } } - if p.UnSeqFileNum != other.UnSeqFileNum { - if p.UnSeqFileNum == nil || other.UnSeqFileNum == nil { + if p.OperationType != other.OperationType { + if p.OperationType == nil || other.OperationType == nil { return false } - if (*p.UnSeqFileNum) != (*other.UnSeqFileNum) { return false } + if (*p.OperationType) != (*other.OperationType) { return false } } - if p.SequenceChunkNum != other.SequenceChunkNum { - if p.SequenceChunkNum == nil || other.SequenceChunkNum == nil { + if p.IgnoreTimeStamp != other.IgnoreTimeStamp { + if p.IgnoreTimeStamp == nil || other.IgnoreTimeStamp == nil { return false } - if (*p.SequenceChunkNum) != (*other.SequenceChunkNum) { return false } + if (*p.IgnoreTimeStamp) != (*other.IgnoreTimeStamp) { return false } } - if p.SequenceChunkPointNum != other.SequenceChunkPointNum { - if p.SequenceChunkPointNum == nil || other.SequenceChunkPointNum == nil { - return false - } - if (*p.SequenceChunkPointNum) != (*other.SequenceChunkPointNum) { return false } + if len(p.DataTypeList) != len(other.DataTypeList) { return false } + for i, _tgt := range p.DataTypeList { + _src20 := other.DataTypeList[i] + if _tgt != _src20 { return false } } - if p.UnsequenceChunkNum != other.UnsequenceChunkNum { - if p.UnsequenceChunkNum == nil || other.UnsequenceChunkNum == nil { - return false - } - if (*p.UnsequenceChunkNum) != (*other.UnsequenceChunkNum) { return false } + if !p.QueryDataSet.Equals(other.QueryDataSet) { return false } + if !p.NonAlignQueryDataSet.Equals(other.NonAlignQueryDataSet) { return false } + if len(p.ColumnNameIndexMap) != len(other.ColumnNameIndexMap) { return false } + for k, _tgt := range p.ColumnNameIndexMap { + _src21 := other.ColumnNameIndexMap[k] + if _tgt != _src21 { return false } } - if p.UnsequenceChunkPointNum != other.UnsequenceChunkPointNum { - if p.UnsequenceChunkPointNum == nil || other.UnsequenceChunkPointNum == nil { - return false - } - if (*p.UnsequenceChunkPointNum) != (*other.UnsequenceChunkPointNum) { return false } + if len(p.SgColumns) != len(other.SgColumns) { return false } + for i, _tgt := range p.SgColumns { + _src22 := other.SgColumns[i] + if _tgt != _src22 { return false } } - if p.TotalPageNum != other.TotalPageNum { - if p.TotalPageNum == nil || other.TotalPageNum == nil { - return false - } - if (*p.TotalPageNum) != (*other.TotalPageNum) { return false } + if len(p.AliasColumns) != len(other.AliasColumns) { return false } + for i, _tgt := range p.AliasColumns { + _src23 := other.AliasColumns[i] + if _tgt != _src23 { return false } } - if p.OverlappedPageNum != other.OverlappedPageNum { - if p.OverlappedPageNum == nil || other.OverlappedPageNum == nil { + if !p.TracingInfo.Equals(other.TracingInfo) { return false } + if len(p.QueryResult_) != len(other.QueryResult_) { return false } + for i, _tgt := range p.QueryResult_ { + _src24 := other.QueryResult_[i] + if bytes.Compare(_tgt, _src24) != 0 { return false } + } + if p.MoreData != other.MoreData { + if p.MoreData == nil || other.MoreData == nil { return false } - if (*p.OverlappedPageNum) != (*other.OverlappedPageNum) { return false } + if (*p.MoreData) != (*other.MoreData) { return false } } return true } -func (p *TSTracingInfo) String() string { +func (p *TSExecuteStatementResp) String() string { if p == nil { return "" } - return fmt.Sprintf("TSTracingInfo(%+v)", *p) + return fmt.Sprintf("TSExecuteStatementResp(%+v)", *p) } // Attributes: // - Status -// - QueryId -// - Columns -// - OperationType -// - IgnoreTimeStamp -// - DataTypeList -// - QueryDataSet -// - NonAlignQueryDataSet -// - ColumnNameIndexMap -// - SgColumns -// - AliasColumns -// - TracingInfo -type TSExecuteStatementResp struct { - Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` - QueryId *int64 `thrift:"queryId,2" db:"queryId" json:"queryId,omitempty"` - Columns []string `thrift:"columns,3" db:"columns" json:"columns,omitempty"` - OperationType *string `thrift:"operationType,4" db:"operationType" json:"operationType,omitempty"` - IgnoreTimeStamp *bool `thrift:"ignoreTimeStamp,5" db:"ignoreTimeStamp" json:"ignoreTimeStamp,omitempty"` - DataTypeList []string `thrift:"dataTypeList,6" db:"dataTypeList" json:"dataTypeList,omitempty"` - QueryDataSet *TSQueryDataSet `thrift:"queryDataSet,7" db:"queryDataSet" json:"queryDataSet,omitempty"` - NonAlignQueryDataSet *TSQueryNonAlignDataSet `thrift:"nonAlignQueryDataSet,8" db:"nonAlignQueryDataSet" json:"nonAlignQueryDataSet,omitempty"` - ColumnNameIndexMap map[string]int32 `thrift:"columnNameIndexMap,9" db:"columnNameIndexMap" json:"columnNameIndexMap,omitempty"` - SgColumns []string `thrift:"sgColumns,10" db:"sgColumns" json:"sgColumns,omitempty"` - AliasColumns []int8 `thrift:"aliasColumns,11" db:"aliasColumns" json:"aliasColumns,omitempty"` - TracingInfo *TSTracingInfo `thrift:"tracingInfo,12" db:"tracingInfo" json:"tracingInfo,omitempty"` +// - ServerProtocolVersion +// - SessionId +// - Configuration +type TSOpenSessionResp struct { + Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` + ServerProtocolVersion TSProtocolVersion `thrift:"serverProtocolVersion,2,required" db:"serverProtocolVersion" json:"serverProtocolVersion"` + SessionId *int64 `thrift:"sessionId,3" db:"sessionId" json:"sessionId,omitempty"` + Configuration map[string]string `thrift:"configuration,4" db:"configuration" json:"configuration,omitempty"` } -func NewTSExecuteStatementResp() *TSExecuteStatementResp { - return &TSExecuteStatementResp{} +func NewTSOpenSessionResp() *TSOpenSessionResp { + return &TSOpenSessionResp{ +ServerProtocolVersion: 0, +} } -var TSExecuteStatementResp_Status_DEFAULT *TSStatus -func (p *TSExecuteStatementResp) GetStatus() *TSStatus { +var TSOpenSessionResp_Status_DEFAULT *common.TSStatus +func (p *TSOpenSessionResp) GetStatus() *common.TSStatus { if !p.IsSetStatus() { - return TSExecuteStatementResp_Status_DEFAULT + return TSOpenSessionResp_Status_DEFAULT } return p.Status } -var TSExecuteStatementResp_QueryId_DEFAULT int64 -func (p *TSExecuteStatementResp) GetQueryId() int64 { - if !p.IsSetQueryId() { - return TSExecuteStatementResp_QueryId_DEFAULT - } -return *p.QueryId -} -var TSExecuteStatementResp_Columns_DEFAULT []string - -func (p *TSExecuteStatementResp) GetColumns() []string { - return p.Columns -} -var TSExecuteStatementResp_OperationType_DEFAULT string -func (p *TSExecuteStatementResp) GetOperationType() string { - if !p.IsSetOperationType() { - return TSExecuteStatementResp_OperationType_DEFAULT - } -return *p.OperationType -} -var TSExecuteStatementResp_IgnoreTimeStamp_DEFAULT bool -func (p *TSExecuteStatementResp) GetIgnoreTimeStamp() bool { - if !p.IsSetIgnoreTimeStamp() { - return TSExecuteStatementResp_IgnoreTimeStamp_DEFAULT - } -return *p.IgnoreTimeStamp -} -var TSExecuteStatementResp_DataTypeList_DEFAULT []string -func (p *TSExecuteStatementResp) GetDataTypeList() []string { - return p.DataTypeList -} -var TSExecuteStatementResp_QueryDataSet_DEFAULT *TSQueryDataSet -func (p *TSExecuteStatementResp) GetQueryDataSet() *TSQueryDataSet { - if !p.IsSetQueryDataSet() { - return TSExecuteStatementResp_QueryDataSet_DEFAULT - } -return p.QueryDataSet +func (p *TSOpenSessionResp) GetServerProtocolVersion() TSProtocolVersion { + return p.ServerProtocolVersion } -var TSExecuteStatementResp_NonAlignQueryDataSet_DEFAULT *TSQueryNonAlignDataSet -func (p *TSExecuteStatementResp) GetNonAlignQueryDataSet() *TSQueryNonAlignDataSet { - if !p.IsSetNonAlignQueryDataSet() { - return TSExecuteStatementResp_NonAlignQueryDataSet_DEFAULT +var TSOpenSessionResp_SessionId_DEFAULT int64 +func (p *TSOpenSessionResp) GetSessionId() int64 { + if !p.IsSetSessionId() { + return TSOpenSessionResp_SessionId_DEFAULT } -return p.NonAlignQueryDataSet -} -var TSExecuteStatementResp_ColumnNameIndexMap_DEFAULT map[string]int32 - -func (p *TSExecuteStatementResp) GetColumnNameIndexMap() map[string]int32 { - return p.ColumnNameIndexMap -} -var TSExecuteStatementResp_SgColumns_DEFAULT []string - -func (p *TSExecuteStatementResp) GetSgColumns() []string { - return p.SgColumns +return *p.SessionId } -var TSExecuteStatementResp_AliasColumns_DEFAULT []int8 +var TSOpenSessionResp_Configuration_DEFAULT map[string]string -func (p *TSExecuteStatementResp) GetAliasColumns() []int8 { - return p.AliasColumns -} -var TSExecuteStatementResp_TracingInfo_DEFAULT *TSTracingInfo -func (p *TSExecuteStatementResp) GetTracingInfo() *TSTracingInfo { - if !p.IsSetTracingInfo() { - return TSExecuteStatementResp_TracingInfo_DEFAULT - } -return p.TracingInfo +func (p *TSOpenSessionResp) GetConfiguration() map[string]string { + return p.Configuration } -func (p *TSExecuteStatementResp) IsSetStatus() bool { +func (p *TSOpenSessionResp) IsSetStatus() bool { return p.Status != nil } -func (p *TSExecuteStatementResp) IsSetQueryId() bool { - return p.QueryId != nil -} - -func (p *TSExecuteStatementResp) IsSetColumns() bool { - return p.Columns != nil -} - -func (p *TSExecuteStatementResp) IsSetOperationType() bool { - return p.OperationType != nil -} - -func (p *TSExecuteStatementResp) IsSetIgnoreTimeStamp() bool { - return p.IgnoreTimeStamp != nil -} - -func (p *TSExecuteStatementResp) IsSetDataTypeList() bool { - return p.DataTypeList != nil -} - -func (p *TSExecuteStatementResp) IsSetQueryDataSet() bool { - return p.QueryDataSet != nil -} - -func (p *TSExecuteStatementResp) IsSetNonAlignQueryDataSet() bool { - return p.NonAlignQueryDataSet != nil -} - -func (p *TSExecuteStatementResp) IsSetColumnNameIndexMap() bool { - return p.ColumnNameIndexMap != nil -} - -func (p *TSExecuteStatementResp) IsSetSgColumns() bool { - return p.SgColumns != nil -} - -func (p *TSExecuteStatementResp) IsSetAliasColumns() bool { - return p.AliasColumns != nil +func (p *TSOpenSessionResp) IsSetSessionId() bool { + return p.SessionId != nil } -func (p *TSExecuteStatementResp) IsSetTracingInfo() bool { - return p.TracingInfo != nil +func (p *TSOpenSessionResp) IsSetConfiguration() bool { + return p.Configuration != nil } -func (p *TSExecuteStatementResp) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSOpenSessionResp) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetStatus bool = false; + var issetServerProtocolVersion bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -1769,17 +2187,18 @@ func (p *TSExecuteStatementResp) Read(ctx context.Context, iprot thrift.TProtoco } } case 2: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.I32 { if err := p.ReadField2(ctx, iprot); err != nil { return err } + issetServerProtocolVersion = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I64 { if err := p.ReadField3(ctx, iprot); err != nil { return err } @@ -1789,7 +2208,7 @@ func (p *TSExecuteStatementResp) Read(ctx context.Context, iprot thrift.TProtoco } } case 4: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.MAP { if err := p.ReadField4(ctx, iprot); err != nil { return err } @@ -1798,89 +2217,9 @@ func (p *TSExecuteStatementResp) Read(ctx context.Context, iprot thrift.TProtoco return err } } - case 5: - if fieldTypeId == thrift.BOOL { - if err := p.ReadField5(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 6: - if fieldTypeId == thrift.LIST { - if err := p.ReadField6(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 7: - if fieldTypeId == thrift.STRUCT { - if err := p.ReadField7(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 8: - if fieldTypeId == thrift.STRUCT { - if err := p.ReadField8(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 9: - if fieldTypeId == thrift.MAP { - if err := p.ReadField9(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 10: - if fieldTypeId == thrift.LIST { - if err := p.ReadField10(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 11: - if fieldTypeId == thrift.LIST { - if err := p.ReadField11(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 12: - if fieldTypeId == thrift.STRUCT { - if err := p.ReadField12(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err } } if err := iprot.ReadFieldEnd(ctx); err != nil { @@ -1893,125 +2232,60 @@ func (p *TSExecuteStatementResp) Read(ctx context.Context, iprot thrift.TProtoco if !issetStatus{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); } + if !issetServerProtocolVersion{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ServerProtocolVersion is not set")); + } return nil } -func (p *TSExecuteStatementResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Status = &TSStatus{} +func (p *TSOpenSessionResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Status = &common.TSStatus{} if err := p.Status.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) } return nil } -func (p *TSExecuteStatementResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *TSOpenSessionResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { - p.QueryId = &v -} - return nil -} - -func (p *TSExecuteStatementResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.Columns = tSlice - for i := 0; i < size; i ++ { -var _elem14 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _elem14 = v -} - p.Columns = append(p.Columns, _elem14) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TSExecuteStatementResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 4: ", err) -} else { - p.OperationType = &v -} - return nil -} - -func (p *TSExecuteStatementResp) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { - return thrift.PrependError("error reading field 5: ", err) -} else { - p.IgnoreTimeStamp = &v + temp := TSProtocolVersion(v) + p.ServerProtocolVersion = temp } return nil } -func (p *TSExecuteStatementResp) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.DataTypeList = tSlice - for i := 0; i < size; i ++ { -var _elem15 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSOpenSessionResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) } else { - _elem15 = v -} - p.DataTypeList = append(p.DataTypeList, _elem15) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TSExecuteStatementResp) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - p.QueryDataSet = &TSQueryDataSet{} - if err := p.QueryDataSet.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.QueryDataSet), err) - } - return nil + p.SessionId = &v } - -func (p *TSExecuteStatementResp) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { - p.NonAlignQueryDataSet = &TSQueryNonAlignDataSet{} - if err := p.NonAlignQueryDataSet.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NonAlignQueryDataSet), err) - } return nil } -func (p *TSExecuteStatementResp) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSOpenSessionResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { _, _, size, err := iprot.ReadMapBegin(ctx) if err != nil { return thrift.PrependError("error reading map begin: ", err) } - tMap := make(map[string]int32, size) - p.ColumnNameIndexMap = tMap + tMap := make(map[string]string, size) + p.Configuration = tMap for i := 0; i < size; i ++ { -var _key16 string +var _key25 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key16 = v + _key25 = v } -var _val17 int32 - if v, err := iprot.ReadI32(ctx); err != nil { +var _val26 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val17 = v + _val26 = v } - p.ColumnNameIndexMap[_key16] = _val17 + p.Configuration[_key25] = _val26 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) @@ -2019,75 +2293,14 @@ var _val17 int32 return nil } -func (p *TSExecuteStatementResp) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.SgColumns = tSlice - for i := 0; i < size; i ++ { -var _elem18 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _elem18 = v -} - p.SgColumns = append(p.SgColumns, _elem18) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TSExecuteStatementResp) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int8, 0, size) - p.AliasColumns = tSlice - for i := 0; i < size; i ++ { -var _elem19 int8 - if v, err := iprot.ReadByte(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - temp := int8(v) - _elem19 = temp -} - p.AliasColumns = append(p.AliasColumns, _elem19) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TSExecuteStatementResp) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { - p.TracingInfo = &TSTracingInfo{} - if err := p.TracingInfo.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TracingInfo), err) - } - return nil -} - -func (p *TSExecuteStatementResp) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSExecuteStatementResp"); err != nil { +func (p *TSOpenSessionResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSOpenSessionResp"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } if err := p.writeField3(ctx, oprot); err != nil { return err } if err := p.writeField4(ctx, oprot); err != nil { return err } - if err := p.writeField5(ctx, oprot); err != nil { return err } - if err := p.writeField6(ctx, oprot); err != nil { return err } - if err := p.writeField7(ctx, oprot); err != nil { return err } - if err := p.writeField8(ctx, oprot); err != nil { return err } - if err := p.writeField9(ctx, oprot); err != nil { return err } - if err := p.writeField10(ctx, oprot); err != nil { return err } - if err := p.writeField11(ctx, oprot); err != nil { return err } - if err := p.writeField12(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -2096,7 +2309,7 @@ func (p *TSExecuteStatementResp) Write(ctx context.Context, oprot thrift.TProtoc return nil } -func (p *TSExecuteStatementResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSOpenSessionResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } if err := p.Status.Write(ctx, oprot); err != nil { @@ -2107,306 +2320,139 @@ func (p *TSExecuteStatementResp) writeField1(ctx context.Context, oprot thrift.T return err } -func (p *TSExecuteStatementResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetQueryId() { - if err := oprot.WriteFieldBegin(ctx, "queryId", thrift.I64, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.QueryId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.queryId (2) field write error: ", p), err) } +func (p *TSOpenSessionResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "serverProtocolVersion", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:serverProtocolVersion: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.ServerProtocolVersion)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.serverProtocolVersion (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:serverProtocolVersion: ", p), err) } + return err +} + +func (p *TSOpenSessionResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSessionId() { + if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:sessionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.SessionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sessionId (3) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryId: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:sessionId: ", p), err) } } return err } -func (p *TSExecuteStatementResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetColumns() { - if err := oprot.WriteFieldBegin(ctx, "columns", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:columns: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Columns)); err != nil { - return thrift.PrependError("error writing list begin: ", err) +func (p *TSOpenSessionResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetConfiguration() { + if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:configuration: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configuration)); err != nil { + return thrift.PrependError("error writing map begin: ", err) } - for _, v := range p.Columns { + for k, v := range p.Configuration { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } if err := oprot.WriteString(ctx, string(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:columns: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:configuration: ", p), err) } } return err } -func (p *TSExecuteStatementResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetOperationType() { - if err := oprot.WriteFieldBegin(ctx, "operationType", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:operationType: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.OperationType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.operationType (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:operationType: ", p), err) } - } - return err -} - -func (p *TSExecuteStatementResp) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetIgnoreTimeStamp() { - if err := oprot.WriteFieldBegin(ctx, "ignoreTimeStamp", thrift.BOOL, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:ignoreTimeStamp: ", p), err) } - if err := oprot.WriteBool(ctx, bool(*p.IgnoreTimeStamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.ignoreTimeStamp (5) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:ignoreTimeStamp: ", p), err) } - } - return err -} - -func (p *TSExecuteStatementResp) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetDataTypeList() { - if err := oprot.WriteFieldBegin(ctx, "dataTypeList", thrift.LIST, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:dataTypeList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.DataTypeList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.DataTypeList { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:dataTypeList: ", p), err) } - } - return err -} - -func (p *TSExecuteStatementResp) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetQueryDataSet() { - if err := oprot.WriteFieldBegin(ctx, "queryDataSet", thrift.STRUCT, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:queryDataSet: ", p), err) } - if err := p.QueryDataSet.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.QueryDataSet), err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:queryDataSet: ", p), err) } - } - return err -} - -func (p *TSExecuteStatementResp) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetNonAlignQueryDataSet() { - if err := oprot.WriteFieldBegin(ctx, "nonAlignQueryDataSet", thrift.STRUCT, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:nonAlignQueryDataSet: ", p), err) } - if err := p.NonAlignQueryDataSet.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NonAlignQueryDataSet), err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:nonAlignQueryDataSet: ", p), err) } - } - return err -} - -func (p *TSExecuteStatementResp) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetColumnNameIndexMap() { - if err := oprot.WriteFieldBegin(ctx, "columnNameIndexMap", thrift.MAP, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:columnNameIndexMap: ", p), err) } - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.I32, len(p.ColumnNameIndexMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ColumnNameIndexMap { - if err := oprot.WriteString(ctx, string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(ctx); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:columnNameIndexMap: ", p), err) } - } - return err -} - -func (p *TSExecuteStatementResp) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetSgColumns() { - if err := oprot.WriteFieldBegin(ctx, "sgColumns", thrift.LIST, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:sgColumns: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.SgColumns)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.SgColumns { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:sgColumns: ", p), err) } - } - return err -} - -func (p *TSExecuteStatementResp) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetAliasColumns() { - if err := oprot.WriteFieldBegin(ctx, "aliasColumns", thrift.LIST, 11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:aliasColumns: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.BYTE, len(p.AliasColumns)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.AliasColumns { - if err := oprot.WriteByte(ctx, int8(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 11:aliasColumns: ", p), err) } - } - return err -} - -func (p *TSExecuteStatementResp) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetTracingInfo() { - if err := oprot.WriteFieldBegin(ctx, "tracingInfo", thrift.STRUCT, 12); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:tracingInfo: ", p), err) } - if err := p.TracingInfo.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TracingInfo), err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 12:tracingInfo: ", p), err) } - } - return err -} - -func (p *TSExecuteStatementResp) Equals(other *TSExecuteStatementResp) bool { - if p == other { - return true - } else if p == nil || other == nil { - return false +func (p *TSOpenSessionResp) Equals(other *TSOpenSessionResp) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false } if !p.Status.Equals(other.Status) { return false } - if p.QueryId != other.QueryId { - if p.QueryId == nil || other.QueryId == nil { - return false - } - if (*p.QueryId) != (*other.QueryId) { return false } - } - if len(p.Columns) != len(other.Columns) { return false } - for i, _tgt := range p.Columns { - _src20 := other.Columns[i] - if _tgt != _src20 { return false } - } - if p.OperationType != other.OperationType { - if p.OperationType == nil || other.OperationType == nil { - return false - } - if (*p.OperationType) != (*other.OperationType) { return false } - } - if p.IgnoreTimeStamp != other.IgnoreTimeStamp { - if p.IgnoreTimeStamp == nil || other.IgnoreTimeStamp == nil { + if p.ServerProtocolVersion != other.ServerProtocolVersion { return false } + if p.SessionId != other.SessionId { + if p.SessionId == nil || other.SessionId == nil { return false } - if (*p.IgnoreTimeStamp) != (*other.IgnoreTimeStamp) { return false } - } - if len(p.DataTypeList) != len(other.DataTypeList) { return false } - for i, _tgt := range p.DataTypeList { - _src21 := other.DataTypeList[i] - if _tgt != _src21 { return false } - } - if !p.QueryDataSet.Equals(other.QueryDataSet) { return false } - if !p.NonAlignQueryDataSet.Equals(other.NonAlignQueryDataSet) { return false } - if len(p.ColumnNameIndexMap) != len(other.ColumnNameIndexMap) { return false } - for k, _tgt := range p.ColumnNameIndexMap { - _src22 := other.ColumnNameIndexMap[k] - if _tgt != _src22 { return false } - } - if len(p.SgColumns) != len(other.SgColumns) { return false } - for i, _tgt := range p.SgColumns { - _src23 := other.SgColumns[i] - if _tgt != _src23 { return false } + if (*p.SessionId) != (*other.SessionId) { return false } } - if len(p.AliasColumns) != len(other.AliasColumns) { return false } - for i, _tgt := range p.AliasColumns { - _src24 := other.AliasColumns[i] - if _tgt != _src24 { return false } + if len(p.Configuration) != len(other.Configuration) { return false } + for k, _tgt := range p.Configuration { + _src27 := other.Configuration[k] + if _tgt != _src27 { return false } } - if !p.TracingInfo.Equals(other.TracingInfo) { return false } return true } -func (p *TSExecuteStatementResp) String() string { +func (p *TSOpenSessionResp) String() string { if p == nil { return "" } - return fmt.Sprintf("TSExecuteStatementResp(%+v)", *p) + return fmt.Sprintf("TSOpenSessionResp(%+v)", *p) } // Attributes: -// - Status -// - ServerProtocolVersion -// - SessionId +// - ClientProtocol +// - ZoneId +// - Username +// - Password // - Configuration -type TSOpenSessionResp struct { - Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` - ServerProtocolVersion TSProtocolVersion `thrift:"serverProtocolVersion,2,required" db:"serverProtocolVersion" json:"serverProtocolVersion"` - SessionId *int64 `thrift:"sessionId,3" db:"sessionId" json:"sessionId,omitempty"` - Configuration map[string]string `thrift:"configuration,4" db:"configuration" json:"configuration,omitempty"` +type TSOpenSessionReq struct { + ClientProtocol TSProtocolVersion `thrift:"client_protocol,1,required" db:"client_protocol" json:"client_protocol"` + ZoneId string `thrift:"zoneId,2,required" db:"zoneId" json:"zoneId"` + Username string `thrift:"username,3,required" db:"username" json:"username"` + Password *string `thrift:"password,4" db:"password" json:"password,omitempty"` + Configuration map[string]string `thrift:"configuration,5" db:"configuration" json:"configuration,omitempty"` } -func NewTSOpenSessionResp() *TSOpenSessionResp { - return &TSOpenSessionResp{ -ServerProtocolVersion: 0, +func NewTSOpenSessionReq() *TSOpenSessionReq { + return &TSOpenSessionReq{ +ClientProtocol: 2, } } -var TSOpenSessionResp_Status_DEFAULT *TSStatus -func (p *TSOpenSessionResp) GetStatus() *TSStatus { - if !p.IsSetStatus() { - return TSOpenSessionResp_Status_DEFAULT - } -return p.Status + +func (p *TSOpenSessionReq) GetClientProtocol() TSProtocolVersion { + return p.ClientProtocol } -func (p *TSOpenSessionResp) GetServerProtocolVersion() TSProtocolVersion { - return p.ServerProtocolVersion +func (p *TSOpenSessionReq) GetZoneId() string { + return p.ZoneId } -var TSOpenSessionResp_SessionId_DEFAULT int64 -func (p *TSOpenSessionResp) GetSessionId() int64 { - if !p.IsSetSessionId() { - return TSOpenSessionResp_SessionId_DEFAULT + +func (p *TSOpenSessionReq) GetUsername() string { + return p.Username +} +var TSOpenSessionReq_Password_DEFAULT string +func (p *TSOpenSessionReq) GetPassword() string { + if !p.IsSetPassword() { + return TSOpenSessionReq_Password_DEFAULT } -return *p.SessionId +return *p.Password } -var TSOpenSessionResp_Configuration_DEFAULT map[string]string +var TSOpenSessionReq_Configuration_DEFAULT map[string]string -func (p *TSOpenSessionResp) GetConfiguration() map[string]string { +func (p *TSOpenSessionReq) GetConfiguration() map[string]string { return p.Configuration } -func (p *TSOpenSessionResp) IsSetStatus() bool { - return p.Status != nil -} - -func (p *TSOpenSessionResp) IsSetSessionId() bool { - return p.SessionId != nil +func (p *TSOpenSessionReq) IsSetPassword() bool { + return p.Password != nil } -func (p *TSOpenSessionResp) IsSetConfiguration() bool { +func (p *TSOpenSessionReq) IsSetConfiguration() bool { return p.Configuration != nil } -func (p *TSOpenSessionResp) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSOpenSessionReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - var issetStatus bool = false; - var issetServerProtocolVersion bool = false; + var issetClientProtocol bool = false; + var issetZoneId bool = false; + var issetUsername bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -2416,39 +2462,40 @@ func (p *TSOpenSessionResp) Read(ctx context.Context, iprot thrift.TProtocol) er if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.STRUCT { + if fieldTypeId == thrift.I32 { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetStatus = true + issetClientProtocol = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.STRING { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetServerProtocolVersion = true + issetZoneId = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRING { if err := p.ReadField3(ctx, iprot); err != nil { return err } + issetUsername = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: - if fieldTypeId == thrift.MAP { + if fieldTypeId == thrift.STRING { if err := p.ReadField4(ctx, iprot); err != nil { return err } @@ -2457,6 +2504,16 @@ func (p *TSOpenSessionResp) Read(ctx context.Context, iprot thrift.TProtocol) er return err } } + case 5: + if fieldTypeId == thrift.MAP { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -2469,43 +2526,56 @@ func (p *TSOpenSessionResp) Read(ctx context.Context, iprot thrift.TProtocol) er if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if !issetStatus{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); + if !issetClientProtocol{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ClientProtocol is not set")); } - if !issetServerProtocolVersion{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ServerProtocolVersion is not set")); + if !issetZoneId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ZoneId is not set")); + } + if !issetUsername{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Username is not set")); } return nil } -func (p *TSOpenSessionResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Status = &TSStatus{} - if err := p.Status.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) - } +func (p *TSOpenSessionReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + temp := TSProtocolVersion(v) + p.ClientProtocol = temp +} return nil } -func (p *TSOpenSessionResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *TSOpenSessionReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { - temp := TSProtocolVersion(v) - p.ServerProtocolVersion = temp + p.ZoneId = v } return nil } -func (p *TSOpenSessionResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *TSOpenSessionReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { - p.SessionId = &v + p.Username = v } return nil } -func (p *TSOpenSessionResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSOpenSessionReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Password = &v +} + return nil +} + +func (p *TSOpenSessionReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { _, _, size, err := iprot.ReadMapBegin(ctx) if err != nil { return thrift.PrependError("error reading map begin: ", err) @@ -2513,19 +2583,19 @@ func (p *TSOpenSessionResp) ReadField4(ctx context.Context, iprot thrift.TProto tMap := make(map[string]string, size) p.Configuration = tMap for i := 0; i < size; i ++ { -var _key25 string +var _key28 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key25 = v + _key28 = v } -var _val26 string +var _val29 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val26 = v + _val29 = v } - p.Configuration[_key25] = _val26 + p.Configuration[_key28] = _val29 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) @@ -2533,14 +2603,15 @@ var _val26 string return nil } -func (p *TSOpenSessionResp) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSOpenSessionResp"); err != nil { +func (p *TSOpenSessionReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSOpenSessionReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } if err := p.writeField3(ctx, oprot); err != nil { return err } if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -2549,43 +2620,52 @@ func (p *TSOpenSessionResp) Write(ctx context.Context, oprot thrift.TProtocol) e return nil } -func (p *TSOpenSessionResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } - if err := p.Status.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) - } +func (p *TSOpenSessionReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "client_protocol", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:client_protocol: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.ClientProtocol)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.client_protocol (1) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:client_protocol: ", p), err) } return err } -func (p *TSOpenSessionResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "serverProtocolVersion", thrift.I32, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:serverProtocolVersion: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.ServerProtocolVersion)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.serverProtocolVersion (2) field write error: ", p), err) } +func (p *TSOpenSessionReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "zoneId", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:zoneId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ZoneId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.zoneId (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:serverProtocolVersion: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:zoneId: ", p), err) } return err } -func (p *TSOpenSessionResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetSessionId() { - if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:sessionId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.SessionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sessionId (3) field write error: ", p), err) } +func (p *TSOpenSessionReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "username", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:username: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Username)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.username (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:username: ", p), err) } + return err +} + +func (p *TSOpenSessionReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPassword() { + if err := oprot.WriteFieldBegin(ctx, "password", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:password: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Password)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.password (4) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:sessionId: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:password: ", p), err) } } return err } -func (p *TSOpenSessionResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSOpenSessionReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetConfiguration() { - if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:configuration: ", p), err) } + if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:configuration: ", p), err) } if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configuration)); err != nil { return thrift.PrependError("error writing map begin: ", err) } @@ -2599,106 +2679,61 @@ func (p *TSOpenSessionResp) writeField4(ctx context.Context, oprot thrift.TProto return thrift.PrependError("error writing map end: ", err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:configuration: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:configuration: ", p), err) } } return err } -func (p *TSOpenSessionResp) Equals(other *TSOpenSessionResp) bool { +func (p *TSOpenSessionReq) Equals(other *TSOpenSessionReq) bool { if p == other { return true } else if p == nil || other == nil { return false } - if !p.Status.Equals(other.Status) { return false } - if p.ServerProtocolVersion != other.ServerProtocolVersion { return false } - if p.SessionId != other.SessionId { - if p.SessionId == nil || other.SessionId == nil { + if p.ClientProtocol != other.ClientProtocol { return false } + if p.ZoneId != other.ZoneId { return false } + if p.Username != other.Username { return false } + if p.Password != other.Password { + if p.Password == nil || other.Password == nil { return false } - if (*p.SessionId) != (*other.SessionId) { return false } + if (*p.Password) != (*other.Password) { return false } } if len(p.Configuration) != len(other.Configuration) { return false } for k, _tgt := range p.Configuration { - _src27 := other.Configuration[k] - if _tgt != _src27 { return false } + _src30 := other.Configuration[k] + if _tgt != _src30 { return false } } return true } -func (p *TSOpenSessionResp) String() string { +func (p *TSOpenSessionReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSOpenSessionResp(%+v)", *p) + return fmt.Sprintf("TSOpenSessionReq(%+v)", *p) } // Attributes: -// - ClientProtocol -// - ZoneId -// - Username -// - Password -// - Configuration -type TSOpenSessionReq struct { - ClientProtocol TSProtocolVersion `thrift:"client_protocol,1,required" db:"client_protocol" json:"client_protocol"` - ZoneId string `thrift:"zoneId,2,required" db:"zoneId" json:"zoneId"` - Username *string `thrift:"username,3" db:"username" json:"username,omitempty"` - Password *string `thrift:"password,4" db:"password" json:"password,omitempty"` - Configuration map[string]string `thrift:"configuration,5" db:"configuration" json:"configuration,omitempty"` -} - -func NewTSOpenSessionReq() *TSOpenSessionReq { - return &TSOpenSessionReq{ -ClientProtocol: 2, -} -} - - -func (p *TSOpenSessionReq) GetClientProtocol() TSProtocolVersion { - return p.ClientProtocol -} - -func (p *TSOpenSessionReq) GetZoneId() string { - return p.ZoneId -} -var TSOpenSessionReq_Username_DEFAULT string -func (p *TSOpenSessionReq) GetUsername() string { - if !p.IsSetUsername() { - return TSOpenSessionReq_Username_DEFAULT - } -return *p.Username -} -var TSOpenSessionReq_Password_DEFAULT string -func (p *TSOpenSessionReq) GetPassword() string { - if !p.IsSetPassword() { - return TSOpenSessionReq_Password_DEFAULT - } -return *p.Password +// - SessionId +type TSCloseSessionReq struct { + SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` } -var TSOpenSessionReq_Configuration_DEFAULT map[string]string -func (p *TSOpenSessionReq) GetConfiguration() map[string]string { - return p.Configuration -} -func (p *TSOpenSessionReq) IsSetUsername() bool { - return p.Username != nil +func NewTSCloseSessionReq() *TSCloseSessionReq { + return &TSCloseSessionReq{} } -func (p *TSOpenSessionReq) IsSetPassword() bool { - return p.Password != nil -} -func (p *TSOpenSessionReq) IsSetConfiguration() bool { - return p.Configuration != nil +func (p *TSCloseSessionReq) GetSessionId() int64 { + return p.SessionId } - -func (p *TSOpenSessionReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCloseSessionReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - var issetClientProtocol bool = false; - var issetZoneId bool = false; + var issetSessionId bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -2708,295 +2743,11 @@ func (p *TSOpenSessionReq) Read(ctx context.Context, iprot thrift.TProtocol) err if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.I64 { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetClientProtocol = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 2: - if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { - return err - } - issetZoneId = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 3: - if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 4: - if fieldTypeId == thrift.STRING { - if err := p.ReadField4(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 5: - if fieldTypeId == thrift.MAP { - if err := p.ReadField5(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(ctx); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetClientProtocol{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ClientProtocol is not set")); - } - if !issetZoneId{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ZoneId is not set")); - } - return nil -} - -func (p *TSOpenSessionReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) -} else { - temp := TSProtocolVersion(v) - p.ClientProtocol = temp -} - return nil -} - -func (p *TSOpenSessionReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) -} else { - p.ZoneId = v -} - return nil -} - -func (p *TSOpenSessionReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) -} else { - p.Username = &v -} - return nil -} - -func (p *TSOpenSessionReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 4: ", err) -} else { - p.Password = &v -} - return nil -} - -func (p *TSOpenSessionReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin(ctx) - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.Configuration = tMap - for i := 0; i < size; i ++ { -var _key28 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _key28 = v -} -var _val29 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _val29 = v -} - p.Configuration[_key28] = _val29 - } - if err := iprot.ReadMapEnd(ctx); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TSOpenSessionReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSOpenSessionReq"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } - if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } - if err := p.writeField3(ctx, oprot); err != nil { return err } - if err := p.writeField4(ctx, oprot); err != nil { return err } - if err := p.writeField5(ctx, oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(ctx); err != nil { - return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { - return thrift.PrependError("write struct stop error: ", err) } - return nil -} - -func (p *TSOpenSessionReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "client_protocol", thrift.I32, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:client_protocol: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.ClientProtocol)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.client_protocol (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:client_protocol: ", p), err) } - return err -} - -func (p *TSOpenSessionReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "zoneId", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:zoneId: ", p), err) } - if err := oprot.WriteString(ctx, string(p.ZoneId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.zoneId (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:zoneId: ", p), err) } - return err -} - -func (p *TSOpenSessionReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetUsername() { - if err := oprot.WriteFieldBegin(ctx, "username", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:username: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Username)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.username (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:username: ", p), err) } - } - return err -} - -func (p *TSOpenSessionReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetPassword() { - if err := oprot.WriteFieldBegin(ctx, "password", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:password: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Password)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.password (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:password: ", p), err) } - } - return err -} - -func (p *TSOpenSessionReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetConfiguration() { - if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:configuration: ", p), err) } - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configuration)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Configuration { - if err := oprot.WriteString(ctx, string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(ctx); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:configuration: ", p), err) } - } - return err -} - -func (p *TSOpenSessionReq) Equals(other *TSOpenSessionReq) bool { - if p == other { - return true - } else if p == nil || other == nil { - return false - } - if p.ClientProtocol != other.ClientProtocol { return false } - if p.ZoneId != other.ZoneId { return false } - if p.Username != other.Username { - if p.Username == nil || other.Username == nil { - return false - } - if (*p.Username) != (*other.Username) { return false } - } - if p.Password != other.Password { - if p.Password == nil || other.Password == nil { - return false - } - if (*p.Password) != (*other.Password) { return false } - } - if len(p.Configuration) != len(other.Configuration) { return false } - for k, _tgt := range p.Configuration { - _src30 := other.Configuration[k] - if _tgt != _src30 { return false } - } - return true -} - -func (p *TSOpenSessionReq) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TSOpenSessionReq(%+v)", *p) -} - -// Attributes: -// - SessionId -type TSCloseSessionReq struct { - SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` -} - -func NewTSCloseSessionReq() *TSCloseSessionReq { - return &TSCloseSessionReq{} -} - - -func (p *TSCloseSessionReq) GetSessionId() int64 { - return p.SessionId -} -func (p *TSCloseSessionReq) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetSessionId bool = false; - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { break; } - switch fieldId { - case 1: - if fieldTypeId == thrift.I64 { - if err := p.ReadField1(ctx, iprot); err != nil { - return err - } - issetSessionId = true + issetSessionId = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -4471,20 +4222,24 @@ func (p *TSFetchResultsReq) String() string { // - IsAlign // - QueryDataSet // - NonAlignQueryDataSet +// - QueryResult_ +// - MoreData type TSFetchResultsResp struct { - Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` + Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` HasResultSet bool `thrift:"hasResultSet,2,required" db:"hasResultSet" json:"hasResultSet"` IsAlign bool `thrift:"isAlign,3,required" db:"isAlign" json:"isAlign"` QueryDataSet *TSQueryDataSet `thrift:"queryDataSet,4" db:"queryDataSet" json:"queryDataSet,omitempty"` NonAlignQueryDataSet *TSQueryNonAlignDataSet `thrift:"nonAlignQueryDataSet,5" db:"nonAlignQueryDataSet" json:"nonAlignQueryDataSet,omitempty"` + QueryResult_ [][]byte `thrift:"queryResult,6" db:"queryResult" json:"queryResult,omitempty"` + MoreData *bool `thrift:"moreData,7" db:"moreData" json:"moreData,omitempty"` } func NewTSFetchResultsResp() *TSFetchResultsResp { return &TSFetchResultsResp{} } -var TSFetchResultsResp_Status_DEFAULT *TSStatus -func (p *TSFetchResultsResp) GetStatus() *TSStatus { +var TSFetchResultsResp_Status_DEFAULT *common.TSStatus +func (p *TSFetchResultsResp) GetStatus() *common.TSStatus { if !p.IsSetStatus() { return TSFetchResultsResp_Status_DEFAULT } @@ -4512,6 +4267,18 @@ func (p *TSFetchResultsResp) GetNonAlignQueryDataSet() *TSQueryNonAlignDataSet { } return p.NonAlignQueryDataSet } +var TSFetchResultsResp_QueryResult__DEFAULT [][]byte + +func (p *TSFetchResultsResp) GetQueryResult_() [][]byte { + return p.QueryResult_ +} +var TSFetchResultsResp_MoreData_DEFAULT bool +func (p *TSFetchResultsResp) GetMoreData() bool { + if !p.IsSetMoreData() { + return TSFetchResultsResp_MoreData_DEFAULT + } +return *p.MoreData +} func (p *TSFetchResultsResp) IsSetStatus() bool { return p.Status != nil } @@ -4524,6 +4291,14 @@ func (p *TSFetchResultsResp) IsSetNonAlignQueryDataSet() bool { return p.NonAlignQueryDataSet != nil } +func (p *TSFetchResultsResp) IsSetQueryResult_() bool { + return p.QueryResult_ != nil +} + +func (p *TSFetchResultsResp) IsSetMoreData() bool { + return p.MoreData != nil +} + func (p *TSFetchResultsResp) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) @@ -4593,15 +4368,35 @@ func (p *TSFetchResultsResp) Read(ctx context.Context, iprot thrift.TProtocol) e return err } } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err + case 6: + if fieldTypeId == thrift.LIST { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } } - } - if err := iprot.ReadFieldEnd(ctx); err != nil { - return err - } - } + case 7: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } @@ -4618,7 +4413,7 @@ func (p *TSFetchResultsResp) Read(ctx context.Context, iprot thrift.TProtocol) e } func (p *TSFetchResultsResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Status = &TSStatus{} + p.Status = &common.TSStatus{} if err := p.Status.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) } @@ -4659,6 +4454,37 @@ func (p *TSFetchResultsResp) ReadField5(ctx context.Context, iprot thrift.TProt return nil } +func (p *TSFetchResultsResp) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.QueryResult_ = tSlice + for i := 0; i < size; i ++ { +var _elem33 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem33 = v +} + p.QueryResult_ = append(p.QueryResult_, _elem33) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSFetchResultsResp) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.MoreData = &v +} + return nil +} + func (p *TSFetchResultsResp) Write(ctx context.Context, oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin(ctx, "TSFetchResultsResp"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } @@ -4668,6 +4494,8 @@ func (p *TSFetchResultsResp) Write(ctx context.Context, oprot thrift.TProtocol) if err := p.writeField3(ctx, oprot); err != nil { return err } if err := p.writeField4(ctx, oprot); err != nil { return err } if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -4733,6 +4561,38 @@ func (p *TSFetchResultsResp) writeField5(ctx context.Context, oprot thrift.TProt return err } +func (p *TSFetchResultsResp) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetQueryResult_() { + if err := oprot.WriteFieldBegin(ctx, "queryResult", thrift.LIST, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:queryResult: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.QueryResult_)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.QueryResult_ { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:queryResult: ", p), err) } + } + return err +} + +func (p *TSFetchResultsResp) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMoreData() { + if err := oprot.WriteFieldBegin(ctx, "moreData", thrift.BOOL, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:moreData: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.MoreData)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.moreData (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:moreData: ", p), err) } + } + return err +} + func (p *TSFetchResultsResp) Equals(other *TSFetchResultsResp) bool { if p == other { return true @@ -4744,6 +4604,17 @@ func (p *TSFetchResultsResp) Equals(other *TSFetchResultsResp) bool { if p.IsAlign != other.IsAlign { return false } if !p.QueryDataSet.Equals(other.QueryDataSet) { return false } if !p.NonAlignQueryDataSet.Equals(other.NonAlignQueryDataSet) { return false } + if len(p.QueryResult_) != len(other.QueryResult_) { return false } + for i, _tgt := range p.QueryResult_ { + _src34 := other.QueryResult_[i] + if bytes.Compare(_tgt, _src34) != 0 { return false } + } + if p.MoreData != other.MoreData { + if p.MoreData == nil || other.MoreData == nil { + return false + } + if (*p.MoreData) != (*other.MoreData) { return false } + } return true } @@ -4760,7 +4631,7 @@ func (p *TSFetchResultsResp) String() string { // - ColumnsList // - DataType type TSFetchMetadataResp struct { - Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` + Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` MetadataInJson *string `thrift:"metadataInJson,2" db:"metadataInJson" json:"metadataInJson,omitempty"` ColumnsList []string `thrift:"columnsList,3" db:"columnsList" json:"columnsList,omitempty"` DataType *string `thrift:"dataType,4" db:"dataType" json:"dataType,omitempty"` @@ -4770,8 +4641,8 @@ func NewTSFetchMetadataResp() *TSFetchMetadataResp { return &TSFetchMetadataResp{} } -var TSFetchMetadataResp_Status_DEFAULT *TSStatus -func (p *TSFetchMetadataResp) GetStatus() *TSStatus { +var TSFetchMetadataResp_Status_DEFAULT *common.TSStatus +func (p *TSFetchMetadataResp) GetStatus() *common.TSStatus { if !p.IsSetStatus() { return TSFetchMetadataResp_Status_DEFAULT } @@ -4886,7 +4757,7 @@ func (p *TSFetchMetadataResp) Read(ctx context.Context, iprot thrift.TProtocol) } func (p *TSFetchMetadataResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Status = &TSStatus{} + p.Status = &common.TSStatus{} if err := p.Status.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) } @@ -4910,13 +4781,13 @@ func (p *TSFetchMetadataResp) ReadField3(ctx context.Context, iprot thrift.TPro tSlice := make([]string, 0, size) p.ColumnsList = tSlice for i := 0; i < size; i ++ { -var _elem33 string +var _elem35 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem33 = v + _elem35 = v } - p.ColumnsList = append(p.ColumnsList, _elem33) + p.ColumnsList = append(p.ColumnsList, _elem35) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -5019,8 +4890,8 @@ func (p *TSFetchMetadataResp) Equals(other *TSFetchMetadataResp) bool { } if len(p.ColumnsList) != len(other.ColumnsList) { return false } for i, _tgt := range p.ColumnsList { - _src34 := other.ColumnsList[i] - if _tgt != _src34 { return false } + _src36 := other.ColumnsList[i] + if _tgt != _src36 { return false } } if p.DataType != other.DataType { if p.DataType == nil || other.DataType == nil { @@ -5241,7 +5112,7 @@ func (p *TSFetchMetadataReq) String() string { // - Status // - TimeZone type TSGetTimeZoneResp struct { - Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` + Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` TimeZone string `thrift:"timeZone,2,required" db:"timeZone" json:"timeZone"` } @@ -5249,8 +5120,8 @@ func NewTSGetTimeZoneResp() *TSGetTimeZoneResp { return &TSGetTimeZoneResp{} } -var TSGetTimeZoneResp_Status_DEFAULT *TSStatus -func (p *TSGetTimeZoneResp) GetStatus() *TSStatus { +var TSGetTimeZoneResp_Status_DEFAULT *common.TSStatus +func (p *TSGetTimeZoneResp) GetStatus() *common.TSStatus { if !p.IsSetStatus() { return TSGetTimeZoneResp_Status_DEFAULT } @@ -5323,7 +5194,7 @@ func (p *TSGetTimeZoneResp) Read(ctx context.Context, iprot thrift.TProtocol) er } func (p *TSGetTimeZoneResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Status = &TSStatus{} + p.Status = &common.TSStatus{} if err := p.Status.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) } @@ -5730,13 +5601,13 @@ func (p *TSInsertRecordReq) ReadField3(ctx context.Context, iprot thrift.TProto tSlice := make([]string, 0, size) p.Measurements = tSlice for i := 0; i < size; i ++ { -var _elem35 string +var _elem37 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem35 = v + _elem37 = v } - p.Measurements = append(p.Measurements, _elem35) + p.Measurements = append(p.Measurements, _elem37) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -5869,8 +5740,8 @@ func (p *TSInsertRecordReq) Equals(other *TSInsertRecordReq) bool { if p.PrefixPath != other.PrefixPath { return false } if len(p.Measurements) != len(other.Measurements) { return false } for i, _tgt := range p.Measurements { - _src36 := other.Measurements[i] - if _tgt != _src36 { return false } + _src38 := other.Measurements[i] + if _tgt != _src38 { return false } } if bytes.Compare(p.Values, other.Values) != 0 { return false } if p.Timestamp != other.Timestamp { return false } @@ -5897,6 +5768,7 @@ func (p *TSInsertRecordReq) String() string { // - Values // - Timestamp // - IsAligned +// - Timeout type TSInsertStringRecordReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` @@ -5904,6 +5776,7 @@ type TSInsertStringRecordReq struct { Values []string `thrift:"values,4,required" db:"values" json:"values"` Timestamp int64 `thrift:"timestamp,5,required" db:"timestamp" json:"timestamp"` IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` + Timeout *int64 `thrift:"timeout,7" db:"timeout" json:"timeout,omitempty"` } func NewTSInsertStringRecordReq() *TSInsertStringRecordReq { @@ -5937,10 +5810,21 @@ func (p *TSInsertStringRecordReq) GetIsAligned() bool { } return *p.IsAligned } +var TSInsertStringRecordReq_Timeout_DEFAULT int64 +func (p *TSInsertStringRecordReq) GetTimeout() int64 { + if !p.IsSetTimeout() { + return TSInsertStringRecordReq_Timeout_DEFAULT + } +return *p.Timeout +} func (p *TSInsertStringRecordReq) IsSetIsAligned() bool { return p.IsAligned != nil } +func (p *TSInsertStringRecordReq) IsSetTimeout() bool { + return p.Timeout != nil +} + func (p *TSInsertStringRecordReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) @@ -6024,6 +5908,16 @@ func (p *TSInsertStringRecordReq) Read(ctx context.Context, iprot thrift.TProtoc return err } } + case 7: + if fieldTypeId == thrift.I64 { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -6080,13 +5974,13 @@ func (p *TSInsertStringRecordReq) ReadField3(ctx context.Context, iprot thrift. tSlice := make([]string, 0, size) p.Measurements = tSlice for i := 0; i < size; i ++ { -var _elem37 string +var _elem39 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem37 = v + _elem39 = v } - p.Measurements = append(p.Measurements, _elem37) + p.Measurements = append(p.Measurements, _elem39) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -6102,13 +5996,13 @@ func (p *TSInsertStringRecordReq) ReadField4(ctx context.Context, iprot thrift. tSlice := make([]string, 0, size) p.Values = tSlice for i := 0; i < size; i ++ { -var _elem38 string +var _elem40 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem38 = v + _elem40 = v } - p.Values = append(p.Values, _elem38) + p.Values = append(p.Values, _elem40) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -6134,6 +6028,15 @@ func (p *TSInsertStringRecordReq) ReadField6(ctx context.Context, iprot thrift. return nil } +func (p *TSInsertStringRecordReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.Timeout = &v +} + return nil +} + func (p *TSInsertStringRecordReq) Write(ctx context.Context, oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } @@ -6144,6 +6047,7 @@ func (p *TSInsertStringRecordReq) Write(ctx context.Context, oprot thrift.TProto if err := p.writeField4(ctx, oprot); err != nil { return err } if err := p.writeField5(ctx, oprot); err != nil { return err } if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -6230,6 +6134,18 @@ func (p *TSInsertStringRecordReq) writeField6(ctx context.Context, oprot thrift. return err } +func (p *TSInsertStringRecordReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimeout() { + if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:timeout: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timeout (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:timeout: ", p), err) } + } + return err +} + func (p *TSInsertStringRecordReq) Equals(other *TSInsertStringRecordReq) bool { if p == other { return true @@ -6240,13 +6156,13 @@ func (p *TSInsertStringRecordReq) Equals(other *TSInsertStringRecordReq) bool { if p.PrefixPath != other.PrefixPath { return false } if len(p.Measurements) != len(other.Measurements) { return false } for i, _tgt := range p.Measurements { - _src39 := other.Measurements[i] - if _tgt != _src39 { return false } + _src41 := other.Measurements[i] + if _tgt != _src41 { return false } } if len(p.Values) != len(other.Values) { return false } for i, _tgt := range p.Values { - _src40 := other.Values[i] - if _tgt != _src40 { return false } + _src42 := other.Values[i] + if _tgt != _src42 { return false } } if p.Timestamp != other.Timestamp { return false } if p.IsAligned != other.IsAligned { @@ -6255,6 +6171,12 @@ func (p *TSInsertStringRecordReq) Equals(other *TSInsertStringRecordReq) bool { } if (*p.IsAligned) != (*other.IsAligned) { return false } } + if p.Timeout != other.Timeout { + if p.Timeout == nil || other.Timeout == nil { + return false + } + if (*p.Timeout) != (*other.Timeout) { return false } + } return true } @@ -6497,13 +6419,13 @@ func (p *TSInsertTabletReq) ReadField3(ctx context.Context, iprot thrift.TProto tSlice := make([]string, 0, size) p.Measurements = tSlice for i := 0; i < size; i ++ { -var _elem41 string +var _elem43 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem41 = v + _elem43 = v } - p.Measurements = append(p.Measurements, _elem41) + p.Measurements = append(p.Measurements, _elem43) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -6537,13 +6459,13 @@ func (p *TSInsertTabletReq) ReadField6(ctx context.Context, iprot thrift.TProto tSlice := make([]int32, 0, size) p.Types = tSlice for i := 0; i < size; i ++ { -var _elem42 int32 +var _elem44 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem42 = v + _elem44 = v } - p.Types = append(p.Types, _elem42) + p.Types = append(p.Types, _elem44) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -6697,15 +6619,15 @@ func (p *TSInsertTabletReq) Equals(other *TSInsertTabletReq) bool { if p.PrefixPath != other.PrefixPath { return false } if len(p.Measurements) != len(other.Measurements) { return false } for i, _tgt := range p.Measurements { - _src43 := other.Measurements[i] - if _tgt != _src43 { return false } + _src45 := other.Measurements[i] + if _tgt != _src45 { return false } } if bytes.Compare(p.Values, other.Values) != 0 { return false } if bytes.Compare(p.Timestamps, other.Timestamps) != 0 { return false } if len(p.Types) != len(other.Types) { return false } for i, _tgt := range p.Types { - _src44 := other.Types[i] - if _tgt != _src44 { return false } + _src46 := other.Types[i] + if _tgt != _src46 { return false } } if p.Size != other.Size { return false } if p.IsAligned != other.IsAligned { @@ -6947,13 +6869,13 @@ func (p *TSInsertTabletsReq) ReadField2(ctx context.Context, iprot thrift.TProt tSlice := make([]string, 0, size) p.PrefixPaths = tSlice for i := 0; i < size; i ++ { -var _elem45 string +var _elem47 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem45 = v + _elem47 = v } - p.PrefixPaths = append(p.PrefixPaths, _elem45) + p.PrefixPaths = append(p.PrefixPaths, _elem47) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -6974,20 +6896,20 @@ func (p *TSInsertTabletsReq) ReadField3(ctx context.Context, iprot thrift.TProt return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - _elem46 := tSlice + _elem48 := tSlice for i := 0; i < size; i ++ { -var _elem47 string +var _elem49 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem47 = v + _elem49 = v } - _elem46 = append(_elem46, _elem47) + _elem48 = append(_elem48, _elem49) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } - p.MeasurementsList = append(p.MeasurementsList, _elem46) + p.MeasurementsList = append(p.MeasurementsList, _elem48) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7003,13 +6925,13 @@ func (p *TSInsertTabletsReq) ReadField4(ctx context.Context, iprot thrift.TProt tSlice := make([][]byte, 0, size) p.ValuesList = tSlice for i := 0; i < size; i ++ { -var _elem48 []byte +var _elem50 []byte if v, err := iprot.ReadBinary(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem48 = v + _elem50 = v } - p.ValuesList = append(p.ValuesList, _elem48) + p.ValuesList = append(p.ValuesList, _elem50) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7025,13 +6947,13 @@ func (p *TSInsertTabletsReq) ReadField5(ctx context.Context, iprot thrift.TProt tSlice := make([][]byte, 0, size) p.TimestampsList = tSlice for i := 0; i < size; i ++ { -var _elem49 []byte +var _elem51 []byte if v, err := iprot.ReadBinary(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem49 = v + _elem51 = v } - p.TimestampsList = append(p.TimestampsList, _elem49) + p.TimestampsList = append(p.TimestampsList, _elem51) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7052,20 +6974,20 @@ func (p *TSInsertTabletsReq) ReadField6(ctx context.Context, iprot thrift.TProt return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]int32, 0, size) - _elem50 := tSlice + _elem52 := tSlice for i := 0; i < size; i ++ { -var _elem51 int32 +var _elem53 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem51 = v + _elem53 = v } - _elem50 = append(_elem50, _elem51) + _elem52 = append(_elem52, _elem53) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } - p.TypesList = append(p.TypesList, _elem50) + p.TypesList = append(p.TypesList, _elem52) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7081,13 +7003,13 @@ func (p *TSInsertTabletsReq) ReadField7(ctx context.Context, iprot thrift.TProt tSlice := make([]int32, 0, size) p.SizeList = tSlice for i := 0; i < size; i ++ { -var _elem52 int32 +var _elem54 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem52 = v + _elem54 = v } - p.SizeList = append(p.SizeList, _elem52) + p.SizeList = append(p.SizeList, _elem54) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7279,41 +7201,41 @@ func (p *TSInsertTabletsReq) Equals(other *TSInsertTabletsReq) bool { if p.SessionId != other.SessionId { return false } if len(p.PrefixPaths) != len(other.PrefixPaths) { return false } for i, _tgt := range p.PrefixPaths { - _src53 := other.PrefixPaths[i] - if _tgt != _src53 { return false } + _src55 := other.PrefixPaths[i] + if _tgt != _src55 { return false } } if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } for i, _tgt := range p.MeasurementsList { - _src54 := other.MeasurementsList[i] - if len(_tgt) != len(_src54) { return false } + _src56 := other.MeasurementsList[i] + if len(_tgt) != len(_src56) { return false } for i, _tgt := range _tgt { - _src55 := _src54[i] - if _tgt != _src55 { return false } + _src57 := _src56[i] + if _tgt != _src57 { return false } } } if len(p.ValuesList) != len(other.ValuesList) { return false } for i, _tgt := range p.ValuesList { - _src56 := other.ValuesList[i] - if bytes.Compare(_tgt, _src56) != 0 { return false } + _src58 := other.ValuesList[i] + if bytes.Compare(_tgt, _src58) != 0 { return false } } if len(p.TimestampsList) != len(other.TimestampsList) { return false } for i, _tgt := range p.TimestampsList { - _src57 := other.TimestampsList[i] - if bytes.Compare(_tgt, _src57) != 0 { return false } + _src59 := other.TimestampsList[i] + if bytes.Compare(_tgt, _src59) != 0 { return false } } if len(p.TypesList) != len(other.TypesList) { return false } for i, _tgt := range p.TypesList { - _src58 := other.TypesList[i] - if len(_tgt) != len(_src58) { return false } + _src60 := other.TypesList[i] + if len(_tgt) != len(_src60) { return false } for i, _tgt := range _tgt { - _src59 := _src58[i] - if _tgt != _src59 { return false } + _src61 := _src60[i] + if _tgt != _src61 { return false } } } if len(p.SizeList) != len(other.SizeList) { return false } for i, _tgt := range p.SizeList { - _src60 := other.SizeList[i] - if _tgt != _src60 { return false } + _src62 := other.SizeList[i] + if _tgt != _src62 { return false } } if p.IsAligned != other.IsAligned { if p.IsAligned == nil || other.IsAligned == nil { @@ -7334,64 +7256,45 @@ func (p *TSInsertTabletsReq) String() string { // Attributes: // - SessionId // - PrefixPaths -// - MeasurementsList -// - ValuesList // - Timestamps -// - IsAligned -type TSInsertRecordsReq struct { +// - ValuesList +type TSFastInsertRecordsReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"` - MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` + // unused field # 3 ValuesList [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` - IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` } -func NewTSInsertRecordsReq() *TSInsertRecordsReq { - return &TSInsertRecordsReq{} +func NewTSFastInsertRecordsReq() *TSFastInsertRecordsReq { + return &TSFastInsertRecordsReq{} } -func (p *TSInsertRecordsReq) GetSessionId() int64 { +func (p *TSFastInsertRecordsReq) GetSessionId() int64 { return p.SessionId } -func (p *TSInsertRecordsReq) GetPrefixPaths() []string { +func (p *TSFastInsertRecordsReq) GetPrefixPaths() []string { return p.PrefixPaths } -func (p *TSInsertRecordsReq) GetMeasurementsList() [][]string { - return p.MeasurementsList +func (p *TSFastInsertRecordsReq) GetTimestamps() []int64 { + return p.Timestamps } -func (p *TSInsertRecordsReq) GetValuesList() [][]byte { +func (p *TSFastInsertRecordsReq) GetValuesList() [][]byte { return p.ValuesList } - -func (p *TSInsertRecordsReq) GetTimestamps() []int64 { - return p.Timestamps -} -var TSInsertRecordsReq_IsAligned_DEFAULT bool -func (p *TSInsertRecordsReq) GetIsAligned() bool { - if !p.IsSetIsAligned() { - return TSInsertRecordsReq_IsAligned_DEFAULT - } -return *p.IsAligned -} -func (p *TSInsertRecordsReq) IsSetIsAligned() bool { - return p.IsAligned != nil -} - -func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSFastInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; var issetPrefixPaths bool = false; - var issetMeasurementsList bool = false; - var issetValuesList bool = false; var issetTimestamps bool = false; + var issetValuesList bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -7422,12 +7325,12 @@ func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) e return err } } - case 3: + case 5: if fieldTypeId == thrift.LIST { - if err := p.ReadField3(ctx, iprot); err != nil { + if err := p.ReadField5(ctx, iprot); err != nil { return err } - issetMeasurementsList = true + issetTimestamps = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -7444,27 +7347,6 @@ func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) e return err } } - case 5: - if fieldTypeId == thrift.LIST { - if err := p.ReadField5(ctx, iprot); err != nil { - return err - } - issetTimestamps = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 6: - if fieldTypeId == thrift.BOOL { - if err := p.ReadField6(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -7483,19 +7365,16 @@ func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) e if !issetPrefixPaths{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set")); } - if !issetMeasurementsList{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set")); + if !issetTimestamps{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set")); } if !issetValuesList{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValuesList is not set")); } - if !issetTimestamps{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set")); - } return nil } -func (p *TSInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSFastInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -7504,7 +7383,7 @@ func (p *TSInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProt return nil } -func (p *TSInsertRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSFastInsertRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -7512,13 +7391,13 @@ func (p *TSInsertRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProt tSlice := make([]string, 0, size) p.PrefixPaths = tSlice for i := 0; i < size; i ++ { -var _elem61 string +var _elem63 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem61 = v + _elem63 = v } - p.PrefixPaths = append(p.PrefixPaths, _elem61) + p.PrefixPaths = append(p.PrefixPaths, _elem63) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7526,33 +7405,21 @@ var _elem61 string return nil } -func (p *TSInsertRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSFastInsertRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } - tSlice := make([][]string, 0, size) - p.MeasurementsList = tSlice + tSlice := make([]int64, 0, size) + p.Timestamps = tSlice for i := 0; i < size; i ++ { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - _elem62 := tSlice - for i := 0; i < size; i ++ { -var _elem63 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +var _elem64 int64 + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - _elem63 = v + _elem64 = v } - _elem62 = append(_elem62, _elem63) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - p.MeasurementsList = append(p.MeasurementsList, _elem62) + p.Timestamps = append(p.Timestamps, _elem64) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7560,7 +7427,7 @@ var _elem63 string return nil } -func (p *TSInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSFastInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -7568,35 +7435,13 @@ func (p *TSInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProt tSlice := make([][]byte, 0, size) p.ValuesList = tSlice for i := 0; i < size; i ++ { -var _elem64 []byte +var _elem65 []byte if v, err := iprot.ReadBinary(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) -} else { - _elem64 = v -} - p.ValuesList = append(p.ValuesList, _elem64) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TSInsertRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int64, 0, size) - p.Timestamps = tSlice - for i := 0; i < size; i ++ { -var _elem65 int64 - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) } else { _elem65 = v } - p.Timestamps = append(p.Timestamps, _elem65) + p.ValuesList = append(p.ValuesList, _elem65) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7604,25 +7449,14 @@ var _elem65 int64 return nil } -func (p *TSInsertRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { - return thrift.PrependError("error reading field 6: ", err) -} else { - p.IsAligned = &v -} - return nil -} - -func (p *TSInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsReq"); err != nil { +func (p *TSFastInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSFastInsertRecordsReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } - if err := p.writeField3(ctx, oprot); err != nil { return err } if err := p.writeField4(ctx, oprot); err != nil { return err } if err := p.writeField5(ctx, oprot); err != nil { return err } - if err := p.writeField6(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -7631,7 +7465,7 @@ func (p *TSInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) return nil } -func (p *TSInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSFastInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -7641,7 +7475,7 @@ func (p *TSInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProt return err } -func (p *TSInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSFastInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil { @@ -7659,33 +7493,7 @@ func (p *TSInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.TProt return err } -func (p *TSInsertRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.MeasurementsList { - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range v { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurementsList: ", p), err) } - return err -} - -func (p *TSInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSFastInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValuesList)); err != nil { @@ -7703,7 +7511,7 @@ func (p *TSInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.TProt return err } -func (p *TSInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSFastInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil { @@ -7721,19 +7529,7 @@ func (p *TSInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.TProt return err } -func (p *TSInsertRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetIsAligned() { - if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) } - if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) } - } - return err -} - -func (p *TSInsertRecordsReq) Equals(other *TSInsertRecordsReq) bool { +func (p *TSFastInsertRecordsReq) Equals(other *TSFastInsertRecordsReq) bool { if p == other { return true } else if p == nil || other == nil { @@ -7745,99 +7541,84 @@ func (p *TSInsertRecordsReq) Equals(other *TSInsertRecordsReq) bool { _src66 := other.PrefixPaths[i] if _tgt != _src66 { return false } } - if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } - for i, _tgt := range p.MeasurementsList { - _src67 := other.MeasurementsList[i] - if len(_tgt) != len(_src67) { return false } - for i, _tgt := range _tgt { - _src68 := _src67[i] - if _tgt != _src68 { return false } - } - } if len(p.ValuesList) != len(other.ValuesList) { return false } for i, _tgt := range p.ValuesList { - _src69 := other.ValuesList[i] - if bytes.Compare(_tgt, _src69) != 0 { return false } + _src67 := other.ValuesList[i] + if bytes.Compare(_tgt, _src67) != 0 { return false } } if len(p.Timestamps) != len(other.Timestamps) { return false } for i, _tgt := range p.Timestamps { - _src70 := other.Timestamps[i] - if _tgt != _src70 { return false } - } - if p.IsAligned != other.IsAligned { - if p.IsAligned == nil || other.IsAligned == nil { - return false - } - if (*p.IsAligned) != (*other.IsAligned) { return false } + _src68 := other.Timestamps[i] + if _tgt != _src68 { return false } } return true } -func (p *TSInsertRecordsReq) String() string { +func (p *TSFastInsertRecordsReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSInsertRecordsReq(%+v)", *p) + return fmt.Sprintf("TSFastInsertRecordsReq(%+v)", *p) } // Attributes: // - SessionId -// - PrefixPath +// - PrefixPaths // - MeasurementsList // - ValuesList // - Timestamps // - IsAligned -type TSInsertRecordsOfOneDeviceReq struct { +type TSInsertRecordsReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` + PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"` MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` ValuesList [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` } -func NewTSInsertRecordsOfOneDeviceReq() *TSInsertRecordsOfOneDeviceReq { - return &TSInsertRecordsOfOneDeviceReq{} +func NewTSInsertRecordsReq() *TSInsertRecordsReq { + return &TSInsertRecordsReq{} } -func (p *TSInsertRecordsOfOneDeviceReq) GetSessionId() int64 { +func (p *TSInsertRecordsReq) GetSessionId() int64 { return p.SessionId } -func (p *TSInsertRecordsOfOneDeviceReq) GetPrefixPath() string { - return p.PrefixPath +func (p *TSInsertRecordsReq) GetPrefixPaths() []string { + return p.PrefixPaths } -func (p *TSInsertRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { +func (p *TSInsertRecordsReq) GetMeasurementsList() [][]string { return p.MeasurementsList } -func (p *TSInsertRecordsOfOneDeviceReq) GetValuesList() [][]byte { +func (p *TSInsertRecordsReq) GetValuesList() [][]byte { return p.ValuesList } -func (p *TSInsertRecordsOfOneDeviceReq) GetTimestamps() []int64 { +func (p *TSInsertRecordsReq) GetTimestamps() []int64 { return p.Timestamps } -var TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT bool -func (p *TSInsertRecordsOfOneDeviceReq) GetIsAligned() bool { +var TSInsertRecordsReq_IsAligned_DEFAULT bool +func (p *TSInsertRecordsReq) GetIsAligned() bool { if !p.IsSetIsAligned() { - return TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT + return TSInsertRecordsReq_IsAligned_DEFAULT } return *p.IsAligned } -func (p *TSInsertRecordsOfOneDeviceReq) IsSetIsAligned() bool { +func (p *TSInsertRecordsReq) IsSetIsAligned() bool { return p.IsAligned != nil } -func (p *TSInsertRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetPrefixPath bool = false; + var issetPrefixPaths bool = false; var issetMeasurementsList bool = false; var issetValuesList bool = false; var issetTimestamps bool = false; @@ -7861,11 +7642,11 @@ func (p *TSInsertRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.T } } case 2: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.LIST { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetPrefixPath = true + issetPrefixPaths = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -7929,8 +7710,8 @@ func (p *TSInsertRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.T if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetPrefixPath{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")); + if !issetPrefixPaths{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set")); } if !issetMeasurementsList{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set")); @@ -7944,7 +7725,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.T return nil } -func (p *TSInsertRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -7953,16 +7734,29 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot t return nil } -func (p *TSInsertRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) +func (p *TSInsertRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.PrefixPaths = tSlice + for i := 0; i < size; i ++ { +var _elem69 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.PrefixPath = v + _elem69 = v } + p.PrefixPaths = append(p.PrefixPaths, _elem69) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSInsertRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -7975,20 +7769,20 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot t return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - _elem71 := tSlice + _elem70 := tSlice for i := 0; i < size; i ++ { -var _elem72 string +var _elem71 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem72 = v + _elem71 = v } - _elem71 = append(_elem71, _elem72) + _elem70 = append(_elem70, _elem71) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } - p.MeasurementsList = append(p.MeasurementsList, _elem71) + p.MeasurementsList = append(p.MeasurementsList, _elem70) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7996,7 +7790,7 @@ var _elem72 string return nil } -func (p *TSInsertRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -8004,13 +7798,13 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot t tSlice := make([][]byte, 0, size) p.ValuesList = tSlice for i := 0; i < size; i ++ { -var _elem73 []byte +var _elem72 []byte if v, err := iprot.ReadBinary(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem73 = v + _elem72 = v } - p.ValuesList = append(p.ValuesList, _elem73) + p.ValuesList = append(p.ValuesList, _elem72) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8018,7 +7812,7 @@ var _elem73 []byte return nil } -func (p *TSInsertRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -8026,13 +7820,13 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot t tSlice := make([]int64, 0, size) p.Timestamps = tSlice for i := 0; i < size; i ++ { -var _elem74 int64 +var _elem73 int64 if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem74 = v + _elem73 = v } - p.Timestamps = append(p.Timestamps, _elem74) + p.Timestamps = append(p.Timestamps, _elem73) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8040,7 +7834,7 @@ var _elem74 int64 return nil } -func (p *TSInsertRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { @@ -8049,8 +7843,8 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot t return nil } -func (p *TSInsertRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsOfOneDeviceReq"); err != nil { +func (p *TSInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -8067,7 +7861,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift. return nil } -func (p *TSInsertRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -8077,17 +7871,25 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot t return err } -func (p *TSInsertRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) } - if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) } +func (p *TSInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.PrefixPaths { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) } return err } -func (p *TSInsertRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { @@ -8113,7 +7915,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot t return err } -func (p *TSInsertRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValuesList)); err != nil { @@ -8131,7 +7933,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot t return err } -func (p *TSInsertRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil { @@ -8149,7 +7951,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot t return err } -func (p *TSInsertRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetIsAligned() { if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) } @@ -8161,14 +7963,18 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot t return err } -func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDeviceReq) bool { +func (p *TSInsertRecordsReq) Equals(other *TSInsertRecordsReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if p.PrefixPath != other.PrefixPath { return false } + if len(p.PrefixPaths) != len(other.PrefixPaths) { return false } + for i, _tgt := range p.PrefixPaths { + _src74 := other.PrefixPaths[i] + if _tgt != _src74 { return false } + } if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } for i, _tgt := range p.MeasurementsList { _src75 := other.MeasurementsList[i] @@ -8197,11 +8003,11 @@ func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDevice return true } -func (p *TSInsertRecordsOfOneDeviceReq) String() string { +func (p *TSInsertRecordsReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSInsertRecordsOfOneDeviceReq(%+v)", *p) + return fmt.Sprintf("TSInsertRecordsReq(%+v)", *p) } // Attributes: @@ -8211,51 +8017,51 @@ func (p *TSInsertRecordsOfOneDeviceReq) String() string { // - ValuesList // - Timestamps // - IsAligned -type TSInsertStringRecordsOfOneDeviceReq struct { +type TSInsertRecordsOfOneDeviceReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` - ValuesList [][]string `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` + ValuesList [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` } -func NewTSInsertStringRecordsOfOneDeviceReq() *TSInsertStringRecordsOfOneDeviceReq { - return &TSInsertStringRecordsOfOneDeviceReq{} +func NewTSInsertRecordsOfOneDeviceReq() *TSInsertRecordsOfOneDeviceReq { + return &TSInsertRecordsOfOneDeviceReq{} } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetSessionId() int64 { +func (p *TSInsertRecordsOfOneDeviceReq) GetSessionId() int64 { return p.SessionId } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetPrefixPath() string { +func (p *TSInsertRecordsOfOneDeviceReq) GetPrefixPath() string { return p.PrefixPath } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { +func (p *TSInsertRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { return p.MeasurementsList } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetValuesList() [][]string { +func (p *TSInsertRecordsOfOneDeviceReq) GetValuesList() [][]byte { return p.ValuesList } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetTimestamps() []int64 { +func (p *TSInsertRecordsOfOneDeviceReq) GetTimestamps() []int64 { return p.Timestamps } -var TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT bool -func (p *TSInsertStringRecordsOfOneDeviceReq) GetIsAligned() bool { +var TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT bool +func (p *TSInsertRecordsOfOneDeviceReq) GetIsAligned() bool { if !p.IsSetIsAligned() { - return TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT + return TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT } return *p.IsAligned } -func (p *TSInsertStringRecordsOfOneDeviceReq) IsSetIsAligned() bool { +func (p *TSInsertRecordsOfOneDeviceReq) IsSetIsAligned() bool { return p.IsAligned != nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -8368,7 +8174,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot th return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -8377,7 +8183,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField1(ctx context.Context, i return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { @@ -8386,7 +8192,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField2(ctx context.Context, i return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -8420,32 +8226,20 @@ var _elem80 string return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } - tSlice := make([][]string, 0, size) + tSlice := make([][]byte, 0, size) p.ValuesList = tSlice for i := 0; i < size; i ++ { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - _elem81 := tSlice - for i := 0; i < size; i ++ { -var _elem82 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +var _elem81 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - _elem82 = v + _elem81 = v } - _elem81 = append(_elem81, _elem82) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } p.ValuesList = append(p.ValuesList, _elem81) } if err := iprot.ReadListEnd(ctx); err != nil { @@ -8454,7 +8248,7 @@ var _elem82 string return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -8462,13 +8256,13 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField5(ctx context.Context, i tSlice := make([]int64, 0, size) p.Timestamps = tSlice for i := 0; i < size; i ++ { -var _elem83 int64 +var _elem82 int64 if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem83 = v + _elem82 = v } - p.Timestamps = append(p.Timestamps, _elem83) + p.Timestamps = append(p.Timestamps, _elem82) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8476,7 +8270,7 @@ var _elem83 int64 return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { @@ -8485,8 +8279,8 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField6(ctx context.Context, i return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsOfOneDeviceReq"); err != nil { +func (p *TSInsertRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsOfOneDeviceReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -8503,7 +8297,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Write(ctx context.Context, oprot t return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -8513,7 +8307,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField1(ctx context.Context, o return err } -func (p *TSInsertStringRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) } if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { @@ -8523,7 +8317,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField2(ctx context.Context, o return err } -func (p *TSInsertStringRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { @@ -8549,23 +8343,15 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField3(ctx context.Context, o return err } -func (p *TSInsertStringRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.ValuesList)); err != nil { + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.ValuesList)); err != nil { return thrift.PrependError("error writing list begin: ", err) } for _, v := range p.ValuesList { - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range v { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } if err := oprot.WriteListEnd(ctx); err != nil { return thrift.PrependError("error writing list end: ", err) @@ -8575,7 +8361,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField4(ctx context.Context, o return err } -func (p *TSInsertStringRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil { @@ -8593,7 +8379,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField5(ctx context.Context, o return err } -func (p *TSInsertStringRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetIsAligned() { if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) } @@ -8605,7 +8391,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField6(ctx context.Context, o return err } -func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecordsOfOneDeviceReq) bool { +func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDeviceReq) bool { if p == other { return true } else if p == nil || other == nil { @@ -8615,26 +8401,22 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecord if p.PrefixPath != other.PrefixPath { return false } if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } for i, _tgt := range p.MeasurementsList { - _src84 := other.MeasurementsList[i] - if len(_tgt) != len(_src84) { return false } + _src83 := other.MeasurementsList[i] + if len(_tgt) != len(_src83) { return false } for i, _tgt := range _tgt { - _src85 := _src84[i] - if _tgt != _src85 { return false } + _src84 := _src83[i] + if _tgt != _src84 { return false } } } if len(p.ValuesList) != len(other.ValuesList) { return false } for i, _tgt := range p.ValuesList { - _src86 := other.ValuesList[i] - if len(_tgt) != len(_src86) { return false } - for i, _tgt := range _tgt { - _src87 := _src86[i] - if _tgt != _src87 { return false } - } + _src85 := other.ValuesList[i] + if bytes.Compare(_tgt, _src85) != 0 { return false } } if len(p.Timestamps) != len(other.Timestamps) { return false } for i, _tgt := range p.Timestamps { - _src88 := other.Timestamps[i] - if _tgt != _src88 { return false } + _src86 := other.Timestamps[i] + if _tgt != _src86 { return false } } if p.IsAligned != other.IsAligned { if p.IsAligned == nil || other.IsAligned == nil { @@ -8645,71 +8427,71 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecord return true } -func (p *TSInsertStringRecordsOfOneDeviceReq) String() string { +func (p *TSInsertRecordsOfOneDeviceReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSInsertStringRecordsOfOneDeviceReq(%+v)", *p) + return fmt.Sprintf("TSInsertRecordsOfOneDeviceReq(%+v)", *p) } // Attributes: // - SessionId -// - PrefixPaths +// - PrefixPath // - MeasurementsList // - ValuesList // - Timestamps // - IsAligned -type TSInsertStringRecordsReq struct { +type TSInsertStringRecordsOfOneDeviceReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"` + PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` ValuesList [][]string `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` } -func NewTSInsertStringRecordsReq() *TSInsertStringRecordsReq { - return &TSInsertStringRecordsReq{} +func NewTSInsertStringRecordsOfOneDeviceReq() *TSInsertStringRecordsOfOneDeviceReq { + return &TSInsertStringRecordsOfOneDeviceReq{} } -func (p *TSInsertStringRecordsReq) GetSessionId() int64 { +func (p *TSInsertStringRecordsOfOneDeviceReq) GetSessionId() int64 { return p.SessionId } -func (p *TSInsertStringRecordsReq) GetPrefixPaths() []string { - return p.PrefixPaths +func (p *TSInsertStringRecordsOfOneDeviceReq) GetPrefixPath() string { + return p.PrefixPath } -func (p *TSInsertStringRecordsReq) GetMeasurementsList() [][]string { +func (p *TSInsertStringRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { return p.MeasurementsList } -func (p *TSInsertStringRecordsReq) GetValuesList() [][]string { +func (p *TSInsertStringRecordsOfOneDeviceReq) GetValuesList() [][]string { return p.ValuesList } -func (p *TSInsertStringRecordsReq) GetTimestamps() []int64 { +func (p *TSInsertStringRecordsOfOneDeviceReq) GetTimestamps() []int64 { return p.Timestamps } -var TSInsertStringRecordsReq_IsAligned_DEFAULT bool -func (p *TSInsertStringRecordsReq) GetIsAligned() bool { +var TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT bool +func (p *TSInsertStringRecordsOfOneDeviceReq) GetIsAligned() bool { if !p.IsSetIsAligned() { - return TSInsertStringRecordsReq_IsAligned_DEFAULT + return TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT } return *p.IsAligned } -func (p *TSInsertStringRecordsReq) IsSetIsAligned() bool { +func (p *TSInsertStringRecordsOfOneDeviceReq) IsSetIsAligned() bool { return p.IsAligned != nil } -func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetPrefixPaths bool = false; + var issetPrefixPath bool = false; var issetMeasurementsList bool = false; var issetValuesList bool = false; var issetTimestamps bool = false; @@ -8733,11 +8515,11 @@ func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProto } } case 2: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.STRING { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetPrefixPaths = true + issetPrefixPath = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -8801,8 +8583,8 @@ func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProto if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetPrefixPaths{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set")); + if !issetPrefixPath{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")); } if !issetMeasurementsList{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set")); @@ -8816,7 +8598,7 @@ func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProto return nil } -func (p *TSInsertStringRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -8825,29 +8607,16 @@ func (p *TSInsertStringRecordsReq) ReadField1(ctx context.Context, iprot thrift return nil } -func (p *TSInsertStringRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.PrefixPaths = tSlice - for i := 0; i < size; i ++ { -var _elem89 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) } else { - _elem89 = v + p.PrefixPath = v } - p.PrefixPaths = append(p.PrefixPaths, _elem89) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSInsertStringRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -8860,20 +8629,20 @@ func (p *TSInsertStringRecordsReq) ReadField3(ctx context.Context, iprot thrift return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - _elem90 := tSlice + _elem87 := tSlice for i := 0; i < size; i ++ { -var _elem91 string +var _elem88 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem91 = v + _elem88 = v } - _elem90 = append(_elem90, _elem91) + _elem87 = append(_elem87, _elem88) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } - p.MeasurementsList = append(p.MeasurementsList, _elem90) + p.MeasurementsList = append(p.MeasurementsList, _elem87) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8881,7 +8650,7 @@ var _elem91 string return nil } -func (p *TSInsertStringRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -8894,20 +8663,20 @@ func (p *TSInsertStringRecordsReq) ReadField4(ctx context.Context, iprot thrift return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - _elem92 := tSlice + _elem89 := tSlice for i := 0; i < size; i ++ { -var _elem93 string +var _elem90 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem93 = v + _elem90 = v } - _elem92 = append(_elem92, _elem93) + _elem89 = append(_elem89, _elem90) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } - p.ValuesList = append(p.ValuesList, _elem92) + p.ValuesList = append(p.ValuesList, _elem89) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8915,7 +8684,7 @@ var _elem93 string return nil } -func (p *TSInsertStringRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -8923,13 +8692,13 @@ func (p *TSInsertStringRecordsReq) ReadField5(ctx context.Context, iprot thrift tSlice := make([]int64, 0, size) p.Timestamps = tSlice for i := 0; i < size; i ++ { -var _elem94 int64 +var _elem91 int64 if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem94 = v + _elem91 = v } - p.Timestamps = append(p.Timestamps, _elem94) + p.Timestamps = append(p.Timestamps, _elem91) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8937,7 +8706,7 @@ var _elem94 int64 return nil } -func (p *TSInsertStringRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { @@ -8946,8 +8715,8 @@ func (p *TSInsertStringRecordsReq) ReadField6(ctx context.Context, iprot thrift return nil } -func (p *TSInsertStringRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsReq"); err != nil { +func (p *TSInsertStringRecordsOfOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsOfOneDeviceReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -8964,7 +8733,7 @@ func (p *TSInsertStringRecordsReq) Write(ctx context.Context, oprot thrift.TProt return nil } -func (p *TSInsertStringRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertStringRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -8974,25 +8743,17 @@ func (p *TSInsertStringRecordsReq) writeField1(ctx context.Context, oprot thrift return err } -func (p *TSInsertStringRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.PrefixPaths { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSInsertStringRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) } + if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) } return err } -func (p *TSInsertStringRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertStringRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { @@ -9018,7 +8779,7 @@ func (p *TSInsertStringRecordsReq) writeField3(ctx context.Context, oprot thrift return err } -func (p *TSInsertStringRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertStringRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.ValuesList)); err != nil { @@ -9044,7 +8805,7 @@ func (p *TSInsertStringRecordsReq) writeField4(ctx context.Context, oprot thrift return err } -func (p *TSInsertStringRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertStringRecordsOfOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil { @@ -9062,7 +8823,7 @@ func (p *TSInsertStringRecordsReq) writeField5(ctx context.Context, oprot thrift return err } -func (p *TSInsertStringRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertStringRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetIsAligned() { if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) } @@ -9074,40 +8835,36 @@ func (p *TSInsertStringRecordsReq) writeField6(ctx context.Context, oprot thrift return err } -func (p *TSInsertStringRecordsReq) Equals(other *TSInsertStringRecordsReq) bool { +func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecordsOfOneDeviceReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if len(p.PrefixPaths) != len(other.PrefixPaths) { return false } - for i, _tgt := range p.PrefixPaths { - _src95 := other.PrefixPaths[i] - if _tgt != _src95 { return false } - } + if p.PrefixPath != other.PrefixPath { return false } if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } for i, _tgt := range p.MeasurementsList { - _src96 := other.MeasurementsList[i] - if len(_tgt) != len(_src96) { return false } + _src92 := other.MeasurementsList[i] + if len(_tgt) != len(_src92) { return false } for i, _tgt := range _tgt { - _src97 := _src96[i] - if _tgt != _src97 { return false } + _src93 := _src92[i] + if _tgt != _src93 { return false } } } if len(p.ValuesList) != len(other.ValuesList) { return false } for i, _tgt := range p.ValuesList { - _src98 := other.ValuesList[i] - if len(_tgt) != len(_src98) { return false } + _src94 := other.ValuesList[i] + if len(_tgt) != len(_src94) { return false } for i, _tgt := range _tgt { - _src99 := _src98[i] - if _tgt != _src99 { return false } + _src95 := _src94[i] + if _tgt != _src95 { return false } } } if len(p.Timestamps) != len(other.Timestamps) { return false } for i, _tgt := range p.Timestamps { - _src100 := other.Timestamps[i] - if _tgt != _src100 { return false } + _src96 := other.Timestamps[i] + if _tgt != _src96 { return false } } if p.IsAligned != other.IsAligned { if p.IsAligned == nil || other.IsAligned == nil { @@ -9118,54 +8875,74 @@ func (p *TSInsertStringRecordsReq) Equals(other *TSInsertStringRecordsReq) bool return true } -func (p *TSInsertStringRecordsReq) String() string { +func (p *TSInsertStringRecordsOfOneDeviceReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSInsertStringRecordsReq(%+v)", *p) + return fmt.Sprintf("TSInsertStringRecordsOfOneDeviceReq(%+v)", *p) } // Attributes: // - SessionId -// - Paths -// - StartTime -// - EndTime -type TSDeleteDataReq struct { +// - PrefixPaths +// - MeasurementsList +// - ValuesList +// - Timestamps +// - IsAligned +type TSInsertStringRecordsReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` - StartTime int64 `thrift:"startTime,3,required" db:"startTime" json:"startTime"` - EndTime int64 `thrift:"endTime,4,required" db:"endTime" json:"endTime"` + PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"` + MeasurementsList [][]string `thrift:"measurementsList,3,required" db:"measurementsList" json:"measurementsList"` + ValuesList [][]string `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` + Timestamps []int64 `thrift:"timestamps,5,required" db:"timestamps" json:"timestamps"` + IsAligned *bool `thrift:"isAligned,6" db:"isAligned" json:"isAligned,omitempty"` } -func NewTSDeleteDataReq() *TSDeleteDataReq { - return &TSDeleteDataReq{} +func NewTSInsertStringRecordsReq() *TSInsertStringRecordsReq { + return &TSInsertStringRecordsReq{} } -func (p *TSDeleteDataReq) GetSessionId() int64 { +func (p *TSInsertStringRecordsReq) GetSessionId() int64 { return p.SessionId } -func (p *TSDeleteDataReq) GetPaths() []string { - return p.Paths +func (p *TSInsertStringRecordsReq) GetPrefixPaths() []string { + return p.PrefixPaths } -func (p *TSDeleteDataReq) GetStartTime() int64 { - return p.StartTime +func (p *TSInsertStringRecordsReq) GetMeasurementsList() [][]string { + return p.MeasurementsList } -func (p *TSDeleteDataReq) GetEndTime() int64 { - return p.EndTime +func (p *TSInsertStringRecordsReq) GetValuesList() [][]string { + return p.ValuesList } -func (p *TSDeleteDataReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *TSInsertStringRecordsReq) GetTimestamps() []int64 { + return p.Timestamps +} +var TSInsertStringRecordsReq_IsAligned_DEFAULT bool +func (p *TSInsertStringRecordsReq) GetIsAligned() bool { + if !p.IsSetIsAligned() { + return TSInsertStringRecordsReq_IsAligned_DEFAULT + } +return *p.IsAligned +} +func (p *TSInsertStringRecordsReq) IsSetIsAligned() bool { + return p.IsAligned != nil +} + +func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetPaths bool = false; - var issetStartTime bool = false; - var issetEndTime bool = false; + var issetPrefixPaths bool = false; + var issetMeasurementsList bool = false; + var issetValuesList bool = false; + var issetTimestamps bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -9190,29 +8967,50 @@ func (p *TSDeleteDataReq) Read(ctx context.Context, iprot thrift.TProtocol) erro if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetPaths = true + issetPrefixPaths = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.LIST { if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetStartTime = true + issetMeasurementsList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.LIST { if err := p.ReadField4(ctx, iprot); err != nil { return err } - issetEndTime = true + issetValuesList = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.LIST { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + issetTimestamps = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -9233,19 +9031,22 @@ func (p *TSDeleteDataReq) Read(ctx context.Context, iprot thrift.TProtocol) erro if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetPaths{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")); + if !issetPrefixPaths{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set")); } - if !issetStartTime{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set")); + if !issetMeasurementsList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList is not set")); } - if !issetEndTime{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set")); + if !issetValuesList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ValuesList is not set")); + } + if !issetTimestamps{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set")); } return nil } -func (p *TSDeleteDataReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertStringRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -9254,21 +9055,21 @@ func (p *TSDeleteDataReq) ReadField1(ctx context.Context, iprot thrift.TProtoco return nil } -func (p *TSDeleteDataReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSInsertStringRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - p.Paths = tSlice + p.PrefixPaths = tSlice for i := 0; i < size; i ++ { -var _elem101 string +var _elem97 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem101 = v + _elem97 = v } - p.Paths = append(p.Paths, _elem101) + p.PrefixPaths = append(p.PrefixPaths, _elem97) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -9276,32 +9077,115 @@ var _elem101 string return nil } -func (p *TSDeleteDataReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) +func (p *TSInsertStringRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]string, 0, size) + p.MeasurementsList = tSlice + for i := 0; i < size; i ++ { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + _elem98 := tSlice + for i := 0; i < size; i ++ { +var _elem99 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.StartTime = v -} - return nil + _elem99 = v } - -func (p *TSDeleteDataReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 4: ", err) -} else { - p.EndTime = v + _elem98 = append(_elem98, _elem99) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + p.MeasurementsList = append(p.MeasurementsList, _elem98) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSInsertStringRecordsReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]string, 0, size) + p.ValuesList = tSlice + for i := 0; i < size; i ++ { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + _elem100 := tSlice + for i := 0; i < size; i ++ { +var _elem101 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem101 = v +} + _elem100 = append(_elem100, _elem101) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + p.ValuesList = append(p.ValuesList, _elem100) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSInsertStringRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int64, 0, size) + p.Timestamps = tSlice + for i := 0; i < size; i ++ { +var _elem102 int64 + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem102 = v } + p.Timestamps = append(p.Timestamps, _elem102) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSDeleteDataReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSDeleteDataReq"); err != nil { +func (p *TSInsertStringRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.IsAligned = &v +} + return nil +} + +func (p *TSInsertStringRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSInsertStringRecordsReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } if err := p.writeField3(ctx, oprot); err != nil { return err } if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -9310,7 +9194,7 @@ func (p *TSDeleteDataReq) Write(ctx context.Context, oprot thrift.TProtocol) err return nil } -func (p *TSDeleteDataReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSInsertStringRecordsReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -9320,13 +9204,13 @@ func (p *TSDeleteDataReq) writeField1(ctx context.Context, oprot thrift.TProtoco return err } -func (p *TSDeleteDataReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { +func (p *TSInsertStringRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "prefixPaths", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPaths: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PrefixPaths)); err != nil { return thrift.PrependError("error writing list begin: ", err) } - for _, v := range p.Paths { + for _, v := range p.PrefixPaths { if err := oprot.WriteString(ctx, string(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } @@ -9334,148 +9218,184 @@ func (p *TSDeleteDataReq) writeField2(ctx context.Context, oprot thrift.TProtoco return thrift.PrependError("error writing list end: ", err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) } return err } -func (p *TSDeleteDataReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:startTime: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.startTime (3) field write error: ", p), err) } +func (p *TSInsertStringRecordsReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "measurementsList", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurementsList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.MeasurementsList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.MeasurementsList { + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range v { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:startTime: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurementsList: ", p), err) } return err } -func (p *TSDeleteDataReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:endTime: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.endTime (4) field write error: ", p), err) } +func (p *TSInsertStringRecordsReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "valuesList", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:valuesList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.LIST, len(p.ValuesList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ValuesList { + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(v)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range v { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:endTime: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:valuesList: ", p), err) } return err } -func (p *TSDeleteDataReq) Equals(other *TSDeleteDataReq) bool { +func (p *TSInsertStringRecordsReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timestamps", thrift.LIST, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:timestamps: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I64, len(p.Timestamps)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Timestamps { + if err := oprot.WriteI64(ctx, int64(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:timestamps: ", p), err) } + return err +} + +func (p *TSInsertStringRecordsReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIsAligned() { + if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:isAligned: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.IsAligned)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.isAligned (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:isAligned: ", p), err) } + } + return err +} + +func (p *TSInsertStringRecordsReq) Equals(other *TSInsertStringRecordsReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if len(p.Paths) != len(other.Paths) { return false } - for i, _tgt := range p.Paths { - _src102 := other.Paths[i] - if _tgt != _src102 { return false } + if len(p.PrefixPaths) != len(other.PrefixPaths) { return false } + for i, _tgt := range p.PrefixPaths { + _src103 := other.PrefixPaths[i] + if _tgt != _src103 { return false } + } + if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } + for i, _tgt := range p.MeasurementsList { + _src104 := other.MeasurementsList[i] + if len(_tgt) != len(_src104) { return false } + for i, _tgt := range _tgt { + _src105 := _src104[i] + if _tgt != _src105 { return false } + } + } + if len(p.ValuesList) != len(other.ValuesList) { return false } + for i, _tgt := range p.ValuesList { + _src106 := other.ValuesList[i] + if len(_tgt) != len(_src106) { return false } + for i, _tgt := range _tgt { + _src107 := _src106[i] + if _tgt != _src107 { return false } + } + } + if len(p.Timestamps) != len(other.Timestamps) { return false } + for i, _tgt := range p.Timestamps { + _src108 := other.Timestamps[i] + if _tgt != _src108 { return false } + } + if p.IsAligned != other.IsAligned { + if p.IsAligned == nil || other.IsAligned == nil { + return false + } + if (*p.IsAligned) != (*other.IsAligned) { return false } } - if p.StartTime != other.StartTime { return false } - if p.EndTime != other.EndTime { return false } return true } -func (p *TSDeleteDataReq) String() string { +func (p *TSInsertStringRecordsReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSDeleteDataReq(%+v)", *p) + return fmt.Sprintf("TSInsertStringRecordsReq(%+v)", *p) } // Attributes: // - SessionId -// - Path -// - DataType -// - Encoding -// - Compressor -// - Props -// - Tags -// - Attributes -// - MeasurementAlias -type TSCreateTimeseriesReq struct { +// - Paths +// - StartTime +// - EndTime +type TSDeleteDataReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - Path string `thrift:"path,2,required" db:"path" json:"path"` - DataType int32 `thrift:"dataType,3,required" db:"dataType" json:"dataType"` - Encoding int32 `thrift:"encoding,4,required" db:"encoding" json:"encoding"` - Compressor int32 `thrift:"compressor,5,required" db:"compressor" json:"compressor"` - Props map[string]string `thrift:"props,6" db:"props" json:"props,omitempty"` - Tags map[string]string `thrift:"tags,7" db:"tags" json:"tags,omitempty"` - Attributes map[string]string `thrift:"attributes,8" db:"attributes" json:"attributes,omitempty"` - MeasurementAlias *string `thrift:"measurementAlias,9" db:"measurementAlias" json:"measurementAlias,omitempty"` + Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` + StartTime int64 `thrift:"startTime,3,required" db:"startTime" json:"startTime"` + EndTime int64 `thrift:"endTime,4,required" db:"endTime" json:"endTime"` } -func NewTSCreateTimeseriesReq() *TSCreateTimeseriesReq { - return &TSCreateTimeseriesReq{} +func NewTSDeleteDataReq() *TSDeleteDataReq { + return &TSDeleteDataReq{} } -func (p *TSCreateTimeseriesReq) GetSessionId() int64 { +func (p *TSDeleteDataReq) GetSessionId() int64 { return p.SessionId } -func (p *TSCreateTimeseriesReq) GetPath() string { - return p.Path -} - -func (p *TSCreateTimeseriesReq) GetDataType() int32 { - return p.DataType +func (p *TSDeleteDataReq) GetPaths() []string { + return p.Paths } -func (p *TSCreateTimeseriesReq) GetEncoding() int32 { - return p.Encoding +func (p *TSDeleteDataReq) GetStartTime() int64 { + return p.StartTime } -func (p *TSCreateTimeseriesReq) GetCompressor() int32 { - return p.Compressor +func (p *TSDeleteDataReq) GetEndTime() int64 { + return p.EndTime } -var TSCreateTimeseriesReq_Props_DEFAULT map[string]string - -func (p *TSCreateTimeseriesReq) GetProps() map[string]string { - return p.Props -} -var TSCreateTimeseriesReq_Tags_DEFAULT map[string]string - -func (p *TSCreateTimeseriesReq) GetTags() map[string]string { - return p.Tags -} -var TSCreateTimeseriesReq_Attributes_DEFAULT map[string]string - -func (p *TSCreateTimeseriesReq) GetAttributes() map[string]string { - return p.Attributes -} -var TSCreateTimeseriesReq_MeasurementAlias_DEFAULT string -func (p *TSCreateTimeseriesReq) GetMeasurementAlias() string { - if !p.IsSetMeasurementAlias() { - return TSCreateTimeseriesReq_MeasurementAlias_DEFAULT - } -return *p.MeasurementAlias -} -func (p *TSCreateTimeseriesReq) IsSetProps() bool { - return p.Props != nil -} - -func (p *TSCreateTimeseriesReq) IsSetTags() bool { - return p.Tags != nil -} - -func (p *TSCreateTimeseriesReq) IsSetAttributes() bool { - return p.Attributes != nil -} - -func (p *TSCreateTimeseriesReq) IsSetMeasurementAlias() bool { - return p.MeasurementAlias != nil -} - -func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } +func (p *TSDeleteDataReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } var issetSessionId bool = false; - var issetPath bool = false; - var issetDataType bool = false; - var issetEncoding bool = false; - var issetCompressor bool = false; + var issetPaths bool = false; + var issetStartTime bool = false; + var issetEndTime bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -9496,84 +9416,33 @@ func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol } } case 2: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.LIST { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetPath = true + issetPaths = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.I64 { if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetDataType = true + issetStartTime = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.I64 { if err := p.ReadField4(ctx, iprot); err != nil { return err } - issetEncoding = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 5: - if fieldTypeId == thrift.I32 { - if err := p.ReadField5(ctx, iprot); err != nil { - return err - } - issetCompressor = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 6: - if fieldTypeId == thrift.MAP { - if err := p.ReadField6(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 7: - if fieldTypeId == thrift.MAP { - if err := p.ReadField7(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 8: - if fieldTypeId == thrift.MAP { - if err := p.ReadField8(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 9: - if fieldTypeId == thrift.STRING { - if err := p.ReadField9(ctx, iprot); err != nil { - return err - } + issetEndTime = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -9594,22 +9463,19 @@ func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetPath{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set")); - } - if !issetDataType{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataType is not set")); + if !issetPaths{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")); } - if !issetEncoding{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encoding is not set")); + if !issetStartTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set")); } - if !issetCompressor{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressor is not set")); + if !issetEndTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set")); } return nil } -func (p *TSCreateTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSDeleteDataReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -9618,148 +9484,54 @@ func (p *TSCreateTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TP return nil } -func (p *TSCreateTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) -} else { - p.Path = v -} - return nil -} - -func (p *TSCreateTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) -} else { - p.DataType = v -} - return nil -} - -func (p *TSCreateTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 4: ", err) -} else { - p.Encoding = v -} - return nil -} - -func (p *TSCreateTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 5: ", err) -} else { - p.Compressor = v -} - return nil -} - -func (p *TSCreateTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin(ctx) - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.Props = tMap - for i := 0; i < size; i ++ { -var _key103 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _key103 = v -} -var _val104 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _val104 = v -} - p.Props[_key103] = _val104 - } - if err := iprot.ReadMapEnd(ctx); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TSCreateTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin(ctx) +func (p *TSDeleteDataReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) if err != nil { - return thrift.PrependError("error reading map begin: ", err) + return thrift.PrependError("error reading list begin: ", err) } - tMap := make(map[string]string, size) - p.Tags = tMap + tSlice := make([]string, 0, size) + p.Paths = tSlice for i := 0; i < size; i ++ { -var _key105 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _key105 = v -} -var _val106 string +var _elem109 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val106 = v + _elem109 = v } - p.Tags[_key105] = _val106 + p.Paths = append(p.Paths, _elem109) } - if err := iprot.ReadMapEnd(ctx); err != nil { - return thrift.PrependError("error reading map end: ", err) + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *TSCreateTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin(ctx) - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.Attributes = tMap - for i := 0; i < size; i ++ { -var _key107 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _key107 = v -} -var _val108 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSDeleteDataReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) } else { - _val108 = v + p.StartTime = v } - p.Attributes[_key107] = _val108 - } - if err := iprot.ReadMapEnd(ctx); err != nil { - return thrift.PrependError("error reading map end: ", err) - } return nil } -func (p *TSCreateTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 9: ", err) +func (p *TSDeleteDataReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) } else { - p.MeasurementAlias = &v + p.EndTime = v } return nil } -func (p *TSCreateTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSCreateTimeseriesReq"); err != nil { +func (p *TSDeleteDataReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSDeleteDataReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } if err := p.writeField3(ctx, oprot); err != nil { return err } if err := p.writeField4(ctx, oprot); err != nil { return err } - if err := p.writeField5(ctx, oprot); err != nil { return err } - if err := p.writeField6(ctx, oprot); err != nil { return err } - if err := p.writeField7(ctx, oprot); err != nil { return err } - if err := p.writeField8(ctx, oprot); err != nil { return err } - if err := p.writeField9(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -9768,7 +9540,7 @@ func (p *TSCreateTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtoco return nil } -func (p *TSCreateTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSDeleteDataReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -9778,232 +9550,162 @@ func (p *TSCreateTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TP return err } -func (p *TSCreateTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:path: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Path)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.path (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:path: ", p), err) } - return err -} - -func (p *TSCreateTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "dataType", thrift.I32, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:dataType: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.DataType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.dataType (3) field write error: ", p), err) } +func (p *TSDeleteDataReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Paths { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:dataType: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) } return err } -func (p *TSCreateTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "encoding", thrift.I32, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:encoding: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Encoding)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.encoding (4) field write error: ", p), err) } +func (p *TSDeleteDataReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:startTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startTime (3) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:encoding: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:startTime: ", p), err) } return err } -func (p *TSCreateTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "compressor", thrift.I32, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compressor: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.Compressor)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.compressor (5) field write error: ", p), err) } +func (p *TSDeleteDataReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:endTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.endTime (4) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compressor: ", p), err) } - return err -} - -func (p *TSCreateTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetProps() { - if err := oprot.WriteFieldBegin(ctx, "props", thrift.MAP, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:props: ", p), err) } - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Props)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Props { - if err := oprot.WriteString(ctx, string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(ctx); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:props: ", p), err) } - } - return err -} - -func (p *TSCreateTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetTags() { - if err := oprot.WriteFieldBegin(ctx, "tags", thrift.MAP, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tags: ", p), err) } - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Tags)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Tags { - if err := oprot.WriteString(ctx, string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(ctx); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tags: ", p), err) } - } - return err -} - -func (p *TSCreateTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetAttributes() { - if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:attributes: ", p), err) } - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Attributes { - if err := oprot.WriteString(ctx, string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(ctx); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:attributes: ", p), err) } - } - return err -} - -func (p *TSCreateTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetMeasurementAlias() { - if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.STRING, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:measurementAlias: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.MeasurementAlias)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.measurementAlias (9) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:measurementAlias: ", p), err) } - } + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:endTime: ", p), err) } return err } -func (p *TSCreateTimeseriesReq) Equals(other *TSCreateTimeseriesReq) bool { +func (p *TSDeleteDataReq) Equals(other *TSDeleteDataReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if p.Path != other.Path { return false } - if p.DataType != other.DataType { return false } - if p.Encoding != other.Encoding { return false } - if p.Compressor != other.Compressor { return false } - if len(p.Props) != len(other.Props) { return false } - for k, _tgt := range p.Props { - _src109 := other.Props[k] - if _tgt != _src109 { return false } - } - if len(p.Tags) != len(other.Tags) { return false } - for k, _tgt := range p.Tags { - _src110 := other.Tags[k] + if len(p.Paths) != len(other.Paths) { return false } + for i, _tgt := range p.Paths { + _src110 := other.Paths[i] if _tgt != _src110 { return false } } - if len(p.Attributes) != len(other.Attributes) { return false } - for k, _tgt := range p.Attributes { - _src111 := other.Attributes[k] - if _tgt != _src111 { return false } - } - if p.MeasurementAlias != other.MeasurementAlias { - if p.MeasurementAlias == nil || other.MeasurementAlias == nil { - return false - } - if (*p.MeasurementAlias) != (*other.MeasurementAlias) { return false } - } + if p.StartTime != other.StartTime { return false } + if p.EndTime != other.EndTime { return false } return true } -func (p *TSCreateTimeseriesReq) String() string { +func (p *TSDeleteDataReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSCreateTimeseriesReq(%+v)", *p) + return fmt.Sprintf("TSDeleteDataReq(%+v)", *p) } // Attributes: // - SessionId -// - PrefixPath -// - Measurements -// - DataTypes -// - Encodings -// - Compressors +// - Path +// - DataType +// - Encoding +// - Compressor +// - Props +// - Tags +// - Attributes // - MeasurementAlias -type TSCreateAlignedTimeseriesReq struct { +type TSCreateTimeseriesReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` - Measurements []string `thrift:"measurements,3,required" db:"measurements" json:"measurements"` - DataTypes []int32 `thrift:"dataTypes,4,required" db:"dataTypes" json:"dataTypes"` - Encodings []int32 `thrift:"encodings,5,required" db:"encodings" json:"encodings"` - Compressors []int32 `thrift:"compressors,6,required" db:"compressors" json:"compressors"` - MeasurementAlias []string `thrift:"measurementAlias,7" db:"measurementAlias" json:"measurementAlias,omitempty"` + Path string `thrift:"path,2,required" db:"path" json:"path"` + DataType int32 `thrift:"dataType,3,required" db:"dataType" json:"dataType"` + Encoding int32 `thrift:"encoding,4,required" db:"encoding" json:"encoding"` + Compressor int32 `thrift:"compressor,5,required" db:"compressor" json:"compressor"` + Props map[string]string `thrift:"props,6" db:"props" json:"props,omitempty"` + Tags map[string]string `thrift:"tags,7" db:"tags" json:"tags,omitempty"` + Attributes map[string]string `thrift:"attributes,8" db:"attributes" json:"attributes,omitempty"` + MeasurementAlias *string `thrift:"measurementAlias,9" db:"measurementAlias" json:"measurementAlias,omitempty"` } -func NewTSCreateAlignedTimeseriesReq() *TSCreateAlignedTimeseriesReq { - return &TSCreateAlignedTimeseriesReq{} +func NewTSCreateTimeseriesReq() *TSCreateTimeseriesReq { + return &TSCreateTimeseriesReq{} } -func (p *TSCreateAlignedTimeseriesReq) GetSessionId() int64 { +func (p *TSCreateTimeseriesReq) GetSessionId() int64 { return p.SessionId } -func (p *TSCreateAlignedTimeseriesReq) GetPrefixPath() string { - return p.PrefixPath +func (p *TSCreateTimeseriesReq) GetPath() string { + return p.Path } -func (p *TSCreateAlignedTimeseriesReq) GetMeasurements() []string { - return p.Measurements +func (p *TSCreateTimeseriesReq) GetDataType() int32 { + return p.DataType } -func (p *TSCreateAlignedTimeseriesReq) GetDataTypes() []int32 { - return p.DataTypes +func (p *TSCreateTimeseriesReq) GetEncoding() int32 { + return p.Encoding } -func (p *TSCreateAlignedTimeseriesReq) GetEncodings() []int32 { - return p.Encodings +func (p *TSCreateTimeseriesReq) GetCompressor() int32 { + return p.Compressor } +var TSCreateTimeseriesReq_Props_DEFAULT map[string]string -func (p *TSCreateAlignedTimeseriesReq) GetCompressors() []int32 { - return p.Compressors +func (p *TSCreateTimeseriesReq) GetProps() map[string]string { + return p.Props } -var TSCreateAlignedTimeseriesReq_MeasurementAlias_DEFAULT []string +var TSCreateTimeseriesReq_Tags_DEFAULT map[string]string -func (p *TSCreateAlignedTimeseriesReq) GetMeasurementAlias() []string { - return p.MeasurementAlias +func (p *TSCreateTimeseriesReq) GetTags() map[string]string { + return p.Tags } -func (p *TSCreateAlignedTimeseriesReq) IsSetMeasurementAlias() bool { +var TSCreateTimeseriesReq_Attributes_DEFAULT map[string]string + +func (p *TSCreateTimeseriesReq) GetAttributes() map[string]string { + return p.Attributes +} +var TSCreateTimeseriesReq_MeasurementAlias_DEFAULT string +func (p *TSCreateTimeseriesReq) GetMeasurementAlias() string { + if !p.IsSetMeasurementAlias() { + return TSCreateTimeseriesReq_MeasurementAlias_DEFAULT + } +return *p.MeasurementAlias +} +func (p *TSCreateTimeseriesReq) IsSetProps() bool { + return p.Props != nil +} + +func (p *TSCreateTimeseriesReq) IsSetTags() bool { + return p.Tags != nil +} + +func (p *TSCreateTimeseriesReq) IsSetAttributes() bool { + return p.Attributes != nil +} + +func (p *TSCreateTimeseriesReq) IsSetMeasurementAlias() bool { return p.MeasurementAlias != nil } -func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetPrefixPath bool = false; - var issetMeasurements bool = false; - var issetDataTypes bool = false; - var issetEncodings bool = false; - var issetCompressors bool = false; + var issetPath bool = false; + var issetDataType bool = false; + var issetEncoding bool = false; + var issetCompressor bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -10028,58 +9730,57 @@ func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TP if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetPrefixPath = true + issetPath = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I32 { if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetMeasurements = true + issetDataType = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I32 { if err := p.ReadField4(ctx, iprot); err != nil { return err } - issetDataTypes = true + issetEncoding = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I32 { if err := p.ReadField5(ctx, iprot); err != nil { return err } - issetEncodings = true + issetCompressor = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.MAP { if err := p.ReadField6(ctx, iprot); err != nil { return err } - issetCompressors = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 7: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.MAP { if err := p.ReadField7(ctx, iprot); err != nil { return err } @@ -10088,6 +9789,26 @@ func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TP return err } } + case 8: + if fieldTypeId == thrift.MAP { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.STRING { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -10103,25 +9824,22 @@ func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TP if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetPrefixPath{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")); - } - if !issetMeasurements{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set")); + if !issetPath{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set")); } - if !issetDataTypes{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set")); + if !issetDataType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataType is not set")); } - if !issetEncodings{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set")); + if !issetEncoding{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encoding is not set")); } - if !issetCompressors{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set")); + if !issetCompressor{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressor is not set")); } return nil } -func (p *TSCreateAlignedTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -10130,127 +9848,137 @@ func (p *TSCreateAlignedTimeseriesReq) ReadField1(ctx context.Context, iprot th return nil } -func (p *TSCreateAlignedTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { - p.PrefixPath = v + p.Path = v } return nil } -func (p *TSCreateAlignedTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.Measurements = tSlice - for i := 0; i < size; i ++ { -var _elem112 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSCreateTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) } else { - _elem112 = v + p.DataType = v } - p.Measurements = append(p.Measurements, _elem112) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSCreateAlignedTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int32, 0, size) - p.DataTypes = tSlice - for i := 0; i < size; i ++ { -var _elem113 int32 - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSCreateTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) } else { - _elem113 = v + p.Encoding = v } - p.DataTypes = append(p.DataTypes, _elem113) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSCreateAlignedTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *TSCreateTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Compressor = v +} + return nil +} + +func (p *TSCreateTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) if err != nil { - return thrift.PrependError("error reading list begin: ", err) + return thrift.PrependError("error reading map begin: ", err) } - tSlice := make([]int32, 0, size) - p.Encodings = tSlice + tMap := make(map[string]string, size) + p.Props = tMap for i := 0; i < size; i ++ { -var _elem114 int32 - if v, err := iprot.ReadI32(ctx); err != nil { +var _key111 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key111 = v +} +var _val112 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem114 = v + _val112 = v } - p.Encodings = append(p.Encodings, _elem114) + p.Props[_key111] = _val112 } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *TSCreateAlignedTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *TSCreateTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) if err != nil { - return thrift.PrependError("error reading list begin: ", err) + return thrift.PrependError("error reading map begin: ", err) } - tSlice := make([]int32, 0, size) - p.Compressors = tSlice + tMap := make(map[string]string, size) + p.Tags = tMap for i := 0; i < size; i ++ { -var _elem115 int32 - if v, err := iprot.ReadI32(ctx); err != nil { +var _key113 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key113 = v +} +var _val114 string + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem115 = v + _val114 = v } - p.Compressors = append(p.Compressors, _elem115) + p.Tags[_key113] = _val114 } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *TSCreateAlignedTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *TSCreateTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) if err != nil { - return thrift.PrependError("error reading list begin: ", err) + return thrift.PrependError("error reading map begin: ", err) } - tSlice := make([]string, 0, size) - p.MeasurementAlias = tSlice + tMap := make(map[string]string, size) + p.Attributes = tMap for i := 0; i < size; i ++ { -var _elem116 string +var _key115 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key115 = v +} +var _val116 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem116 = v + _val116 = v } - p.MeasurementAlias = append(p.MeasurementAlias, _elem116) + p.Attributes[_key115] = _val116 } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *TSCreateAlignedTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSCreateAlignedTimeseriesReq"); err != nil { +func (p *TSCreateTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 9: ", err) +} else { + p.MeasurementAlias = &v +} + return nil +} + +func (p *TSCreateTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSCreateTimeseriesReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -10260,6 +9988,8 @@ func (p *TSCreateAlignedTimeseriesReq) Write(ctx context.Context, oprot thrift.T if err := p.writeField5(ctx, oprot); err != nil { return err } if err := p.writeField6(ctx, oprot); err != nil { return err } if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -10268,7 +9998,7 @@ func (p *TSCreateAlignedTimeseriesReq) Write(ctx context.Context, oprot thrift.T return nil } -func (p *TSCreateAlignedTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSCreateTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -10278,238 +10008,254 @@ func (p *TSCreateAlignedTimeseriesReq) writeField1(ctx context.Context, oprot th return err } -func (p *TSCreateAlignedTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) } - if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) } +func (p *TSCreateTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:path: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Path)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.path (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:path: ", p), err) } return err } -func (p *TSCreateAlignedTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurements: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Measurements { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSCreateTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "dataType", thrift.I32, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:dataType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.DataType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.dataType (3) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurements: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:dataType: ", p), err) } return err } -func (p *TSCreateAlignedTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:dataTypes: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.DataTypes { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSCreateTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "encoding", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:encoding: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Encoding)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.encoding (4) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:dataTypes: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:encoding: ", p), err) } return err } -func (p *TSCreateAlignedTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:encodings: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Encodings { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSCreateTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "compressor", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compressor: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Compressor)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.compressor (5) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:encodings: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compressor: ", p), err) } return err } -func (p *TSCreateAlignedTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:compressors: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Compressors { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) +func (p *TSCreateTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetProps() { + if err := oprot.WriteFieldBegin(ctx, "props", thrift.MAP, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:props: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Props)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Props { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:props: ", p), err) } } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:compressors: ", p), err) } return err } -func (p *TSCreateAlignedTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetMeasurementAlias() { - if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.LIST, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:measurementAlias: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.MeasurementAlias)); err != nil { - return thrift.PrependError("error writing list begin: ", err) +func (p *TSCreateTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTags() { + if err := oprot.WriteFieldBegin(ctx, "tags", thrift.MAP, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tags: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Tags)); err != nil { + return thrift.PrependError("error writing map begin: ", err) } - for _, v := range p.MeasurementAlias { + for k, v := range p.Tags { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } if err := oprot.WriteString(ctx, string(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:measurementAlias: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tags: ", p), err) } } return err } -func (p *TSCreateAlignedTimeseriesReq) Equals(other *TSCreateAlignedTimeseriesReq) bool { +func (p *TSCreateTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributes() { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:attributes: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Attributes { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:attributes: ", p), err) } + } + return err +} + +func (p *TSCreateTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMeasurementAlias() { + if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.STRING, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:measurementAlias: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.MeasurementAlias)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.measurementAlias (9) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:measurementAlias: ", p), err) } + } + return err +} + +func (p *TSCreateTimeseriesReq) Equals(other *TSCreateTimeseriesReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if p.PrefixPath != other.PrefixPath { return false } - if len(p.Measurements) != len(other.Measurements) { return false } - for i, _tgt := range p.Measurements { - _src117 := other.Measurements[i] + if p.Path != other.Path { return false } + if p.DataType != other.DataType { return false } + if p.Encoding != other.Encoding { return false } + if p.Compressor != other.Compressor { return false } + if len(p.Props) != len(other.Props) { return false } + for k, _tgt := range p.Props { + _src117 := other.Props[k] if _tgt != _src117 { return false } } - if len(p.DataTypes) != len(other.DataTypes) { return false } - for i, _tgt := range p.DataTypes { - _src118 := other.DataTypes[i] + if len(p.Tags) != len(other.Tags) { return false } + for k, _tgt := range p.Tags { + _src118 := other.Tags[k] if _tgt != _src118 { return false } } - if len(p.Encodings) != len(other.Encodings) { return false } - for i, _tgt := range p.Encodings { - _src119 := other.Encodings[i] + if len(p.Attributes) != len(other.Attributes) { return false } + for k, _tgt := range p.Attributes { + _src119 := other.Attributes[k] if _tgt != _src119 { return false } } - if len(p.Compressors) != len(other.Compressors) { return false } - for i, _tgt := range p.Compressors { - _src120 := other.Compressors[i] - if _tgt != _src120 { return false } - } - if len(p.MeasurementAlias) != len(other.MeasurementAlias) { return false } - for i, _tgt := range p.MeasurementAlias { - _src121 := other.MeasurementAlias[i] - if _tgt != _src121 { return false } + if p.MeasurementAlias != other.MeasurementAlias { + if p.MeasurementAlias == nil || other.MeasurementAlias == nil { + return false + } + if (*p.MeasurementAlias) != (*other.MeasurementAlias) { return false } } return true } -func (p *TSCreateAlignedTimeseriesReq) String() string { +func (p *TSCreateTimeseriesReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSCreateAlignedTimeseriesReq(%+v)", *p) + return fmt.Sprintf("TSCreateTimeseriesReq(%+v)", *p) } // Attributes: // - SessionId -// - Paths -// - FetchSize -// - StartTime -// - EndTime -// - StatementId -// - EnableRedirectQuery -// - JdbcQuery -type TSRawDataQueryReq struct { +// - PrefixPath +// - Measurements +// - DataTypes +// - Encodings +// - Compressors +// - MeasurementAlias +// - TagsList +// - AttributesList +type TSCreateAlignedTimeseriesReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` - FetchSize *int32 `thrift:"fetchSize,3" db:"fetchSize" json:"fetchSize,omitempty"` - StartTime int64 `thrift:"startTime,4,required" db:"startTime" json:"startTime"` - EndTime int64 `thrift:"endTime,5,required" db:"endTime" json:"endTime"` - StatementId int64 `thrift:"statementId,6,required" db:"statementId" json:"statementId"` - EnableRedirectQuery *bool `thrift:"enableRedirectQuery,7" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"` - JdbcQuery *bool `thrift:"jdbcQuery,8" db:"jdbcQuery" json:"jdbcQuery,omitempty"` + PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` + Measurements []string `thrift:"measurements,3,required" db:"measurements" json:"measurements"` + DataTypes []int32 `thrift:"dataTypes,4,required" db:"dataTypes" json:"dataTypes"` + Encodings []int32 `thrift:"encodings,5,required" db:"encodings" json:"encodings"` + Compressors []int32 `thrift:"compressors,6,required" db:"compressors" json:"compressors"` + MeasurementAlias []string `thrift:"measurementAlias,7" db:"measurementAlias" json:"measurementAlias,omitempty"` + TagsList []map[string]string `thrift:"tagsList,8" db:"tagsList" json:"tagsList,omitempty"` + AttributesList []map[string]string `thrift:"attributesList,9" db:"attributesList" json:"attributesList,omitempty"` } -func NewTSRawDataQueryReq() *TSRawDataQueryReq { - return &TSRawDataQueryReq{} +func NewTSCreateAlignedTimeseriesReq() *TSCreateAlignedTimeseriesReq { + return &TSCreateAlignedTimeseriesReq{} } -func (p *TSRawDataQueryReq) GetSessionId() int64 { +func (p *TSCreateAlignedTimeseriesReq) GetSessionId() int64 { return p.SessionId } -func (p *TSRawDataQueryReq) GetPaths() []string { - return p.Paths +func (p *TSCreateAlignedTimeseriesReq) GetPrefixPath() string { + return p.PrefixPath } -var TSRawDataQueryReq_FetchSize_DEFAULT int32 -func (p *TSRawDataQueryReq) GetFetchSize() int32 { - if !p.IsSetFetchSize() { - return TSRawDataQueryReq_FetchSize_DEFAULT - } -return *p.FetchSize + +func (p *TSCreateAlignedTimeseriesReq) GetMeasurements() []string { + return p.Measurements } -func (p *TSRawDataQueryReq) GetStartTime() int64 { - return p.StartTime +func (p *TSCreateAlignedTimeseriesReq) GetDataTypes() []int32 { + return p.DataTypes } -func (p *TSRawDataQueryReq) GetEndTime() int64 { - return p.EndTime +func (p *TSCreateAlignedTimeseriesReq) GetEncodings() []int32 { + return p.Encodings } -func (p *TSRawDataQueryReq) GetStatementId() int64 { - return p.StatementId +func (p *TSCreateAlignedTimeseriesReq) GetCompressors() []int32 { + return p.Compressors } -var TSRawDataQueryReq_EnableRedirectQuery_DEFAULT bool -func (p *TSRawDataQueryReq) GetEnableRedirectQuery() bool { - if !p.IsSetEnableRedirectQuery() { - return TSRawDataQueryReq_EnableRedirectQuery_DEFAULT - } -return *p.EnableRedirectQuery +var TSCreateAlignedTimeseriesReq_MeasurementAlias_DEFAULT []string + +func (p *TSCreateAlignedTimeseriesReq) GetMeasurementAlias() []string { + return p.MeasurementAlias } -var TSRawDataQueryReq_JdbcQuery_DEFAULT bool -func (p *TSRawDataQueryReq) GetJdbcQuery() bool { - if !p.IsSetJdbcQuery() { - return TSRawDataQueryReq_JdbcQuery_DEFAULT - } -return *p.JdbcQuery +var TSCreateAlignedTimeseriesReq_TagsList_DEFAULT []map[string]string + +func (p *TSCreateAlignedTimeseriesReq) GetTagsList() []map[string]string { + return p.TagsList } -func (p *TSRawDataQueryReq) IsSetFetchSize() bool { - return p.FetchSize != nil +var TSCreateAlignedTimeseriesReq_AttributesList_DEFAULT []map[string]string + +func (p *TSCreateAlignedTimeseriesReq) GetAttributesList() []map[string]string { + return p.AttributesList +} +func (p *TSCreateAlignedTimeseriesReq) IsSetMeasurementAlias() bool { + return p.MeasurementAlias != nil } -func (p *TSRawDataQueryReq) IsSetEnableRedirectQuery() bool { - return p.EnableRedirectQuery != nil +func (p *TSCreateAlignedTimeseriesReq) IsSetTagsList() bool { + return p.TagsList != nil } -func (p *TSRawDataQueryReq) IsSetJdbcQuery() bool { - return p.JdbcQuery != nil +func (p *TSCreateAlignedTimeseriesReq) IsSetAttributesList() bool { + return p.AttributesList != nil } -func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateAlignedTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetPaths bool = false; - var issetStartTime bool = false; - var issetEndTime bool = false; - var issetStatementId bool = false; + var issetPrefixPath bool = false; + var issetMeasurements bool = false; + var issetDataTypes bool = false; + var issetEncodings bool = false; + var issetCompressors bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -10530,61 +10276,62 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er } } case 2: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.STRING { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetPaths = true + issetPrefixPath = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.LIST { if err := p.ReadField3(ctx, iprot); err != nil { return err } + issetMeasurements = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.LIST { if err := p.ReadField4(ctx, iprot); err != nil { return err } - issetStartTime = true + issetDataTypes = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.LIST { if err := p.ReadField5(ctx, iprot); err != nil { return err } - issetEndTime = true + issetEncodings = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.LIST { if err := p.ReadField6(ctx, iprot); err != nil { return err } - issetStatementId = true + issetCompressors = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 7: - if fieldTypeId == thrift.BOOL { + if fieldTypeId == thrift.LIST { if err := p.ReadField7(ctx, iprot); err != nil { return err } @@ -10594,7 +10341,7 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er } } case 8: - if fieldTypeId == thrift.BOOL { + if fieldTypeId == thrift.LIST { if err := p.ReadField8(ctx, iprot); err != nil { return err } @@ -10603,6 +10350,16 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er return err } } + case 9: + if fieldTypeId == thrift.LIST { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -10618,22 +10375,25 @@ func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) er if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetPaths{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")); + if !issetPrefixPath{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")); } - if !issetStartTime{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set")); + if !issetMeasurements{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set")); } - if !issetEndTime{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set")); + if !issetDataTypes{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set")); } - if !issetStatementId{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")); + if !issetEncodings{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set")); + } + if !issetCompressors{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set")); } return nil } -func (p *TSRawDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateAlignedTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -10642,21 +10402,30 @@ func (p *TSRawDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProto return nil } -func (p *TSRawDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateAlignedTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.PrefixPath = v +} + return nil +} + +func (p *TSCreateAlignedTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - p.Paths = tSlice + p.Measurements = tSlice for i := 0; i < size; i ++ { -var _elem122 string +var _elem120 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem122 = v + _elem120 = v } - p.Paths = append(p.Paths, _elem122) + p.Measurements = append(p.Measurements, _elem120) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -10664,62 +10433,176 @@ var _elem122 string return nil } -func (p *TSRawDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) +func (p *TSCreateAlignedTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int32, 0, size) + p.DataTypes = tSlice + for i := 0; i < size; i ++ { +var _elem121 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.FetchSize = &v + _elem121 = v } + p.DataTypes = append(p.DataTypes, _elem121) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSRawDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 4: ", err) +func (p *TSCreateAlignedTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int32, 0, size) + p.Encodings = tSlice + for i := 0; i < size; i ++ { +var _elem122 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.StartTime = v + _elem122 = v } + p.Encodings = append(p.Encodings, _elem122) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSRawDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 5: ", err) +func (p *TSCreateAlignedTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int32, 0, size) + p.Compressors = tSlice + for i := 0; i < size; i ++ { +var _elem123 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.EndTime = v + _elem123 = v } + p.Compressors = append(p.Compressors, _elem123) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSRawDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 6: ", err) +func (p *TSCreateAlignedTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.MeasurementAlias = tSlice + for i := 0; i < size; i ++ { +var _elem124 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.StatementId = v + _elem124 = v } + p.MeasurementAlias = append(p.MeasurementAlias, _elem124) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSRawDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { - return thrift.PrependError("error reading field 7: ", err) +func (p *TSCreateAlignedTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]map[string]string, 0, size) + p.TagsList = tSlice + for i := 0; i < size; i ++ { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + _elem125 := tMap + for i := 0; i < size; i ++ { +var _key126 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.EnableRedirectQuery = &v + _key126 = v } +var _val127 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val127 = v +} + _elem125[_key126] = _val127 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + p.TagsList = append(p.TagsList, _elem125) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSRawDataQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { - return thrift.PrependError("error reading field 8: ", err) +func (p *TSCreateAlignedTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]map[string]string, 0, size) + p.AttributesList = tSlice + for i := 0; i < size; i ++ { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + _elem128 := tMap + for i := 0; i < size; i ++ { +var _key129 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.JdbcQuery = &v + _key129 = v +} +var _val130 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val130 = v } + _elem128[_key129] = _val130 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + p.AttributesList = append(p.AttributesList, _elem128) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSRawDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSRawDataQueryReq"); err != nil { +func (p *TSCreateAlignedTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSCreateAlignedTimeseriesReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -10730,6 +10613,7 @@ func (p *TSRawDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) e if err := p.writeField6(ctx, oprot); err != nil { return err } if err := p.writeField7(ctx, oprot); err != nil { return err } if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -10738,7 +10622,7 @@ func (p *TSRawDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) e return nil } -func (p *TSRawDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSCreateAlignedTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -10748,13 +10632,23 @@ func (p *TSRawDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProto return err } -func (p *TSRawDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { +func (p *TSCreateAlignedTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) } + if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) } + return err +} + +func (p *TSCreateAlignedTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:measurements: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { return thrift.PrependError("error writing list begin: ", err) } - for _, v := range p.Paths { + for _, v := range p.Measurements { if err := oprot.WriteString(ctx, string(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } @@ -10762,198 +10656,317 @@ func (p *TSRawDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProto return thrift.PrependError("error writing list end: ", err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:measurements: ", p), err) } return err } -func (p *TSRawDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetFetchSize() { - if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.fetchSize (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fetchSize: ", p), err) } +func (p *TSCreateAlignedTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:dataTypes: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.DataTypes { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:dataTypes: ", p), err) } return err } -func (p *TSRawDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:startTime: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.startTime (4) field write error: ", p), err) } +func (p *TSCreateAlignedTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:encodings: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Encodings { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:startTime: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:encodings: ", p), err) } return err } -func (p *TSRawDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:endTime: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.endTime (5) field write error: ", p), err) } +func (p *TSCreateAlignedTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:compressors: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Compressors { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:endTime: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:compressors: ", p), err) } return err } -func (p *TSRawDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:statementId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.statementId (6) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:statementId: ", p), err) } +func (p *TSCreateAlignedTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMeasurementAlias() { + if err := oprot.WriteFieldBegin(ctx, "measurementAlias", thrift.LIST, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:measurementAlias: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.MeasurementAlias)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.MeasurementAlias { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:measurementAlias: ", p), err) } + } return err } -func (p *TSRawDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetEnableRedirectQuery() { - if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:enableRedirectQuery: ", p), err) } - if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (7) field write error: ", p), err) } +func (p *TSCreateAlignedTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTagsList() { + if err := oprot.WriteFieldBegin(ctx, "tagsList", thrift.LIST, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:tagsList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.TagsList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.TagsList { + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range v { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:enableRedirectQuery: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:tagsList: ", p), err) } } return err } -func (p *TSRawDataQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetJdbcQuery() { - if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:jdbcQuery: ", p), err) } - if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (8) field write error: ", p), err) } +func (p *TSCreateAlignedTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributesList() { + if err := oprot.WriteFieldBegin(ctx, "attributesList", thrift.LIST, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:attributesList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.AttributesList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.AttributesList { + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range v { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:jdbcQuery: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:attributesList: ", p), err) } } return err } -func (p *TSRawDataQueryReq) Equals(other *TSRawDataQueryReq) bool { +func (p *TSCreateAlignedTimeseriesReq) Equals(other *TSCreateAlignedTimeseriesReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if len(p.Paths) != len(other.Paths) { return false } - for i, _tgt := range p.Paths { - _src123 := other.Paths[i] - if _tgt != _src123 { return false } + if p.PrefixPath != other.PrefixPath { return false } + if len(p.Measurements) != len(other.Measurements) { return false } + for i, _tgt := range p.Measurements { + _src131 := other.Measurements[i] + if _tgt != _src131 { return false } } - if p.FetchSize != other.FetchSize { - if p.FetchSize == nil || other.FetchSize == nil { - return false - } - if (*p.FetchSize) != (*other.FetchSize) { return false } + if len(p.DataTypes) != len(other.DataTypes) { return false } + for i, _tgt := range p.DataTypes { + _src132 := other.DataTypes[i] + if _tgt != _src132 { return false } } - if p.StartTime != other.StartTime { return false } - if p.EndTime != other.EndTime { return false } - if p.StatementId != other.StatementId { return false } - if p.EnableRedirectQuery != other.EnableRedirectQuery { - if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil { - return false + if len(p.Encodings) != len(other.Encodings) { return false } + for i, _tgt := range p.Encodings { + _src133 := other.Encodings[i] + if _tgt != _src133 { return false } + } + if len(p.Compressors) != len(other.Compressors) { return false } + for i, _tgt := range p.Compressors { + _src134 := other.Compressors[i] + if _tgt != _src134 { return false } + } + if len(p.MeasurementAlias) != len(other.MeasurementAlias) { return false } + for i, _tgt := range p.MeasurementAlias { + _src135 := other.MeasurementAlias[i] + if _tgt != _src135 { return false } + } + if len(p.TagsList) != len(other.TagsList) { return false } + for i, _tgt := range p.TagsList { + _src136 := other.TagsList[i] + if len(_tgt) != len(_src136) { return false } + for k, _tgt := range _tgt { + _src137 := _src136[k] + if _tgt != _src137 { return false } } - if (*p.EnableRedirectQuery) != (*other.EnableRedirectQuery) { return false } } - if p.JdbcQuery != other.JdbcQuery { - if p.JdbcQuery == nil || other.JdbcQuery == nil { - return false + if len(p.AttributesList) != len(other.AttributesList) { return false } + for i, _tgt := range p.AttributesList { + _src138 := other.AttributesList[i] + if len(_tgt) != len(_src138) { return false } + for k, _tgt := range _tgt { + _src139 := _src138[k] + if _tgt != _src139 { return false } } - if (*p.JdbcQuery) != (*other.JdbcQuery) { return false } } return true } -func (p *TSRawDataQueryReq) String() string { +func (p *TSCreateAlignedTimeseriesReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSRawDataQueryReq(%+v)", *p) + return fmt.Sprintf("TSCreateAlignedTimeseriesReq(%+v)", *p) } // Attributes: // - SessionId // - Paths // - FetchSize -// - Time +// - StartTime +// - EndTime // - StatementId // - EnableRedirectQuery // - JdbcQuery -type TSLastDataQueryReq struct { +// - Timeout +// - LegalPathNodes +type TSRawDataQueryReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` FetchSize *int32 `thrift:"fetchSize,3" db:"fetchSize" json:"fetchSize,omitempty"` - Time int64 `thrift:"time,4,required" db:"time" json:"time"` - StatementId int64 `thrift:"statementId,5,required" db:"statementId" json:"statementId"` - EnableRedirectQuery *bool `thrift:"enableRedirectQuery,6" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"` - JdbcQuery *bool `thrift:"jdbcQuery,7" db:"jdbcQuery" json:"jdbcQuery,omitempty"` + StartTime int64 `thrift:"startTime,4,required" db:"startTime" json:"startTime"` + EndTime int64 `thrift:"endTime,5,required" db:"endTime" json:"endTime"` + StatementId int64 `thrift:"statementId,6,required" db:"statementId" json:"statementId"` + EnableRedirectQuery *bool `thrift:"enableRedirectQuery,7" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"` + JdbcQuery *bool `thrift:"jdbcQuery,8" db:"jdbcQuery" json:"jdbcQuery,omitempty"` + Timeout *int64 `thrift:"timeout,9" db:"timeout" json:"timeout,omitempty"` + LegalPathNodes *bool `thrift:"legalPathNodes,10" db:"legalPathNodes" json:"legalPathNodes,omitempty"` } -func NewTSLastDataQueryReq() *TSLastDataQueryReq { - return &TSLastDataQueryReq{} +func NewTSRawDataQueryReq() *TSRawDataQueryReq { + return &TSRawDataQueryReq{} } -func (p *TSLastDataQueryReq) GetSessionId() int64 { +func (p *TSRawDataQueryReq) GetSessionId() int64 { return p.SessionId } -func (p *TSLastDataQueryReq) GetPaths() []string { +func (p *TSRawDataQueryReq) GetPaths() []string { return p.Paths } -var TSLastDataQueryReq_FetchSize_DEFAULT int32 -func (p *TSLastDataQueryReq) GetFetchSize() int32 { +var TSRawDataQueryReq_FetchSize_DEFAULT int32 +func (p *TSRawDataQueryReq) GetFetchSize() int32 { if !p.IsSetFetchSize() { - return TSLastDataQueryReq_FetchSize_DEFAULT + return TSRawDataQueryReq_FetchSize_DEFAULT } return *p.FetchSize } -func (p *TSLastDataQueryReq) GetTime() int64 { - return p.Time +func (p *TSRawDataQueryReq) GetStartTime() int64 { + return p.StartTime } -func (p *TSLastDataQueryReq) GetStatementId() int64 { +func (p *TSRawDataQueryReq) GetEndTime() int64 { + return p.EndTime +} + +func (p *TSRawDataQueryReq) GetStatementId() int64 { return p.StatementId } -var TSLastDataQueryReq_EnableRedirectQuery_DEFAULT bool -func (p *TSLastDataQueryReq) GetEnableRedirectQuery() bool { +var TSRawDataQueryReq_EnableRedirectQuery_DEFAULT bool +func (p *TSRawDataQueryReq) GetEnableRedirectQuery() bool { if !p.IsSetEnableRedirectQuery() { - return TSLastDataQueryReq_EnableRedirectQuery_DEFAULT + return TSRawDataQueryReq_EnableRedirectQuery_DEFAULT } return *p.EnableRedirectQuery } -var TSLastDataQueryReq_JdbcQuery_DEFAULT bool -func (p *TSLastDataQueryReq) GetJdbcQuery() bool { +var TSRawDataQueryReq_JdbcQuery_DEFAULT bool +func (p *TSRawDataQueryReq) GetJdbcQuery() bool { if !p.IsSetJdbcQuery() { - return TSLastDataQueryReq_JdbcQuery_DEFAULT + return TSRawDataQueryReq_JdbcQuery_DEFAULT } return *p.JdbcQuery } -func (p *TSLastDataQueryReq) IsSetFetchSize() bool { +var TSRawDataQueryReq_Timeout_DEFAULT int64 +func (p *TSRawDataQueryReq) GetTimeout() int64 { + if !p.IsSetTimeout() { + return TSRawDataQueryReq_Timeout_DEFAULT + } +return *p.Timeout +} +var TSRawDataQueryReq_LegalPathNodes_DEFAULT bool +func (p *TSRawDataQueryReq) GetLegalPathNodes() bool { + if !p.IsSetLegalPathNodes() { + return TSRawDataQueryReq_LegalPathNodes_DEFAULT + } +return *p.LegalPathNodes +} +func (p *TSRawDataQueryReq) IsSetFetchSize() bool { return p.FetchSize != nil } -func (p *TSLastDataQueryReq) IsSetEnableRedirectQuery() bool { +func (p *TSRawDataQueryReq) IsSetEnableRedirectQuery() bool { return p.EnableRedirectQuery != nil } -func (p *TSLastDataQueryReq) IsSetJdbcQuery() bool { +func (p *TSRawDataQueryReq) IsSetJdbcQuery() bool { return p.JdbcQuery != nil } -func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSRawDataQueryReq) IsSetTimeout() bool { + return p.Timeout != nil +} + +func (p *TSRawDataQueryReq) IsSetLegalPathNodes() bool { + return p.LegalPathNodes != nil +} + +func (p *TSRawDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; var issetPaths bool = false; - var issetTime bool = false; + var issetStartTime bool = false; + var issetEndTime bool = false; var issetStatementId bool = false; for { @@ -11000,7 +11013,7 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e if err := p.ReadField4(ctx, iprot); err != nil { return err } - issetTime = true + issetStartTime = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -11011,17 +11024,18 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e if err := p.ReadField5(ctx, iprot); err != nil { return err } - issetStatementId = true + issetEndTime = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: - if fieldTypeId == thrift.BOOL { + if fieldTypeId == thrift.I64 { if err := p.ReadField6(ctx, iprot); err != nil { return err } + issetStatementId = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -11037,6 +11051,36 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e return err } } + case 8: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.I64 { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -11055,8 +11099,11 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e if !issetPaths{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")); } - if !issetTime{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Time is not set")); + if !issetStartTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set")); + } + if !issetEndTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndTime is not set")); } if !issetStatementId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")); @@ -11064,7 +11111,7 @@ func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *TSLastDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSRawDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -11073,7 +11120,7 @@ func (p *TSLastDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProt return nil } -func (p *TSLastDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSRawDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -11081,13 +11128,13 @@ func (p *TSLastDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProt tSlice := make([]string, 0, size) p.Paths = tSlice for i := 0; i < size; i ++ { -var _elem124 string +var _elem140 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem124 = v + _elem140 = v } - p.Paths = append(p.Paths, _elem124) + p.Paths = append(p.Paths, _elem140) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -11095,7 +11142,7 @@ var _elem124 string return nil } -func (p *TSLastDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSRawDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { @@ -11104,44 +11151,71 @@ func (p *TSLastDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProt return nil } -func (p *TSLastDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSRawDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 4: ", err) } else { - p.Time = v + p.StartTime = v } return nil } -func (p *TSLastDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSRawDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { - p.StatementId = v + p.EndTime = v } return nil } -func (p *TSLastDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *TSRawDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { - p.EnableRedirectQuery = &v + p.StatementId = v } return nil } -func (p *TSLastDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSRawDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadBool(ctx); err != nil { return thrift.PrependError("error reading field 7: ", err) +} else { + p.EnableRedirectQuery = &v +} + return nil +} + +func (p *TSRawDataQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 8: ", err) } else { p.JdbcQuery = &v } return nil } -func (p *TSLastDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSLastDataQueryReq"); err != nil { +func (p *TSRawDataQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 9: ", err) +} else { + p.Timeout = &v +} + return nil +} + +func (p *TSRawDataQueryReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 10: ", err) +} else { + p.LegalPathNodes = &v +} + return nil +} + +func (p *TSRawDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSRawDataQueryReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -11151,6 +11225,9 @@ func (p *TSLastDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) if err := p.writeField5(ctx, oprot); err != nil { return err } if err := p.writeField6(ctx, oprot); err != nil { return err } if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -11159,7 +11236,7 @@ func (p *TSLastDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) return nil } -func (p *TSLastDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSRawDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -11169,7 +11246,7 @@ func (p *TSLastDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProt return err } -func (p *TSLastDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSRawDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { @@ -11187,7 +11264,7 @@ func (p *TSLastDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProt return err } -func (p *TSLastDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSRawDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetFetchSize() { if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) } @@ -11199,51 +11276,85 @@ func (p *TSLastDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProt return err } -func (p *TSLastDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "time", thrift.I64, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:time: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.Time)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.time (4) field write error: ", p), err) } +func (p *TSRawDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:startTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startTime (4) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:time: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:startTime: ", p), err) } return err } -func (p *TSLastDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:statementId: ", p), err) } +func (p *TSRawDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:endTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.EndTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.endTime (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:endTime: ", p), err) } + return err +} + +func (p *TSRawDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:statementId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.statementId (5) field write error: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T.statementId (6) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:statementId: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:statementId: ", p), err) } return err } -func (p *TSLastDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSRawDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetEnableRedirectQuery() { - if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:enableRedirectQuery: ", p), err) } + if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:enableRedirectQuery: ", p), err) } if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (6) field write error: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (7) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:enableRedirectQuery: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:enableRedirectQuery: ", p), err) } } return err } -func (p *TSLastDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSRawDataQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetJdbcQuery() { - if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:jdbcQuery: ", p), err) } + if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:jdbcQuery: ", p), err) } if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (7) field write error: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (8) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:jdbcQuery: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:jdbcQuery: ", p), err) } } return err } -func (p *TSLastDataQueryReq) Equals(other *TSLastDataQueryReq) bool { +func (p *TSRawDataQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimeout() { + if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:timeout: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timeout (9) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:timeout: ", p), err) } + } + return err +} + +func (p *TSRawDataQueryReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLegalPathNodes() { + if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:legalPathNodes: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (10) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:legalPathNodes: ", p), err) } + } + return err +} + +func (p *TSRawDataQueryReq) Equals(other *TSRawDataQueryReq) bool { if p == other { return true } else if p == nil || other == nil { @@ -11252,8 +11363,8 @@ func (p *TSLastDataQueryReq) Equals(other *TSLastDataQueryReq) bool { if p.SessionId != other.SessionId { return false } if len(p.Paths) != len(other.Paths) { return false } for i, _tgt := range p.Paths { - _src125 := other.Paths[i] - if _tgt != _src125 { return false } + _src141 := other.Paths[i] + if _tgt != _src141 { return false } } if p.FetchSize != other.FetchSize { if p.FetchSize == nil || other.FetchSize == nil { @@ -11261,7 +11372,8 @@ func (p *TSLastDataQueryReq) Equals(other *TSLastDataQueryReq) bool { } if (*p.FetchSize) != (*other.FetchSize) { return false } } - if p.Time != other.Time { return false } + if p.StartTime != other.StartTime { return false } + if p.EndTime != other.EndTime { return false } if p.StatementId != other.StatementId { return false } if p.EnableRedirectQuery != other.EnableRedirectQuery { if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil { @@ -11275,108 +11387,134 @@ func (p *TSLastDataQueryReq) Equals(other *TSLastDataQueryReq) bool { } if (*p.JdbcQuery) != (*other.JdbcQuery) { return false } } + if p.Timeout != other.Timeout { + if p.Timeout == nil || other.Timeout == nil { + return false + } + if (*p.Timeout) != (*other.Timeout) { return false } + } + if p.LegalPathNodes != other.LegalPathNodes { + if p.LegalPathNodes == nil || other.LegalPathNodes == nil { + return false + } + if (*p.LegalPathNodes) != (*other.LegalPathNodes) { return false } + } return true } -func (p *TSLastDataQueryReq) String() string { +func (p *TSRawDataQueryReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSLastDataQueryReq(%+v)", *p) + return fmt.Sprintf("TSRawDataQueryReq(%+v)", *p) } // Attributes: // - SessionId // - Paths -// - DataTypes -// - Encodings -// - Compressors -// - PropsList -// - TagsList -// - AttributesList -// - MeasurementAliasList -type TSCreateMultiTimeseriesReq struct { +// - FetchSize +// - Time +// - StatementId +// - EnableRedirectQuery +// - JdbcQuery +// - Timeout +// - LegalPathNodes +type TSLastDataQueryReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` - DataTypes []int32 `thrift:"dataTypes,3,required" db:"dataTypes" json:"dataTypes"` - Encodings []int32 `thrift:"encodings,4,required" db:"encodings" json:"encodings"` - Compressors []int32 `thrift:"compressors,5,required" db:"compressors" json:"compressors"` - PropsList []map[string]string `thrift:"propsList,6" db:"propsList" json:"propsList,omitempty"` - TagsList []map[string]string `thrift:"tagsList,7" db:"tagsList" json:"tagsList,omitempty"` - AttributesList []map[string]string `thrift:"attributesList,8" db:"attributesList" json:"attributesList,omitempty"` - MeasurementAliasList []string `thrift:"measurementAliasList,9" db:"measurementAliasList" json:"measurementAliasList,omitempty"` + FetchSize *int32 `thrift:"fetchSize,3" db:"fetchSize" json:"fetchSize,omitempty"` + Time int64 `thrift:"time,4,required" db:"time" json:"time"` + StatementId int64 `thrift:"statementId,5,required" db:"statementId" json:"statementId"` + EnableRedirectQuery *bool `thrift:"enableRedirectQuery,6" db:"enableRedirectQuery" json:"enableRedirectQuery,omitempty"` + JdbcQuery *bool `thrift:"jdbcQuery,7" db:"jdbcQuery" json:"jdbcQuery,omitempty"` + Timeout *int64 `thrift:"timeout,8" db:"timeout" json:"timeout,omitempty"` + LegalPathNodes *bool `thrift:"legalPathNodes,9" db:"legalPathNodes" json:"legalPathNodes,omitempty"` } -func NewTSCreateMultiTimeseriesReq() *TSCreateMultiTimeseriesReq { - return &TSCreateMultiTimeseriesReq{} +func NewTSLastDataQueryReq() *TSLastDataQueryReq { + return &TSLastDataQueryReq{} } -func (p *TSCreateMultiTimeseriesReq) GetSessionId() int64 { +func (p *TSLastDataQueryReq) GetSessionId() int64 { return p.SessionId } -func (p *TSCreateMultiTimeseriesReq) GetPaths() []string { +func (p *TSLastDataQueryReq) GetPaths() []string { return p.Paths } - -func (p *TSCreateMultiTimeseriesReq) GetDataTypes() []int32 { - return p.DataTypes +var TSLastDataQueryReq_FetchSize_DEFAULT int32 +func (p *TSLastDataQueryReq) GetFetchSize() int32 { + if !p.IsSetFetchSize() { + return TSLastDataQueryReq_FetchSize_DEFAULT + } +return *p.FetchSize } -func (p *TSCreateMultiTimeseriesReq) GetEncodings() []int32 { - return p.Encodings +func (p *TSLastDataQueryReq) GetTime() int64 { + return p.Time } -func (p *TSCreateMultiTimeseriesReq) GetCompressors() []int32 { - return p.Compressors +func (p *TSLastDataQueryReq) GetStatementId() int64 { + return p.StatementId } -var TSCreateMultiTimeseriesReq_PropsList_DEFAULT []map[string]string - -func (p *TSCreateMultiTimeseriesReq) GetPropsList() []map[string]string { - return p.PropsList +var TSLastDataQueryReq_EnableRedirectQuery_DEFAULT bool +func (p *TSLastDataQueryReq) GetEnableRedirectQuery() bool { + if !p.IsSetEnableRedirectQuery() { + return TSLastDataQueryReq_EnableRedirectQuery_DEFAULT + } +return *p.EnableRedirectQuery } -var TSCreateMultiTimeseriesReq_TagsList_DEFAULT []map[string]string - -func (p *TSCreateMultiTimeseriesReq) GetTagsList() []map[string]string { - return p.TagsList +var TSLastDataQueryReq_JdbcQuery_DEFAULT bool +func (p *TSLastDataQueryReq) GetJdbcQuery() bool { + if !p.IsSetJdbcQuery() { + return TSLastDataQueryReq_JdbcQuery_DEFAULT + } +return *p.JdbcQuery } -var TSCreateMultiTimeseriesReq_AttributesList_DEFAULT []map[string]string - -func (p *TSCreateMultiTimeseriesReq) GetAttributesList() []map[string]string { - return p.AttributesList +var TSLastDataQueryReq_Timeout_DEFAULT int64 +func (p *TSLastDataQueryReq) GetTimeout() int64 { + if !p.IsSetTimeout() { + return TSLastDataQueryReq_Timeout_DEFAULT + } +return *p.Timeout } -var TSCreateMultiTimeseriesReq_MeasurementAliasList_DEFAULT []string - -func (p *TSCreateMultiTimeseriesReq) GetMeasurementAliasList() []string { - return p.MeasurementAliasList +var TSLastDataQueryReq_LegalPathNodes_DEFAULT bool +func (p *TSLastDataQueryReq) GetLegalPathNodes() bool { + if !p.IsSetLegalPathNodes() { + return TSLastDataQueryReq_LegalPathNodes_DEFAULT + } +return *p.LegalPathNodes } -func (p *TSCreateMultiTimeseriesReq) IsSetPropsList() bool { - return p.PropsList != nil +func (p *TSLastDataQueryReq) IsSetFetchSize() bool { + return p.FetchSize != nil } -func (p *TSCreateMultiTimeseriesReq) IsSetTagsList() bool { - return p.TagsList != nil +func (p *TSLastDataQueryReq) IsSetEnableRedirectQuery() bool { + return p.EnableRedirectQuery != nil } -func (p *TSCreateMultiTimeseriesReq) IsSetAttributesList() bool { - return p.AttributesList != nil +func (p *TSLastDataQueryReq) IsSetJdbcQuery() bool { + return p.JdbcQuery != nil } -func (p *TSCreateMultiTimeseriesReq) IsSetMeasurementAliasList() bool { - return p.MeasurementAliasList != nil +func (p *TSLastDataQueryReq) IsSetTimeout() bool { + return p.Timeout != nil } -func (p *TSCreateMultiTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSLastDataQueryReq) IsSetLegalPathNodes() bool { + return p.LegalPathNodes != nil +} + +func (p *TSLastDataQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; var issetPaths bool = false; - var issetDataTypes bool = false; - var issetEncodings bool = false; - var issetCompressors bool = false; + var issetTime bool = false; + var issetStatementId bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -11408,40 +11546,39 @@ func (p *TSCreateMultiTimeseriesReq) Read(ctx context.Context, iprot thrift.TPro } } case 3: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I32 { if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetDataTypes = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I64 { if err := p.ReadField4(ctx, iprot); err != nil { return err } - issetEncodings = true + issetTime = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I64 { if err := p.ReadField5(ctx, iprot); err != nil { return err } - issetCompressors = true + issetStatementId = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.BOOL { if err := p.ReadField6(ctx, iprot); err != nil { return err } @@ -11451,7 +11588,7 @@ func (p *TSCreateMultiTimeseriesReq) Read(ctx context.Context, iprot thrift.TPro } } case 7: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.BOOL { if err := p.ReadField7(ctx, iprot); err != nil { return err } @@ -11461,7 +11598,7 @@ func (p *TSCreateMultiTimeseriesReq) Read(ctx context.Context, iprot thrift.TPro } } case 8: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I64 { if err := p.ReadField8(ctx, iprot); err != nil { return err } @@ -11471,7 +11608,7 @@ func (p *TSCreateMultiTimeseriesReq) Read(ctx context.Context, iprot thrift.TPro } } case 9: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.BOOL { if err := p.ReadField9(ctx, iprot); err != nil { return err } @@ -11498,19 +11635,16 @@ func (p *TSCreateMultiTimeseriesReq) Read(ctx context.Context, iprot thrift.TPro if !issetPaths{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")); } - if !issetDataTypes{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set")); - } - if !issetEncodings{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set")); + if !issetTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Time is not set")); } - if !issetCompressors{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set")); + if !issetStatementId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")); } return nil } -func (p *TSCreateMultiTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSLastDataQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -11519,7 +11653,7 @@ func (p *TSCreateMultiTimeseriesReq) ReadField1(ctx context.Context, iprot thri return nil } -func (p *TSCreateMultiTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSLastDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -11527,13 +11661,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField2(ctx context.Context, iprot thri tSlice := make([]string, 0, size) p.Paths = tSlice for i := 0; i < size; i ++ { -var _elem126 string +var _elem142 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem126 = v + _elem142 = v } - p.Paths = append(p.Paths, _elem126) + p.Paths = append(p.Paths, _elem142) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -11541,216 +11675,71 @@ var _elem126 string return nil } -func (p *TSCreateMultiTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int32, 0, size) - p.DataTypes = tSlice - for i := 0; i < size; i ++ { -var _elem127 int32 - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSLastDataQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) } else { - _elem127 = v + p.FetchSize = &v } - p.DataTypes = append(p.DataTypes, _elem127) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSCreateMultiTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int32, 0, size) - p.Encodings = tSlice - for i := 0; i < size; i ++ { -var _elem128 int32 - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSLastDataQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) } else { - _elem128 = v + p.Time = v } - p.Encodings = append(p.Encodings, _elem128) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSCreateMultiTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int32, 0, size) - p.Compressors = tSlice - for i := 0; i < size; i ++ { -var _elem129 int32 - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSLastDataQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) } else { - _elem129 = v + p.StatementId = v } - p.Compressors = append(p.Compressors, _elem129) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSCreateMultiTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]map[string]string, 0, size) - p.PropsList = tSlice - for i := 0; i < size; i ++ { - _, _, size, err := iprot.ReadMapBegin(ctx) - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - _elem130 := tMap - for i := 0; i < size; i ++ { -var _key131 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _key131 = v -} -var _val132 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSLastDataQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) } else { - _val132 = v + p.EnableRedirectQuery = &v } - _elem130[_key131] = _val132 - } - if err := iprot.ReadMapEnd(ctx); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - p.PropsList = append(p.PropsList, _elem130) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSCreateMultiTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]map[string]string, 0, size) - p.TagsList = tSlice - for i := 0; i < size; i ++ { - _, _, size, err := iprot.ReadMapBegin(ctx) - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - _elem133 := tMap - for i := 0; i < size; i ++ { -var _key134 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _key134 = v -} -var _val135 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSLastDataQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) } else { - _val135 = v + p.JdbcQuery = &v } - _elem133[_key134] = _val135 - } - if err := iprot.ReadMapEnd(ctx); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - p.TagsList = append(p.TagsList, _elem133) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSCreateMultiTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]map[string]string, 0, size) - p.AttributesList = tSlice - for i := 0; i < size; i ++ { - _, _, size, err := iprot.ReadMapBegin(ctx) - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - _elem136 := tMap - for i := 0; i < size; i ++ { -var _key137 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _key137 = v -} -var _val138 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSLastDataQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 8: ", err) } else { - _val138 = v + p.Timeout = &v } - _elem136[_key137] = _val138 - } - if err := iprot.ReadMapEnd(ctx); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - p.AttributesList = append(p.AttributesList, _elem136) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSCreateMultiTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.MeasurementAliasList = tSlice - for i := 0; i < size; i ++ { -var _elem139 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *TSLastDataQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 9: ", err) } else { - _elem139 = v + p.LegalPathNodes = &v } - p.MeasurementAliasList = append(p.MeasurementAliasList, _elem139) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSCreateMultiTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSCreateMultiTimeseriesReq"); err != nil { +func (p *TSLastDataQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSLastDataQueryReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -11770,7 +11759,7 @@ func (p *TSCreateMultiTimeseriesReq) Write(ctx context.Context, oprot thrift.TPr return nil } -func (p *TSCreateMultiTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSLastDataQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -11780,7 +11769,7 @@ func (p *TSCreateMultiTimeseriesReq) writeField1(ctx context.Context, oprot thri return err } -func (p *TSCreateMultiTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSLastDataQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) } if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { @@ -11798,171 +11787,87 @@ func (p *TSCreateMultiTimeseriesReq) writeField2(ctx context.Context, oprot thri return err } -func (p *TSCreateMultiTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:dataTypes: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.DataTypes { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) +func (p *TSLastDataQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFetchSize() { + if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fetchSize: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.fetchSize (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fetchSize: ", p), err) } } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:dataTypes: ", p), err) } return err } -func (p *TSCreateMultiTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:encodings: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Encodings { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSLastDataQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "time", thrift.I64, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:time: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.Time)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.time (4) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:encodings: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:time: ", p), err) } return err } -func (p *TSCreateMultiTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compressors: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Compressors { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSLastDataQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:statementId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.statementId (5) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compressors: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:statementId: ", p), err) } return err } -func (p *TSCreateMultiTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetPropsList() { - if err := oprot.WriteFieldBegin(ctx, "propsList", thrift.LIST, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:propsList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.PropsList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.PropsList { - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range v { - if err := oprot.WriteString(ctx, string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(ctx); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSLastDataQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetEnableRedirectQuery() { + if err := oprot.WriteFieldBegin(ctx, "enableRedirectQuery", thrift.BOOL, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:enableRedirectQuery: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.EnableRedirectQuery)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.enableRedirectQuery (6) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:propsList: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:enableRedirectQuery: ", p), err) } } return err } -func (p *TSCreateMultiTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetTagsList() { - if err := oprot.WriteFieldBegin(ctx, "tagsList", thrift.LIST, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tagsList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.TagsList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.TagsList { - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range v { - if err := oprot.WriteString(ctx, string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(ctx); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSLastDataQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetJdbcQuery() { + if err := oprot.WriteFieldBegin(ctx, "jdbcQuery", thrift.BOOL, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:jdbcQuery: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.JdbcQuery)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.jdbcQuery (7) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tagsList: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:jdbcQuery: ", p), err) } } return err } -func (p *TSCreateMultiTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetAttributesList() { - if err := oprot.WriteFieldBegin(ctx, "attributesList", thrift.LIST, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:attributesList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.AttributesList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.AttributesList { - if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range v { - if err := oprot.WriteString(ctx, string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(ctx); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSLastDataQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimeout() { + if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:timeout: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timeout (8) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:attributesList: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:timeout: ", p), err) } } return err } -func (p *TSCreateMultiTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetMeasurementAliasList() { - if err := oprot.WriteFieldBegin(ctx, "measurementAliasList", thrift.LIST, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:measurementAliasList: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.MeasurementAliasList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.MeasurementAliasList { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *TSLastDataQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLegalPathNodes() { + if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:legalPathNodes: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (9) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:measurementAliasList: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:legalPathNodes: ", p), err) } } return err } -func (p *TSCreateMultiTimeseriesReq) Equals(other *TSCreateMultiTimeseriesReq) bool { +func (p *TSLastDataQueryReq) Equals(other *TSLastDataQueryReq) bool { if p == other { return true } else if p == nil || other == nil { @@ -11971,184 +11876,183 @@ func (p *TSCreateMultiTimeseriesReq) Equals(other *TSCreateMultiTimeseriesReq) b if p.SessionId != other.SessionId { return false } if len(p.Paths) != len(other.Paths) { return false } for i, _tgt := range p.Paths { - _src140 := other.Paths[i] - if _tgt != _src140 { return false } - } - if len(p.DataTypes) != len(other.DataTypes) { return false } - for i, _tgt := range p.DataTypes { - _src141 := other.DataTypes[i] - if _tgt != _src141 { return false } - } - if len(p.Encodings) != len(other.Encodings) { return false } - for i, _tgt := range p.Encodings { - _src142 := other.Encodings[i] - if _tgt != _src142 { return false } - } - if len(p.Compressors) != len(other.Compressors) { return false } - for i, _tgt := range p.Compressors { - _src143 := other.Compressors[i] + _src143 := other.Paths[i] if _tgt != _src143 { return false } } - if len(p.PropsList) != len(other.PropsList) { return false } - for i, _tgt := range p.PropsList { - _src144 := other.PropsList[i] - if len(_tgt) != len(_src144) { return false } - for k, _tgt := range _tgt { - _src145 := _src144[k] - if _tgt != _src145 { return false } + if p.FetchSize != other.FetchSize { + if p.FetchSize == nil || other.FetchSize == nil { + return false } + if (*p.FetchSize) != (*other.FetchSize) { return false } } - if len(p.TagsList) != len(other.TagsList) { return false } - for i, _tgt := range p.TagsList { - _src146 := other.TagsList[i] - if len(_tgt) != len(_src146) { return false } - for k, _tgt := range _tgt { - _src147 := _src146[k] - if _tgt != _src147 { return false } + if p.Time != other.Time { return false } + if p.StatementId != other.StatementId { return false } + if p.EnableRedirectQuery != other.EnableRedirectQuery { + if p.EnableRedirectQuery == nil || other.EnableRedirectQuery == nil { + return false } + if (*p.EnableRedirectQuery) != (*other.EnableRedirectQuery) { return false } } - if len(p.AttributesList) != len(other.AttributesList) { return false } - for i, _tgt := range p.AttributesList { - _src148 := other.AttributesList[i] - if len(_tgt) != len(_src148) { return false } - for k, _tgt := range _tgt { - _src149 := _src148[k] - if _tgt != _src149 { return false } + if p.JdbcQuery != other.JdbcQuery { + if p.JdbcQuery == nil || other.JdbcQuery == nil { + return false } + if (*p.JdbcQuery) != (*other.JdbcQuery) { return false } } - if len(p.MeasurementAliasList) != len(other.MeasurementAliasList) { return false } - for i, _tgt := range p.MeasurementAliasList { - _src150 := other.MeasurementAliasList[i] - if _tgt != _src150 { return false } + if p.Timeout != other.Timeout { + if p.Timeout == nil || other.Timeout == nil { + return false + } + if (*p.Timeout) != (*other.Timeout) { return false } + } + if p.LegalPathNodes != other.LegalPathNodes { + if p.LegalPathNodes == nil || other.LegalPathNodes == nil { + return false + } + if (*p.LegalPathNodes) != (*other.LegalPathNodes) { return false } } return true } -func (p *TSCreateMultiTimeseriesReq) String() string { +func (p *TSLastDataQueryReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSCreateMultiTimeseriesReq(%+v)", *p) + return fmt.Sprintf("TSLastDataQueryReq(%+v)", *p) } // Attributes: -// - Version -// - SupportedTimeAggregationOperations -// - TimestampPrecision -// - MaxConcurrentClientNum -// - WatermarkSecretKey -// - WatermarkBitString -// - WatermarkParamMarkRate -// - WatermarkParamMaxRightBit -// - ThriftMaxFrameSize -// - IsReadOnly -type ServerProperties struct { - Version string `thrift:"version,1,required" db:"version" json:"version"` - SupportedTimeAggregationOperations []string `thrift:"supportedTimeAggregationOperations,2,required" db:"supportedTimeAggregationOperations" json:"supportedTimeAggregationOperations"` - TimestampPrecision string `thrift:"timestampPrecision,3,required" db:"timestampPrecision" json:"timestampPrecision"` - MaxConcurrentClientNum int32 `thrift:"maxConcurrentClientNum,4" db:"maxConcurrentClientNum" json:"maxConcurrentClientNum"` - WatermarkSecretKey *string `thrift:"watermarkSecretKey,5" db:"watermarkSecretKey" json:"watermarkSecretKey,omitempty"` - WatermarkBitString *string `thrift:"watermarkBitString,6" db:"watermarkBitString" json:"watermarkBitString,omitempty"` - WatermarkParamMarkRate *int32 `thrift:"watermarkParamMarkRate,7" db:"watermarkParamMarkRate" json:"watermarkParamMarkRate,omitempty"` - WatermarkParamMaxRightBit *int32 `thrift:"watermarkParamMaxRightBit,8" db:"watermarkParamMaxRightBit" json:"watermarkParamMaxRightBit,omitempty"` - ThriftMaxFrameSize *int32 `thrift:"thriftMaxFrameSize,9" db:"thriftMaxFrameSize" json:"thriftMaxFrameSize,omitempty"` - IsReadOnly *bool `thrift:"isReadOnly,10" db:"isReadOnly" json:"isReadOnly,omitempty"` +// - SessionId +// - StatementId +// - Paths +// - Aggregations +// - StartTime +// - EndTime +// - Interval +// - SlidingStep +// - FetchSize +// - Timeout +// - LegalPathNodes +type TSAggregationQueryReq struct { + SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` + StatementId int64 `thrift:"statementId,2,required" db:"statementId" json:"statementId"` + Paths []string `thrift:"paths,3,required" db:"paths" json:"paths"` + Aggregations []common.TAggregationType `thrift:"aggregations,4,required" db:"aggregations" json:"aggregations"` + StartTime *int64 `thrift:"startTime,5" db:"startTime" json:"startTime,omitempty"` + EndTime *int64 `thrift:"endTime,6" db:"endTime" json:"endTime,omitempty"` + Interval *int64 `thrift:"interval,7" db:"interval" json:"interval,omitempty"` + SlidingStep *int64 `thrift:"slidingStep,8" db:"slidingStep" json:"slidingStep,omitempty"` + FetchSize *int32 `thrift:"fetchSize,9" db:"fetchSize" json:"fetchSize,omitempty"` + Timeout *int64 `thrift:"timeout,10" db:"timeout" json:"timeout,omitempty"` + LegalPathNodes *bool `thrift:"legalPathNodes,11" db:"legalPathNodes" json:"legalPathNodes,omitempty"` } -func NewServerProperties() *ServerProperties { - return &ServerProperties{} +func NewTSAggregationQueryReq() *TSAggregationQueryReq { + return &TSAggregationQueryReq{} } -func (p *ServerProperties) GetVersion() string { - return p.Version +func (p *TSAggregationQueryReq) GetSessionId() int64 { + return p.SessionId } -func (p *ServerProperties) GetSupportedTimeAggregationOperations() []string { - return p.SupportedTimeAggregationOperations +func (p *TSAggregationQueryReq) GetStatementId() int64 { + return p.StatementId } -func (p *ServerProperties) GetTimestampPrecision() string { - return p.TimestampPrecision +func (p *TSAggregationQueryReq) GetPaths() []string { + return p.Paths } -func (p *ServerProperties) GetMaxConcurrentClientNum() int32 { - return p.MaxConcurrentClientNum +func (p *TSAggregationQueryReq) GetAggregations() []common.TAggregationType { + return p.Aggregations } -var ServerProperties_WatermarkSecretKey_DEFAULT string -func (p *ServerProperties) GetWatermarkSecretKey() string { - if !p.IsSetWatermarkSecretKey() { - return ServerProperties_WatermarkSecretKey_DEFAULT +var TSAggregationQueryReq_StartTime_DEFAULT int64 +func (p *TSAggregationQueryReq) GetStartTime() int64 { + if !p.IsSetStartTime() { + return TSAggregationQueryReq_StartTime_DEFAULT } -return *p.WatermarkSecretKey +return *p.StartTime } -var ServerProperties_WatermarkBitString_DEFAULT string -func (p *ServerProperties) GetWatermarkBitString() string { - if !p.IsSetWatermarkBitString() { - return ServerProperties_WatermarkBitString_DEFAULT +var TSAggregationQueryReq_EndTime_DEFAULT int64 +func (p *TSAggregationQueryReq) GetEndTime() int64 { + if !p.IsSetEndTime() { + return TSAggregationQueryReq_EndTime_DEFAULT } -return *p.WatermarkBitString +return *p.EndTime } -var ServerProperties_WatermarkParamMarkRate_DEFAULT int32 -func (p *ServerProperties) GetWatermarkParamMarkRate() int32 { - if !p.IsSetWatermarkParamMarkRate() { - return ServerProperties_WatermarkParamMarkRate_DEFAULT +var TSAggregationQueryReq_Interval_DEFAULT int64 +func (p *TSAggregationQueryReq) GetInterval() int64 { + if !p.IsSetInterval() { + return TSAggregationQueryReq_Interval_DEFAULT } -return *p.WatermarkParamMarkRate +return *p.Interval } -var ServerProperties_WatermarkParamMaxRightBit_DEFAULT int32 -func (p *ServerProperties) GetWatermarkParamMaxRightBit() int32 { - if !p.IsSetWatermarkParamMaxRightBit() { - return ServerProperties_WatermarkParamMaxRightBit_DEFAULT +var TSAggregationQueryReq_SlidingStep_DEFAULT int64 +func (p *TSAggregationQueryReq) GetSlidingStep() int64 { + if !p.IsSetSlidingStep() { + return TSAggregationQueryReq_SlidingStep_DEFAULT } -return *p.WatermarkParamMaxRightBit +return *p.SlidingStep } -var ServerProperties_ThriftMaxFrameSize_DEFAULT int32 -func (p *ServerProperties) GetThriftMaxFrameSize() int32 { - if !p.IsSetThriftMaxFrameSize() { - return ServerProperties_ThriftMaxFrameSize_DEFAULT +var TSAggregationQueryReq_FetchSize_DEFAULT int32 +func (p *TSAggregationQueryReq) GetFetchSize() int32 { + if !p.IsSetFetchSize() { + return TSAggregationQueryReq_FetchSize_DEFAULT } -return *p.ThriftMaxFrameSize +return *p.FetchSize } -var ServerProperties_IsReadOnly_DEFAULT bool -func (p *ServerProperties) GetIsReadOnly() bool { - if !p.IsSetIsReadOnly() { - return ServerProperties_IsReadOnly_DEFAULT +var TSAggregationQueryReq_Timeout_DEFAULT int64 +func (p *TSAggregationQueryReq) GetTimeout() int64 { + if !p.IsSetTimeout() { + return TSAggregationQueryReq_Timeout_DEFAULT } -return *p.IsReadOnly +return *p.Timeout } -func (p *ServerProperties) IsSetWatermarkSecretKey() bool { - return p.WatermarkSecretKey != nil +var TSAggregationQueryReq_LegalPathNodes_DEFAULT bool +func (p *TSAggregationQueryReq) GetLegalPathNodes() bool { + if !p.IsSetLegalPathNodes() { + return TSAggregationQueryReq_LegalPathNodes_DEFAULT + } +return *p.LegalPathNodes +} +func (p *TSAggregationQueryReq) IsSetStartTime() bool { + return p.StartTime != nil } -func (p *ServerProperties) IsSetWatermarkBitString() bool { - return p.WatermarkBitString != nil +func (p *TSAggregationQueryReq) IsSetEndTime() bool { + return p.EndTime != nil } -func (p *ServerProperties) IsSetWatermarkParamMarkRate() bool { - return p.WatermarkParamMarkRate != nil +func (p *TSAggregationQueryReq) IsSetInterval() bool { + return p.Interval != nil } -func (p *ServerProperties) IsSetWatermarkParamMaxRightBit() bool { - return p.WatermarkParamMaxRightBit != nil +func (p *TSAggregationQueryReq) IsSetSlidingStep() bool { + return p.SlidingStep != nil } -func (p *ServerProperties) IsSetThriftMaxFrameSize() bool { - return p.ThriftMaxFrameSize != nil +func (p *TSAggregationQueryReq) IsSetFetchSize() bool { + return p.FetchSize != nil } -func (p *ServerProperties) IsSetIsReadOnly() bool { - return p.IsReadOnly != nil +func (p *TSAggregationQueryReq) IsSetTimeout() bool { + return p.Timeout != nil } -func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSAggregationQueryReq) IsSetLegalPathNodes() bool { + return p.LegalPathNodes != nil +} + +func (p *TSAggregationQueryReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - var issetVersion bool = false; - var issetSupportedTimeAggregationOperations bool = false; - var issetTimestampPrecision bool = false; + var issetSessionId bool = false; + var issetStatementId bool = false; + var issetPaths bool = false; + var issetAggregations bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -12158,50 +12062,51 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.I64 { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetVersion = true + issetSessionId = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I64 { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetSupportedTimeAggregationOperations = true + issetStatementId = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.LIST { if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetTimestampPrecision = true + issetPaths = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.LIST { if err := p.ReadField4(ctx, iprot); err != nil { return err } + issetAggregations = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.I64 { if err := p.ReadField5(ctx, iprot); err != nil { return err } @@ -12211,7 +12116,7 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err } } case 6: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.I64 { if err := p.ReadField6(ctx, iprot); err != nil { return err } @@ -12221,7 +12126,7 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err } } case 7: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.I64 { if err := p.ReadField7(ctx, iprot); err != nil { return err } @@ -12231,7 +12136,7 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err } } case 8: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.I64 { if err := p.ReadField8(ctx, iprot); err != nil { return err } @@ -12251,7 +12156,7 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err } } case 10: - if fieldTypeId == thrift.BOOL { + if fieldTypeId == thrift.I64 { if err := p.ReadField10(ctx, iprot); err != nil { return err } @@ -12260,6 +12165,16 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err return err } } + case 11: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -12272,42 +12187,54 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if !issetVersion{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")); + if !issetSessionId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetSupportedTimeAggregationOperations{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SupportedTimeAggregationOperations is not set")); + if !issetStatementId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")); } - if !issetTimestampPrecision{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimestampPrecision is not set")); + if !issetPaths{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")); + } + if !issetAggregations{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Aggregations is not set")); } return nil } -func (p *ServerProperties) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TSAggregationQueryReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { - p.Version = v + p.SessionId = v } return nil } -func (p *ServerProperties) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSAggregationQueryReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.StatementId = v +} + return nil +} + +func (p *TSAggregationQueryReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - p.SupportedTimeAggregationOperations = tSlice + p.Paths = tSlice for i := 0; i < size; i ++ { -var _elem151 string +var _elem144 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem151 = v + _elem144 = v } - p.SupportedTimeAggregationOperations = append(p.SupportedTimeAggregationOperations, _elem151) + p.Paths = append(p.Paths, _elem144) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -12315,80 +12242,94 @@ var _elem151 string return nil } -func (p *ServerProperties) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) -} else { - p.TimestampPrecision = v -} - return nil -} - -func (p *ServerProperties) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 4: ", err) +func (p *TSAggregationQueryReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]common.TAggregationType, 0, size) + p.Aggregations = tSlice + for i := 0; i < size; i ++ { +var _elem145 common.TAggregationType + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.MaxConcurrentClientNum = v + temp := common.TAggregationType(v) + _elem145 = temp } + p.Aggregations = append(p.Aggregations, _elem145) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *ServerProperties) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TSAggregationQueryReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 5: ", err) } else { - p.WatermarkSecretKey = &v + p.StartTime = &v } return nil } -func (p *ServerProperties) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *TSAggregationQueryReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 6: ", err) } else { - p.WatermarkBitString = &v + p.EndTime = &v } return nil } -func (p *ServerProperties) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *TSAggregationQueryReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 7: ", err) } else { - p.WatermarkParamMarkRate = &v + p.Interval = &v } return nil } -func (p *ServerProperties) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *TSAggregationQueryReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 8: ", err) } else { - p.WatermarkParamMaxRightBit = &v + p.SlidingStep = &v } return nil } -func (p *ServerProperties) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSAggregationQueryReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 9: ", err) } else { - p.ThriftMaxFrameSize = &v + p.FetchSize = &v } return nil } -func (p *ServerProperties) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { +func (p *TSAggregationQueryReq) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 10: ", err) } else { - p.IsReadOnly = &v + p.Timeout = &v } return nil } -func (p *ServerProperties) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "ServerProperties"); err != nil { +func (p *TSAggregationQueryReq) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 11: ", err) +} else { + p.LegalPathNodes = &v +} + return nil +} + +func (p *TSAggregationQueryReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSAggregationQueryReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -12401,6 +12342,7 @@ func (p *ServerProperties) Write(ctx context.Context, oprot thrift.TProtocol) er if err := p.writeField8(ctx, oprot); err != nil { return err } if err := p.writeField9(ctx, oprot); err != nil { return err } if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -12409,23 +12351,33 @@ func (p *ServerProperties) Write(ctx context.Context, oprot thrift.TProtocol) er return nil } -func (p *ServerProperties) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "version", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:version: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Version)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.version (1) field write error: ", p), err) } +func (p *TSAggregationQueryReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:version: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } return err } -func (p *ServerProperties) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "supportedTimeAggregationOperations", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:supportedTimeAggregationOperations: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.SupportedTimeAggregationOperations)); err != nil { +func (p *TSAggregationQueryReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "statementId", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:statementId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.StatementId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.statementId (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:statementId: ", p), err) } + return err +} + +func (p *TSAggregationQueryReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:paths: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { return thrift.PrependError("error writing list begin: ", err) } - for _, v := range p.SupportedTimeAggregationOperations { + for _, v := range p.Paths { if err := oprot.WriteString(ctx, string(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } @@ -12433,196 +12385,274 @@ func (p *ServerProperties) writeField2(ctx context.Context, oprot thrift.TProtoc return thrift.PrependError("error writing list end: ", err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:supportedTimeAggregationOperations: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:paths: ", p), err) } return err } -func (p *ServerProperties) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "timestampPrecision", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestampPrecision: ", p), err) } - if err := oprot.WriteString(ctx, string(p.TimestampPrecision)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestampPrecision (3) field write error: ", p), err) } +func (p *TSAggregationQueryReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "aggregations", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:aggregations: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Aggregations)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Aggregations { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestampPrecision: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:aggregations: ", p), err) } return err } -func (p *ServerProperties) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "maxConcurrentClientNum", thrift.I32, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:maxConcurrentClientNum: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.MaxConcurrentClientNum)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.maxConcurrentClientNum (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:maxConcurrentClientNum: ", p), err) } +func (p *TSAggregationQueryReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStartTime() { + if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:startTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.StartTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startTime (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:startTime: ", p), err) } + } return err } -func (p *ServerProperties) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetWatermarkSecretKey() { - if err := oprot.WriteFieldBegin(ctx, "watermarkSecretKey", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:watermarkSecretKey: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.WatermarkSecretKey)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.watermarkSecretKey (5) field write error: ", p), err) } +func (p *TSAggregationQueryReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetEndTime() { + if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:endTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.EndTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.endTime (6) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:watermarkSecretKey: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:endTime: ", p), err) } } return err } -func (p *ServerProperties) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetWatermarkBitString() { - if err := oprot.WriteFieldBegin(ctx, "watermarkBitString", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:watermarkBitString: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.WatermarkBitString)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.watermarkBitString (6) field write error: ", p), err) } +func (p *TSAggregationQueryReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetInterval() { + if err := oprot.WriteFieldBegin(ctx, "interval", thrift.I64, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:interval: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Interval)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.interval (7) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:watermarkBitString: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:interval: ", p), err) } } return err } -func (p *ServerProperties) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetWatermarkParamMarkRate() { - if err := oprot.WriteFieldBegin(ctx, "watermarkParamMarkRate", thrift.I32, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:watermarkParamMarkRate: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.WatermarkParamMarkRate)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.watermarkParamMarkRate (7) field write error: ", p), err) } +func (p *TSAggregationQueryReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSlidingStep() { + if err := oprot.WriteFieldBegin(ctx, "slidingStep", thrift.I64, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:slidingStep: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.SlidingStep)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.slidingStep (8) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:watermarkParamMarkRate: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:slidingStep: ", p), err) } } return err } -func (p *ServerProperties) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetWatermarkParamMaxRightBit() { - if err := oprot.WriteFieldBegin(ctx, "watermarkParamMaxRightBit", thrift.I32, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:watermarkParamMaxRightBit: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.WatermarkParamMaxRightBit)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.watermarkParamMaxRightBit (8) field write error: ", p), err) } +func (p *TSAggregationQueryReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFetchSize() { + if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:fetchSize: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.fetchSize (9) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:watermarkParamMaxRightBit: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:fetchSize: ", p), err) } } return err } -func (p *ServerProperties) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetThriftMaxFrameSize() { - if err := oprot.WriteFieldBegin(ctx, "thriftMaxFrameSize", thrift.I32, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:thriftMaxFrameSize: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.ThriftMaxFrameSize)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.thriftMaxFrameSize (9) field write error: ", p), err) } +func (p *TSAggregationQueryReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimeout() { + if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:timeout: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timeout (10) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:thriftMaxFrameSize: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:timeout: ", p), err) } } return err } -func (p *ServerProperties) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetIsReadOnly() { - if err := oprot.WriteFieldBegin(ctx, "isReadOnly", thrift.BOOL, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:isReadOnly: ", p), err) } - if err := oprot.WriteBool(ctx, bool(*p.IsReadOnly)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.isReadOnly (10) field write error: ", p), err) } +func (p *TSAggregationQueryReq) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLegalPathNodes() { + if err := oprot.WriteFieldBegin(ctx, "legalPathNodes", thrift.BOOL, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:legalPathNodes: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.LegalPathNodes)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.legalPathNodes (11) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:isReadOnly: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:legalPathNodes: ", p), err) } } return err } -func (p *ServerProperties) Equals(other *ServerProperties) bool { +func (p *TSAggregationQueryReq) Equals(other *TSAggregationQueryReq) bool { if p == other { return true } else if p == nil || other == nil { return false } - if p.Version != other.Version { return false } - if len(p.SupportedTimeAggregationOperations) != len(other.SupportedTimeAggregationOperations) { return false } - for i, _tgt := range p.SupportedTimeAggregationOperations { - _src152 := other.SupportedTimeAggregationOperations[i] - if _tgt != _src152 { return false } + if p.SessionId != other.SessionId { return false } + if p.StatementId != other.StatementId { return false } + if len(p.Paths) != len(other.Paths) { return false } + for i, _tgt := range p.Paths { + _src146 := other.Paths[i] + if _tgt != _src146 { return false } } - if p.TimestampPrecision != other.TimestampPrecision { return false } - if p.MaxConcurrentClientNum != other.MaxConcurrentClientNum { return false } - if p.WatermarkSecretKey != other.WatermarkSecretKey { - if p.WatermarkSecretKey == nil || other.WatermarkSecretKey == nil { + if len(p.Aggregations) != len(other.Aggregations) { return false } + for i, _tgt := range p.Aggregations { + _src147 := other.Aggregations[i] + if _tgt != _src147 { return false } + } + if p.StartTime != other.StartTime { + if p.StartTime == nil || other.StartTime == nil { return false } - if (*p.WatermarkSecretKey) != (*other.WatermarkSecretKey) { return false } + if (*p.StartTime) != (*other.StartTime) { return false } } - if p.WatermarkBitString != other.WatermarkBitString { - if p.WatermarkBitString == nil || other.WatermarkBitString == nil { + if p.EndTime != other.EndTime { + if p.EndTime == nil || other.EndTime == nil { return false } - if (*p.WatermarkBitString) != (*other.WatermarkBitString) { return false } + if (*p.EndTime) != (*other.EndTime) { return false } } - if p.WatermarkParamMarkRate != other.WatermarkParamMarkRate { - if p.WatermarkParamMarkRate == nil || other.WatermarkParamMarkRate == nil { + if p.Interval != other.Interval { + if p.Interval == nil || other.Interval == nil { return false } - if (*p.WatermarkParamMarkRate) != (*other.WatermarkParamMarkRate) { return false } + if (*p.Interval) != (*other.Interval) { return false } } - if p.WatermarkParamMaxRightBit != other.WatermarkParamMaxRightBit { - if p.WatermarkParamMaxRightBit == nil || other.WatermarkParamMaxRightBit == nil { + if p.SlidingStep != other.SlidingStep { + if p.SlidingStep == nil || other.SlidingStep == nil { return false } - if (*p.WatermarkParamMaxRightBit) != (*other.WatermarkParamMaxRightBit) { return false } + if (*p.SlidingStep) != (*other.SlidingStep) { return false } } - if p.ThriftMaxFrameSize != other.ThriftMaxFrameSize { - if p.ThriftMaxFrameSize == nil || other.ThriftMaxFrameSize == nil { + if p.FetchSize != other.FetchSize { + if p.FetchSize == nil || other.FetchSize == nil { return false } - if (*p.ThriftMaxFrameSize) != (*other.ThriftMaxFrameSize) { return false } + if (*p.FetchSize) != (*other.FetchSize) { return false } } - if p.IsReadOnly != other.IsReadOnly { - if p.IsReadOnly == nil || other.IsReadOnly == nil { + if p.Timeout != other.Timeout { + if p.Timeout == nil || other.Timeout == nil { return false } - if (*p.IsReadOnly) != (*other.IsReadOnly) { return false } + if (*p.Timeout) != (*other.Timeout) { return false } + } + if p.LegalPathNodes != other.LegalPathNodes { + if p.LegalPathNodes == nil || other.LegalPathNodes == nil { + return false + } + if (*p.LegalPathNodes) != (*other.LegalPathNodes) { return false } } return true } -func (p *ServerProperties) String() string { +func (p *TSAggregationQueryReq) String() string { if p == nil { return "" } - return fmt.Sprintf("ServerProperties(%+v)", *p) + return fmt.Sprintf("TSAggregationQueryReq(%+v)", *p) } // Attributes: // - SessionId -// - TemplateName -// - PrefixPath -type TSSetSchemaTemplateReq struct { - SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"` - PrefixPath string `thrift:"prefixPath,3,required" db:"prefixPath" json:"prefixPath"` -} - -func NewTSSetSchemaTemplateReq() *TSSetSchemaTemplateReq { - return &TSSetSchemaTemplateReq{} +// - Paths +// - DataTypes +// - Encodings +// - Compressors +// - PropsList +// - TagsList +// - AttributesList +// - MeasurementAliasList +type TSCreateMultiTimeseriesReq struct { + SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` + Paths []string `thrift:"paths,2,required" db:"paths" json:"paths"` + DataTypes []int32 `thrift:"dataTypes,3,required" db:"dataTypes" json:"dataTypes"` + Encodings []int32 `thrift:"encodings,4,required" db:"encodings" json:"encodings"` + Compressors []int32 `thrift:"compressors,5,required" db:"compressors" json:"compressors"` + PropsList []map[string]string `thrift:"propsList,6" db:"propsList" json:"propsList,omitempty"` + TagsList []map[string]string `thrift:"tagsList,7" db:"tagsList" json:"tagsList,omitempty"` + AttributesList []map[string]string `thrift:"attributesList,8" db:"attributesList" json:"attributesList,omitempty"` + MeasurementAliasList []string `thrift:"measurementAliasList,9" db:"measurementAliasList" json:"measurementAliasList,omitempty"` +} + +func NewTSCreateMultiTimeseriesReq() *TSCreateMultiTimeseriesReq { + return &TSCreateMultiTimeseriesReq{} } -func (p *TSSetSchemaTemplateReq) GetSessionId() int64 { +func (p *TSCreateMultiTimeseriesReq) GetSessionId() int64 { return p.SessionId } -func (p *TSSetSchemaTemplateReq) GetTemplateName() string { - return p.TemplateName +func (p *TSCreateMultiTimeseriesReq) GetPaths() []string { + return p.Paths } -func (p *TSSetSchemaTemplateReq) GetPrefixPath() string { - return p.PrefixPath +func (p *TSCreateMultiTimeseriesReq) GetDataTypes() []int32 { + return p.DataTypes } -func (p *TSSetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *TSCreateMultiTimeseriesReq) GetEncodings() []int32 { + return p.Encodings +} + +func (p *TSCreateMultiTimeseriesReq) GetCompressors() []int32 { + return p.Compressors +} +var TSCreateMultiTimeseriesReq_PropsList_DEFAULT []map[string]string + +func (p *TSCreateMultiTimeseriesReq) GetPropsList() []map[string]string { + return p.PropsList +} +var TSCreateMultiTimeseriesReq_TagsList_DEFAULT []map[string]string + +func (p *TSCreateMultiTimeseriesReq) GetTagsList() []map[string]string { + return p.TagsList +} +var TSCreateMultiTimeseriesReq_AttributesList_DEFAULT []map[string]string + +func (p *TSCreateMultiTimeseriesReq) GetAttributesList() []map[string]string { + return p.AttributesList +} +var TSCreateMultiTimeseriesReq_MeasurementAliasList_DEFAULT []string + +func (p *TSCreateMultiTimeseriesReq) GetMeasurementAliasList() []string { + return p.MeasurementAliasList +} +func (p *TSCreateMultiTimeseriesReq) IsSetPropsList() bool { + return p.PropsList != nil +} + +func (p *TSCreateMultiTimeseriesReq) IsSetTagsList() bool { + return p.TagsList != nil +} + +func (p *TSCreateMultiTimeseriesReq) IsSetAttributesList() bool { + return p.AttributesList != nil +} + +func (p *TSCreateMultiTimeseriesReq) IsSetMeasurementAliasList() bool { + return p.MeasurementAliasList != nil +} + +func (p *TSCreateMultiTimeseriesReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetTemplateName bool = false; - var issetPrefixPath bool = false; + var issetPaths bool = false; + var issetDataTypes bool = false; + var issetEncodings bool = false; + var issetCompressors bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -12643,22 +12673,84 @@ func (p *TSSetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtoco } } case 2: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.LIST { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetTemplateName = true + issetPaths = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.LIST { if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetPrefixPath = true + issetDataTypes = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.LIST { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetEncodings = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.LIST { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + issetCompressors = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.LIST { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.LIST { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.LIST { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.LIST { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -12679,16 +12771,22 @@ func (p *TSSetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtoco if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetTemplateName{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set")); + if !issetPaths{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Paths is not set")); } - if !issetPrefixPath{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")); + if !issetDataTypes{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set")); + } + if !issetEncodings{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set")); + } + if !issetCompressors{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set")); } return nil } -func (p *TSSetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateMultiTimeseriesReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -12697,221 +12795,249 @@ func (p *TSSetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.T return nil } -func (p *TSSetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) +func (p *TSCreateMultiTimeseriesReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Paths = tSlice + for i := 0; i < size; i ++ { +var _elem148 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.TemplateName = v + _elem148 = v } + p.Paths = append(p.Paths, _elem148) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSSetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) +func (p *TSCreateMultiTimeseriesReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int32, 0, size) + p.DataTypes = tSlice + for i := 0; i < size; i ++ { +var _elem149 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.PrefixPath = v + _elem149 = v } + p.DataTypes = append(p.DataTypes, _elem149) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSSetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSSetSchemaTemplateReq"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } - if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } - if err := p.writeField3(ctx, oprot); err != nil { return err } +func (p *TSCreateMultiTimeseriesReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int32, 0, size) + p.Encodings = tSlice + for i := 0; i < size; i ++ { +var _elem150 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem150 = v +} + p.Encodings = append(p.Encodings, _elem150) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) } - if err := oprot.WriteFieldStop(ctx); err != nil { - return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { - return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *TSSetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } - return err +func (p *TSCreateMultiTimeseriesReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int32, 0, size) + p.Compressors = tSlice + for i := 0; i < size; i ++ { +var _elem151 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem151 = v } - -func (p *TSSetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) } - if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) } - return err -} - -func (p *TSSetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:prefixPath: ", p), err) } - if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.prefixPath (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:prefixPath: ", p), err) } - return err -} - -func (p *TSSetSchemaTemplateReq) Equals(other *TSSetSchemaTemplateReq) bool { - if p == other { - return true - } else if p == nil || other == nil { - return false + p.Compressors = append(p.Compressors, _elem151) } - if p.SessionId != other.SessionId { return false } - if p.TemplateName != other.TemplateName { return false } - if p.PrefixPath != other.PrefixPath { return false } - return true -} - -func (p *TSSetSchemaTemplateReq) String() string { - if p == nil { - return "" + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) } - return fmt.Sprintf("TSSetSchemaTemplateReq(%+v)", *p) -} - -// Attributes: -// - SessionId -// - Name -// - SerializedTemplate -type TSCreateSchemaTemplateReq struct { - SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - Name string `thrift:"name,2,required" db:"name" json:"name"` - SerializedTemplate []byte `thrift:"serializedTemplate,3,required" db:"serializedTemplate" json:"serializedTemplate"` + return nil } -func NewTSCreateSchemaTemplateReq() *TSCreateSchemaTemplateReq { - return &TSCreateSchemaTemplateReq{} +func (p *TSCreateMultiTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]map[string]string, 0, size) + p.PropsList = tSlice + for i := 0; i < size; i ++ { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + _elem152 := tMap + for i := 0; i < size; i ++ { +var _key153 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key153 = v } - - -func (p *TSCreateSchemaTemplateReq) GetSessionId() int64 { - return p.SessionId +var _val154 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val154 = v } - -func (p *TSCreateSchemaTemplateReq) GetName() string { - return p.Name + _elem152[_key153] = _val154 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + p.PropsList = append(p.PropsList, _elem152) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil } -func (p *TSCreateSchemaTemplateReq) GetSerializedTemplate() []byte { - return p.SerializedTemplate -} -func (p *TSCreateSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) +func (p *TSCreateMultiTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) } - - var issetSessionId bool = false; - var issetName bool = false; - var issetSerializedTemplate bool = false; - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + tSlice := make([]map[string]string, 0, size) + p.TagsList = tSlice + for i := 0; i < size; i ++ { + _, _, size, err := iprot.ReadMapBegin(ctx) if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + return thrift.PrependError("error reading map begin: ", err) } - if fieldTypeId == thrift.STOP { break; } - switch fieldId { - case 1: - if fieldTypeId == thrift.I64 { - if err := p.ReadField1(ctx, iprot); err != nil { - return err - } - issetSessionId = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 2: - if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { - return err - } - issetName = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 3: - if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { - return err - } - issetSerializedTemplate = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } + tMap := make(map[string]string, size) + _elem155 := tMap + for i := 0; i < size; i ++ { +var _key156 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key156 = v +} +var _val157 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val157 = v +} + _elem155[_key156] = _val157 } - if err := iprot.ReadFieldEnd(ctx); err != nil { - return err + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) } + p.TagsList = append(p.TagsList, _elem155) } - if err := iprot.ReadStructEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetSessionId{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); - } - if !issetName{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); - } - if !issetSerializedTemplate{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SerializedTemplate is not set")); + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *TSCreateSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) +func (p *TSCreateMultiTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]map[string]string, 0, size) + p.AttributesList = tSlice + for i := 0; i < size; i ++ { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + _elem158 := tMap + for i := 0; i < size; i ++ { +var _key159 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.SessionId = v -} - return nil + _key159 = v } - -func (p *TSCreateSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) +var _val160 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.Name = v + _val160 = v } + _elem158[_key159] = _val160 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + p.AttributesList = append(p.AttributesList, _elem158) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSCreateSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) +func (p *TSCreateMultiTimeseriesReq) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.MeasurementAliasList = tSlice + for i := 0; i < size; i ++ { +var _elem161 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.SerializedTemplate = v + _elem161 = v } + p.MeasurementAliasList = append(p.MeasurementAliasList, _elem161) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSCreateSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSCreateSchemaTemplateReq"); err != nil { +func (p *TSCreateMultiTimeseriesReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSCreateMultiTimeseriesReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -12920,7 +13046,7 @@ func (p *TSCreateSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TPro return nil } -func (p *TSCreateSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSCreateMultiTimeseriesReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -12930,107 +13056,401 @@ func (p *TSCreateSchemaTemplateReq) writeField1(ctx context.Context, oprot thrif return err } -func (p *TSCreateSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) } - return err -} - -func (p *TSCreateSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "serializedTemplate", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:serializedTemplate: ", p), err) } - if err := oprot.WriteBinary(ctx, p.SerializedTemplate); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.serializedTemplate (3) field write error: ", p), err) } +func (p *TSCreateMultiTimeseriesReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "paths", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:paths: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Paths)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Paths { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:serializedTemplate: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:paths: ", p), err) } return err } -func (p *TSCreateSchemaTemplateReq) Equals(other *TSCreateSchemaTemplateReq) bool { - if p == other { - return true - } else if p == nil || other == nil { - return false +func (p *TSCreateMultiTimeseriesReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:dataTypes: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil { + return thrift.PrependError("error writing list begin: ", err) } - if p.SessionId != other.SessionId { return false } - if p.Name != other.Name { return false } - if bytes.Compare(p.SerializedTemplate, other.SerializedTemplate) != 0 { return false } - return true -} - -func (p *TSCreateSchemaTemplateReq) String() string { - if p == nil { - return "" + for _, v := range p.DataTypes { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - return fmt.Sprintf("TSCreateSchemaTemplateReq(%+v)", *p) + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:dataTypes: ", p), err) } + return err } -// Attributes: -// - SessionId -// - Name -// - IsAligned -// - Measurements -// - DataTypes -// - Encodings -// - Compressors -type TSAppendSchemaTemplateReq struct { - SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - Name string `thrift:"name,2,required" db:"name" json:"name"` - IsAligned bool `thrift:"isAligned,3,required" db:"isAligned" json:"isAligned"` - Measurements []string `thrift:"measurements,4,required" db:"measurements" json:"measurements"` - DataTypes []int32 `thrift:"dataTypes,5,required" db:"dataTypes" json:"dataTypes"` - Encodings []int32 `thrift:"encodings,6,required" db:"encodings" json:"encodings"` - Compressors []int32 `thrift:"compressors,7,required" db:"compressors" json:"compressors"` +func (p *TSCreateMultiTimeseriesReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:encodings: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Encodings { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:encodings: ", p), err) } + return err } -func NewTSAppendSchemaTemplateReq() *TSAppendSchemaTemplateReq { - return &TSAppendSchemaTemplateReq{} +func (p *TSCreateMultiTimeseriesReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compressors: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Compressors { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compressors: ", p), err) } + return err } - -func (p *TSAppendSchemaTemplateReq) GetSessionId() int64 { - return p.SessionId +func (p *TSCreateMultiTimeseriesReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPropsList() { + if err := oprot.WriteFieldBegin(ctx, "propsList", thrift.LIST, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:propsList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.PropsList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.PropsList { + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range v { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:propsList: ", p), err) } + } + return err } -func (p *TSAppendSchemaTemplateReq) GetName() string { - return p.Name +func (p *TSCreateMultiTimeseriesReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTagsList() { + if err := oprot.WriteFieldBegin(ctx, "tagsList", thrift.LIST, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tagsList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.TagsList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.TagsList { + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range v { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tagsList: ", p), err) } + } + return err } -func (p *TSAppendSchemaTemplateReq) GetIsAligned() bool { - return p.IsAligned +func (p *TSCreateMultiTimeseriesReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributesList() { + if err := oprot.WriteFieldBegin(ctx, "attributesList", thrift.LIST, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:attributesList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.MAP, len(p.AttributesList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.AttributesList { + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(v)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range v { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:attributesList: ", p), err) } + } + return err } -func (p *TSAppendSchemaTemplateReq) GetMeasurements() []string { - return p.Measurements +func (p *TSCreateMultiTimeseriesReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMeasurementAliasList() { + if err := oprot.WriteFieldBegin(ctx, "measurementAliasList", thrift.LIST, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:measurementAliasList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.MeasurementAliasList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.MeasurementAliasList { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:measurementAliasList: ", p), err) } + } + return err } -func (p *TSAppendSchemaTemplateReq) GetDataTypes() []int32 { - return p.DataTypes +func (p *TSCreateMultiTimeseriesReq) Equals(other *TSCreateMultiTimeseriesReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.SessionId != other.SessionId { return false } + if len(p.Paths) != len(other.Paths) { return false } + for i, _tgt := range p.Paths { + _src162 := other.Paths[i] + if _tgt != _src162 { return false } + } + if len(p.DataTypes) != len(other.DataTypes) { return false } + for i, _tgt := range p.DataTypes { + _src163 := other.DataTypes[i] + if _tgt != _src163 { return false } + } + if len(p.Encodings) != len(other.Encodings) { return false } + for i, _tgt := range p.Encodings { + _src164 := other.Encodings[i] + if _tgt != _src164 { return false } + } + if len(p.Compressors) != len(other.Compressors) { return false } + for i, _tgt := range p.Compressors { + _src165 := other.Compressors[i] + if _tgt != _src165 { return false } + } + if len(p.PropsList) != len(other.PropsList) { return false } + for i, _tgt := range p.PropsList { + _src166 := other.PropsList[i] + if len(_tgt) != len(_src166) { return false } + for k, _tgt := range _tgt { + _src167 := _src166[k] + if _tgt != _src167 { return false } + } + } + if len(p.TagsList) != len(other.TagsList) { return false } + for i, _tgt := range p.TagsList { + _src168 := other.TagsList[i] + if len(_tgt) != len(_src168) { return false } + for k, _tgt := range _tgt { + _src169 := _src168[k] + if _tgt != _src169 { return false } + } + } + if len(p.AttributesList) != len(other.AttributesList) { return false } + for i, _tgt := range p.AttributesList { + _src170 := other.AttributesList[i] + if len(_tgt) != len(_src170) { return false } + for k, _tgt := range _tgt { + _src171 := _src170[k] + if _tgt != _src171 { return false } + } + } + if len(p.MeasurementAliasList) != len(other.MeasurementAliasList) { return false } + for i, _tgt := range p.MeasurementAliasList { + _src172 := other.MeasurementAliasList[i] + if _tgt != _src172 { return false } + } + return true } -func (p *TSAppendSchemaTemplateReq) GetEncodings() []int32 { - return p.Encodings +func (p *TSCreateMultiTimeseriesReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSCreateMultiTimeseriesReq(%+v)", *p) } -func (p *TSAppendSchemaTemplateReq) GetCompressors() []int32 { - return p.Compressors +// Attributes: +// - Version +// - SupportedTimeAggregationOperations +// - TimestampPrecision +// - MaxConcurrentClientNum +// - WatermarkSecretKey +// - WatermarkBitString +// - WatermarkParamMarkRate +// - WatermarkParamMaxRightBit +// - ThriftMaxFrameSize +// - IsReadOnly +// - BuildInfo +// - Logo +type ServerProperties struct { + Version string `thrift:"version,1,required" db:"version" json:"version"` + SupportedTimeAggregationOperations []string `thrift:"supportedTimeAggregationOperations,2,required" db:"supportedTimeAggregationOperations" json:"supportedTimeAggregationOperations"` + TimestampPrecision string `thrift:"timestampPrecision,3,required" db:"timestampPrecision" json:"timestampPrecision"` + MaxConcurrentClientNum int32 `thrift:"maxConcurrentClientNum,4" db:"maxConcurrentClientNum" json:"maxConcurrentClientNum"` + WatermarkSecretKey *string `thrift:"watermarkSecretKey,5" db:"watermarkSecretKey" json:"watermarkSecretKey,omitempty"` + WatermarkBitString *string `thrift:"watermarkBitString,6" db:"watermarkBitString" json:"watermarkBitString,omitempty"` + WatermarkParamMarkRate *int32 `thrift:"watermarkParamMarkRate,7" db:"watermarkParamMarkRate" json:"watermarkParamMarkRate,omitempty"` + WatermarkParamMaxRightBit *int32 `thrift:"watermarkParamMaxRightBit,8" db:"watermarkParamMaxRightBit" json:"watermarkParamMaxRightBit,omitempty"` + ThriftMaxFrameSize *int32 `thrift:"thriftMaxFrameSize,9" db:"thriftMaxFrameSize" json:"thriftMaxFrameSize,omitempty"` + IsReadOnly *bool `thrift:"isReadOnly,10" db:"isReadOnly" json:"isReadOnly,omitempty"` + BuildInfo *string `thrift:"buildInfo,11" db:"buildInfo" json:"buildInfo,omitempty"` + Logo *string `thrift:"logo,12" db:"logo" json:"logo,omitempty"` } -func (p *TSAppendSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func NewServerProperties() *ServerProperties { + return &ServerProperties{} +} + + +func (p *ServerProperties) GetVersion() string { + return p.Version +} + +func (p *ServerProperties) GetSupportedTimeAggregationOperations() []string { + return p.SupportedTimeAggregationOperations +} + +func (p *ServerProperties) GetTimestampPrecision() string { + return p.TimestampPrecision +} + +func (p *ServerProperties) GetMaxConcurrentClientNum() int32 { + return p.MaxConcurrentClientNum +} +var ServerProperties_WatermarkSecretKey_DEFAULT string +func (p *ServerProperties) GetWatermarkSecretKey() string { + if !p.IsSetWatermarkSecretKey() { + return ServerProperties_WatermarkSecretKey_DEFAULT + } +return *p.WatermarkSecretKey +} +var ServerProperties_WatermarkBitString_DEFAULT string +func (p *ServerProperties) GetWatermarkBitString() string { + if !p.IsSetWatermarkBitString() { + return ServerProperties_WatermarkBitString_DEFAULT + } +return *p.WatermarkBitString +} +var ServerProperties_WatermarkParamMarkRate_DEFAULT int32 +func (p *ServerProperties) GetWatermarkParamMarkRate() int32 { + if !p.IsSetWatermarkParamMarkRate() { + return ServerProperties_WatermarkParamMarkRate_DEFAULT + } +return *p.WatermarkParamMarkRate +} +var ServerProperties_WatermarkParamMaxRightBit_DEFAULT int32 +func (p *ServerProperties) GetWatermarkParamMaxRightBit() int32 { + if !p.IsSetWatermarkParamMaxRightBit() { + return ServerProperties_WatermarkParamMaxRightBit_DEFAULT + } +return *p.WatermarkParamMaxRightBit +} +var ServerProperties_ThriftMaxFrameSize_DEFAULT int32 +func (p *ServerProperties) GetThriftMaxFrameSize() int32 { + if !p.IsSetThriftMaxFrameSize() { + return ServerProperties_ThriftMaxFrameSize_DEFAULT + } +return *p.ThriftMaxFrameSize +} +var ServerProperties_IsReadOnly_DEFAULT bool +func (p *ServerProperties) GetIsReadOnly() bool { + if !p.IsSetIsReadOnly() { + return ServerProperties_IsReadOnly_DEFAULT + } +return *p.IsReadOnly +} +var ServerProperties_BuildInfo_DEFAULT string +func (p *ServerProperties) GetBuildInfo() string { + if !p.IsSetBuildInfo() { + return ServerProperties_BuildInfo_DEFAULT + } +return *p.BuildInfo +} +var ServerProperties_Logo_DEFAULT string +func (p *ServerProperties) GetLogo() string { + if !p.IsSetLogo() { + return ServerProperties_Logo_DEFAULT + } +return *p.Logo +} +func (p *ServerProperties) IsSetWatermarkSecretKey() bool { + return p.WatermarkSecretKey != nil +} + +func (p *ServerProperties) IsSetWatermarkBitString() bool { + return p.WatermarkBitString != nil +} + +func (p *ServerProperties) IsSetWatermarkParamMarkRate() bool { + return p.WatermarkParamMarkRate != nil +} + +func (p *ServerProperties) IsSetWatermarkParamMaxRightBit() bool { + return p.WatermarkParamMaxRightBit != nil +} + +func (p *ServerProperties) IsSetThriftMaxFrameSize() bool { + return p.ThriftMaxFrameSize != nil +} + +func (p *ServerProperties) IsSetIsReadOnly() bool { + return p.IsReadOnly != nil +} + +func (p *ServerProperties) IsSetBuildInfo() bool { + return p.BuildInfo != nil +} + +func (p *ServerProperties) IsSetLogo() bool { + return p.Logo != nil +} + +func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - var issetSessionId bool = false; - var issetName bool = false; - var issetIsAligned bool = false; - var issetMeasurements bool = false; - var issetDataTypes bool = false; - var issetEncodings bool = false; - var issetCompressors bool = false; + var issetVersion bool = false; + var issetSupportedTimeAggregationOperations bool = false; + var issetTimestampPrecision bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -13040,77 +13460,123 @@ func (p *TSAppendSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProt if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRING { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetSessionId = true + issetVersion = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.LIST { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetName = true + issetSupportedTimeAggregationOperations = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.BOOL { + if fieldTypeId == thrift.STRING { if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetIsAligned = true + issetTimestampPrecision = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I32 { if err := p.ReadField4(ctx, iprot); err != nil { return err } - issetMeasurements = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 5: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.STRING { if err := p.ReadField5(ctx, iprot); err != nil { return err } - issetDataTypes = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 6: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.STRING { if err := p.ReadField6(ctx, iprot); err != nil { return err } - issetEncodings = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 7: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.I32 { if err := p.ReadField7(ctx, iprot); err != nil { return err } - issetCompressors = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.I32 { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.I32 { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.STRING { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 12: + if fieldTypeId == thrift.STRING { + if err := p.ReadField12(ctx, iprot); err != nil { + return err + } } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -13128,72 +13594,42 @@ func (p *TSAppendSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProt if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if !issetSessionId{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); - } - if !issetName{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); - } - if !issetIsAligned{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IsAligned is not set")); - } - if !issetMeasurements{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set")); - } - if !issetDataTypes{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set")); + if !issetVersion{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")); } - if !issetEncodings{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set")); + if !issetSupportedTimeAggregationOperations{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SupportedTimeAggregationOperations is not set")); } - if !issetCompressors{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set")); + if !issetTimestampPrecision{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimestampPrecision is not set")); } return nil } -func (p *TSAppendSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) -} else { - p.SessionId = v -} - return nil -} - -func (p *TSAppendSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ServerProperties) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) -} else { - p.Name = v -} - return nil -} - -func (p *TSAppendSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) + return thrift.PrependError("error reading field 1: ", err) } else { - p.IsAligned = v + p.Version = v } return nil } -func (p *TSAppendSchemaTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ServerProperties) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - p.Measurements = tSlice + p.SupportedTimeAggregationOperations = tSlice for i := 0; i < size; i ++ { -var _elem153 string +var _elem173 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem153 = v + _elem173 = v } - p.Measurements = append(p.Measurements, _elem153) + p.SupportedTimeAggregationOperations = append(p.SupportedTimeAggregationOperations, _elem173) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -13201,74 +13637,98 @@ var _elem153 string return nil } -func (p *TSAppendSchemaTemplateReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int32, 0, size) - p.DataTypes = tSlice - for i := 0; i < size; i ++ { -var _elem154 int32 - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *ServerProperties) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) } else { - _elem154 = v + p.TimestampPrecision = v } - p.DataTypes = append(p.DataTypes, _elem154) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSAppendSchemaTemplateReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int32, 0, size) - p.Encodings = tSlice - for i := 0; i < size; i ++ { -var _elem155 int32 - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *ServerProperties) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) } else { - _elem155 = v + p.MaxConcurrentClientNum = v } - p.Encodings = append(p.Encodings, _elem155) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSAppendSchemaTemplateReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int32, 0, size) - p.Compressors = tSlice - for i := 0; i < size; i ++ { -var _elem156 int32 - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) +func (p *ServerProperties) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) } else { - _elem156 = v + p.WatermarkSecretKey = &v } - p.Compressors = append(p.Compressors, _elem156) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) - } return nil } -func (p *TSAppendSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSAppendSchemaTemplateReq"); err != nil { +func (p *ServerProperties) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.WatermarkBitString = &v +} + return nil +} + +func (p *ServerProperties) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.WatermarkParamMarkRate = &v +} + return nil +} + +func (p *ServerProperties) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 8: ", err) +} else { + p.WatermarkParamMaxRightBit = &v +} + return nil +} + +func (p *ServerProperties) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 9: ", err) +} else { + p.ThriftMaxFrameSize = &v +} + return nil +} + +func (p *ServerProperties) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 10: ", err) +} else { + p.IsReadOnly = &v +} + return nil +} + +func (p *ServerProperties) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 11: ", err) +} else { + p.BuildInfo = &v +} + return nil +} + +func (p *ServerProperties) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 12: ", err) +} else { + p.Logo = &v +} + return nil +} + +func (p *ServerProperties) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "ServerProperties"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -13278,6 +13738,11 @@ func (p *TSAppendSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TPro if err := p.writeField5(ctx, oprot); err != nil { return err } if err := p.writeField6(ctx, oprot); err != nil { return err } if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField12(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -13286,43 +13751,23 @@ func (p *TSAppendSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TPro return nil } -func (p *TSAppendSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } - return err -} - -func (p *TSAppendSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) } - return err -} - -func (p *TSAppendSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:isAligned: ", p), err) } - if err := oprot.WriteBool(ctx, bool(p.IsAligned)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.isAligned (3) field write error: ", p), err) } +func (p *ServerProperties) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:version: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Version)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.version (1) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:isAligned: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:version: ", p), err) } return err } -func (p *TSAppendSchemaTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurements: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { +func (p *ServerProperties) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "supportedTimeAggregationOperations", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:supportedTimeAggregationOperations: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.SupportedTimeAggregationOperations)); err != nil { return thrift.PrependError("error writing list begin: ", err) } - for _, v := range p.Measurements { + for _, v := range p.SupportedTimeAggregationOperations { if err := oprot.WriteString(ctx, string(v)); err != nil { return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } @@ -13330,137 +13775,232 @@ func (p *TSAppendSchemaTemplateReq) writeField4(ctx context.Context, oprot thrif return thrift.PrependError("error writing list end: ", err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurements: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:supportedTimeAggregationOperations: ", p), err) } return err } -func (p *TSAppendSchemaTemplateReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:dataTypes: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.DataTypes { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *ServerProperties) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timestampPrecision", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestampPrecision: ", p), err) } + if err := oprot.WriteString(ctx, string(p.TimestampPrecision)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestampPrecision (3) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:dataTypes: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestampPrecision: ", p), err) } return err } -func (p *TSAppendSchemaTemplateReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:encodings: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Encodings { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } +func (p *ServerProperties) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "maxConcurrentClientNum", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:maxConcurrentClientNum: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.MaxConcurrentClientNum)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.maxConcurrentClientNum (4) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:encodings: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:maxConcurrentClientNum: ", p), err) } return err } -func (p *TSAppendSchemaTemplateReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:compressors: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Compressors { - if err := oprot.WriteI32(ctx, int32(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) +func (p *ServerProperties) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetWatermarkSecretKey() { + if err := oprot.WriteFieldBegin(ctx, "watermarkSecretKey", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:watermarkSecretKey: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.WatermarkSecretKey)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.watermarkSecretKey (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:watermarkSecretKey: ", p), err) } } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:compressors: ", p), err) } return err } -func (p *TSAppendSchemaTemplateReq) Equals(other *TSAppendSchemaTemplateReq) bool { - if p == other { - return true - } else if p == nil || other == nil { - return false - } - if p.SessionId != other.SessionId { return false } - if p.Name != other.Name { return false } - if p.IsAligned != other.IsAligned { return false } - if len(p.Measurements) != len(other.Measurements) { return false } - for i, _tgt := range p.Measurements { - _src157 := other.Measurements[i] - if _tgt != _src157 { return false } - } - if len(p.DataTypes) != len(other.DataTypes) { return false } - for i, _tgt := range p.DataTypes { - _src158 := other.DataTypes[i] - if _tgt != _src158 { return false } - } - if len(p.Encodings) != len(other.Encodings) { return false } - for i, _tgt := range p.Encodings { - _src159 := other.Encodings[i] - if _tgt != _src159 { return false } - } - if len(p.Compressors) != len(other.Compressors) { return false } - for i, _tgt := range p.Compressors { - _src160 := other.Compressors[i] - if _tgt != _src160 { return false } +func (p *ServerProperties) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetWatermarkBitString() { + if err := oprot.WriteFieldBegin(ctx, "watermarkBitString", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:watermarkBitString: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.WatermarkBitString)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.watermarkBitString (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:watermarkBitString: ", p), err) } } - return true + return err } -func (p *TSAppendSchemaTemplateReq) String() string { +func (p *ServerProperties) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetWatermarkParamMarkRate() { + if err := oprot.WriteFieldBegin(ctx, "watermarkParamMarkRate", thrift.I32, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:watermarkParamMarkRate: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.WatermarkParamMarkRate)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.watermarkParamMarkRate (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:watermarkParamMarkRate: ", p), err) } + } + return err +} + +func (p *ServerProperties) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetWatermarkParamMaxRightBit() { + if err := oprot.WriteFieldBegin(ctx, "watermarkParamMaxRightBit", thrift.I32, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:watermarkParamMaxRightBit: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.WatermarkParamMaxRightBit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.watermarkParamMaxRightBit (8) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:watermarkParamMaxRightBit: ", p), err) } + } + return err +} + +func (p *ServerProperties) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetThriftMaxFrameSize() { + if err := oprot.WriteFieldBegin(ctx, "thriftMaxFrameSize", thrift.I32, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:thriftMaxFrameSize: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.ThriftMaxFrameSize)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.thriftMaxFrameSize (9) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:thriftMaxFrameSize: ", p), err) } + } + return err +} + +func (p *ServerProperties) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIsReadOnly() { + if err := oprot.WriteFieldBegin(ctx, "isReadOnly", thrift.BOOL, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:isReadOnly: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.IsReadOnly)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.isReadOnly (10) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:isReadOnly: ", p), err) } + } + return err +} + +func (p *ServerProperties) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBuildInfo() { + if err := oprot.WriteFieldBegin(ctx, "buildInfo", thrift.STRING, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:buildInfo: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.BuildInfo)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.buildInfo (11) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:buildInfo: ", p), err) } + } + return err +} + +func (p *ServerProperties) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLogo() { + if err := oprot.WriteFieldBegin(ctx, "logo", thrift.STRING, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:logo: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Logo)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.logo (12) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:logo: ", p), err) } + } + return err +} + +func (p *ServerProperties) Equals(other *ServerProperties) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Version != other.Version { return false } + if len(p.SupportedTimeAggregationOperations) != len(other.SupportedTimeAggregationOperations) { return false } + for i, _tgt := range p.SupportedTimeAggregationOperations { + _src174 := other.SupportedTimeAggregationOperations[i] + if _tgt != _src174 { return false } + } + if p.TimestampPrecision != other.TimestampPrecision { return false } + if p.MaxConcurrentClientNum != other.MaxConcurrentClientNum { return false } + if p.WatermarkSecretKey != other.WatermarkSecretKey { + if p.WatermarkSecretKey == nil || other.WatermarkSecretKey == nil { + return false + } + if (*p.WatermarkSecretKey) != (*other.WatermarkSecretKey) { return false } + } + if p.WatermarkBitString != other.WatermarkBitString { + if p.WatermarkBitString == nil || other.WatermarkBitString == nil { + return false + } + if (*p.WatermarkBitString) != (*other.WatermarkBitString) { return false } + } + if p.WatermarkParamMarkRate != other.WatermarkParamMarkRate { + if p.WatermarkParamMarkRate == nil || other.WatermarkParamMarkRate == nil { + return false + } + if (*p.WatermarkParamMarkRate) != (*other.WatermarkParamMarkRate) { return false } + } + if p.WatermarkParamMaxRightBit != other.WatermarkParamMaxRightBit { + if p.WatermarkParamMaxRightBit == nil || other.WatermarkParamMaxRightBit == nil { + return false + } + if (*p.WatermarkParamMaxRightBit) != (*other.WatermarkParamMaxRightBit) { return false } + } + if p.ThriftMaxFrameSize != other.ThriftMaxFrameSize { + if p.ThriftMaxFrameSize == nil || other.ThriftMaxFrameSize == nil { + return false + } + if (*p.ThriftMaxFrameSize) != (*other.ThriftMaxFrameSize) { return false } + } + if p.IsReadOnly != other.IsReadOnly { + if p.IsReadOnly == nil || other.IsReadOnly == nil { + return false + } + if (*p.IsReadOnly) != (*other.IsReadOnly) { return false } + } + if p.BuildInfo != other.BuildInfo { + if p.BuildInfo == nil || other.BuildInfo == nil { + return false + } + if (*p.BuildInfo) != (*other.BuildInfo) { return false } + } + if p.Logo != other.Logo { + if p.Logo == nil || other.Logo == nil { + return false + } + if (*p.Logo) != (*other.Logo) { return false } + } + return true +} + +func (p *ServerProperties) String() string { if p == nil { return "" } - return fmt.Sprintf("TSAppendSchemaTemplateReq(%+v)", *p) + return fmt.Sprintf("ServerProperties(%+v)", *p) } // Attributes: // - SessionId -// - Name -// - Path -type TSPruneSchemaTemplateReq struct { +// - TemplateName +// - PrefixPath +type TSSetSchemaTemplateReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - Name string `thrift:"name,2,required" db:"name" json:"name"` - Path string `thrift:"path,3,required" db:"path" json:"path"` + TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"` + PrefixPath string `thrift:"prefixPath,3,required" db:"prefixPath" json:"prefixPath"` } -func NewTSPruneSchemaTemplateReq() *TSPruneSchemaTemplateReq { - return &TSPruneSchemaTemplateReq{} +func NewTSSetSchemaTemplateReq() *TSSetSchemaTemplateReq { + return &TSSetSchemaTemplateReq{} } -func (p *TSPruneSchemaTemplateReq) GetSessionId() int64 { +func (p *TSSetSchemaTemplateReq) GetSessionId() int64 { return p.SessionId } -func (p *TSPruneSchemaTemplateReq) GetName() string { - return p.Name +func (p *TSSetSchemaTemplateReq) GetTemplateName() string { + return p.TemplateName } -func (p *TSPruneSchemaTemplateReq) GetPath() string { - return p.Path +func (p *TSSetSchemaTemplateReq) GetPrefixPath() string { + return p.PrefixPath } -func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSSetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetName bool = false; - var issetPath bool = false; + var issetTemplateName bool = false; + var issetPrefixPath bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -13485,7 +14025,7 @@ func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetName = true + issetTemplateName = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -13496,7 +14036,7 @@ func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetPath = true + issetPrefixPath = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -13517,16 +14057,16 @@ func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetName{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + if !issetTemplateName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set")); } - if !issetPath{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set")); + if !issetPrefixPath{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")); } return nil } -func (p *TSPruneSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSSetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -13535,26 +14075,26 @@ func (p *TSPruneSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift return nil } -func (p *TSPruneSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSSetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { - p.Name = v + p.TemplateName = v } return nil } -func (p *TSPruneSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSSetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { - p.Path = v + p.PrefixPath = v } return nil } -func (p *TSPruneSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSPruneSchemaTemplateReq"); err != nil { +func (p *TSSetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSSetSchemaTemplateReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -13568,7 +14108,7 @@ func (p *TSPruneSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProt return nil } -func (p *TSPruneSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSSetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -13578,92 +14118,79 @@ func (p *TSPruneSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift return err } -func (p *TSPruneSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Name)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) } +func (p *TSSetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) } return err } -func (p *TSPruneSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:path: ", p), err) } - if err := oprot.WriteString(ctx, string(p.Path)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.path (3) field write error: ", p), err) } +func (p *TSSetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:prefixPath: ", p), err) } + if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.prefixPath (3) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:path: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:prefixPath: ", p), err) } return err } -func (p *TSPruneSchemaTemplateReq) Equals(other *TSPruneSchemaTemplateReq) bool { +func (p *TSSetSchemaTemplateReq) Equals(other *TSSetSchemaTemplateReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if p.Name != other.Name { return false } - if p.Path != other.Path { return false } + if p.TemplateName != other.TemplateName { return false } + if p.PrefixPath != other.PrefixPath { return false } return true } -func (p *TSPruneSchemaTemplateReq) String() string { +func (p *TSSetSchemaTemplateReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSPruneSchemaTemplateReq(%+v)", *p) + return fmt.Sprintf("TSSetSchemaTemplateReq(%+v)", *p) } // Attributes: // - SessionId // - Name -// - QueryType -// - Measurement -type TSQueryTemplateReq struct { +// - SerializedTemplate +type TSCreateSchemaTemplateReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` Name string `thrift:"name,2,required" db:"name" json:"name"` - QueryType int32 `thrift:"queryType,3,required" db:"queryType" json:"queryType"` - Measurement *string `thrift:"measurement,4" db:"measurement" json:"measurement,omitempty"` + SerializedTemplate []byte `thrift:"serializedTemplate,3,required" db:"serializedTemplate" json:"serializedTemplate"` } -func NewTSQueryTemplateReq() *TSQueryTemplateReq { - return &TSQueryTemplateReq{} +func NewTSCreateSchemaTemplateReq() *TSCreateSchemaTemplateReq { + return &TSCreateSchemaTemplateReq{} } -func (p *TSQueryTemplateReq) GetSessionId() int64 { +func (p *TSCreateSchemaTemplateReq) GetSessionId() int64 { return p.SessionId } -func (p *TSQueryTemplateReq) GetName() string { +func (p *TSCreateSchemaTemplateReq) GetName() string { return p.Name } -func (p *TSQueryTemplateReq) GetQueryType() int32 { - return p.QueryType -} -var TSQueryTemplateReq_Measurement_DEFAULT string -func (p *TSQueryTemplateReq) GetMeasurement() string { - if !p.IsSetMeasurement() { - return TSQueryTemplateReq_Measurement_DEFAULT - } -return *p.Measurement -} -func (p *TSQueryTemplateReq) IsSetMeasurement() bool { - return p.Measurement != nil +func (p *TSCreateSchemaTemplateReq) GetSerializedTemplate() []byte { + return p.SerializedTemplate } - -func (p *TSQueryTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; var issetName bool = false; - var issetQueryType bool = false; + var issetSerializedTemplate bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -13695,21 +14222,11 @@ func (p *TSQueryTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) e } } case 3: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.STRING { if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetQueryType = true - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - case 4: - if fieldTypeId == thrift.STRING { - if err := p.ReadField4(ctx, iprot); err != nil { - return err - } + issetSerializedTemplate = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -13733,13 +14250,13 @@ func (p *TSQueryTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) e if !issetName{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); } - if !issetQueryType{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set")); + if !issetSerializedTemplate{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SerializedTemplate is not set")); } return nil } -func (p *TSQueryTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -13748,7 +14265,7 @@ func (p *TSQueryTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProt return nil } -func (p *TSQueryTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSCreateSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { @@ -13757,32 +14274,22 @@ func (p *TSQueryTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProt return nil } -func (p *TSQueryTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { +func (p *TSCreateSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { - p.QueryType = v -} - return nil -} - -func (p *TSQueryTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 4: ", err) -} else { - p.Measurement = &v + p.SerializedTemplate = v } return nil } -func (p *TSQueryTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateReq"); err != nil { +func (p *TSCreateSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSCreateSchemaTemplateReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } if err := p.writeField3(ctx, oprot); err != nil { return err } - if err := p.writeField4(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -13791,7 +14298,7 @@ func (p *TSQueryTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) return nil } -func (p *TSQueryTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSCreateSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -13801,7 +14308,7 @@ func (p *TSQueryTemplateReq) writeField1(ctx context.Context, oprot thrift.TProt return err } -func (p *TSQueryTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSCreateSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) } if err := oprot.WriteString(ctx, string(p.Name)); err != nil { @@ -13811,29 +14318,17 @@ func (p *TSQueryTemplateReq) writeField2(ctx context.Context, oprot thrift.TProt return err } -func (p *TSQueryTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:queryType: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.queryType (3) field write error: ", p), err) } +func (p *TSCreateSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "serializedTemplate", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:serializedTemplate: ", p), err) } + if err := oprot.WriteBinary(ctx, p.SerializedTemplate); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.serializedTemplate (3) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:queryType: ", p), err) } - return err -} - -func (p *TSQueryTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetMeasurement() { - if err := oprot.WriteFieldBegin(ctx, "measurement", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurement: ", p), err) } - if err := oprot.WriteString(ctx, string(*p.Measurement)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.measurement (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurement: ", p), err) } - } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:serializedTemplate: ", p), err) } return err } -func (p *TSQueryTemplateReq) Equals(other *TSQueryTemplateReq) bool { +func (p *TSCreateSchemaTemplateReq) Equals(other *TSCreateSchemaTemplateReq) bool { if p == other { return true } else if p == nil || other == nil { @@ -13841,94 +14336,79 @@ func (p *TSQueryTemplateReq) Equals(other *TSQueryTemplateReq) bool { } if p.SessionId != other.SessionId { return false } if p.Name != other.Name { return false } - if p.QueryType != other.QueryType { return false } - if p.Measurement != other.Measurement { - if p.Measurement == nil || other.Measurement == nil { - return false - } - if (*p.Measurement) != (*other.Measurement) { return false } - } + if bytes.Compare(p.SerializedTemplate, other.SerializedTemplate) != 0 { return false } return true } -func (p *TSQueryTemplateReq) String() string { +func (p *TSCreateSchemaTemplateReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSQueryTemplateReq(%+v)", *p) + return fmt.Sprintf("TSCreateSchemaTemplateReq(%+v)", *p) } // Attributes: -// - Status -// - QueryType -// - Result_ -// - Count +// - SessionId +// - Name +// - IsAligned // - Measurements -type TSQueryTemplateResp struct { - Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` - QueryType int32 `thrift:"queryType,2,required" db:"queryType" json:"queryType"` - Result_ *bool `thrift:"result,3" db:"result" json:"result,omitempty"` - Count *int32 `thrift:"count,4" db:"count" json:"count,omitempty"` - Measurements []string `thrift:"measurements,5" db:"measurements" json:"measurements,omitempty"` +// - DataTypes +// - Encodings +// - Compressors +type TSAppendSchemaTemplateReq struct { + SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` + Name string `thrift:"name,2,required" db:"name" json:"name"` + IsAligned bool `thrift:"isAligned,3,required" db:"isAligned" json:"isAligned"` + Measurements []string `thrift:"measurements,4,required" db:"measurements" json:"measurements"` + DataTypes []int32 `thrift:"dataTypes,5,required" db:"dataTypes" json:"dataTypes"` + Encodings []int32 `thrift:"encodings,6,required" db:"encodings" json:"encodings"` + Compressors []int32 `thrift:"compressors,7,required" db:"compressors" json:"compressors"` } -func NewTSQueryTemplateResp() *TSQueryTemplateResp { - return &TSQueryTemplateResp{} +func NewTSAppendSchemaTemplateReq() *TSAppendSchemaTemplateReq { + return &TSAppendSchemaTemplateReq{} } -var TSQueryTemplateResp_Status_DEFAULT *TSStatus -func (p *TSQueryTemplateResp) GetStatus() *TSStatus { - if !p.IsSetStatus() { - return TSQueryTemplateResp_Status_DEFAULT - } -return p.Status -} -func (p *TSQueryTemplateResp) GetQueryType() int32 { - return p.QueryType +func (p *TSAppendSchemaTemplateReq) GetSessionId() int64 { + return p.SessionId } -var TSQueryTemplateResp_Result__DEFAULT bool -func (p *TSQueryTemplateResp) GetResult_() bool { - if !p.IsSetResult_() { - return TSQueryTemplateResp_Result__DEFAULT - } -return *p.Result_ + +func (p *TSAppendSchemaTemplateReq) GetName() string { + return p.Name } -var TSQueryTemplateResp_Count_DEFAULT int32 -func (p *TSQueryTemplateResp) GetCount() int32 { - if !p.IsSetCount() { - return TSQueryTemplateResp_Count_DEFAULT - } -return *p.Count + +func (p *TSAppendSchemaTemplateReq) GetIsAligned() bool { + return p.IsAligned } -var TSQueryTemplateResp_Measurements_DEFAULT []string -func (p *TSQueryTemplateResp) GetMeasurements() []string { +func (p *TSAppendSchemaTemplateReq) GetMeasurements() []string { return p.Measurements } -func (p *TSQueryTemplateResp) IsSetStatus() bool { - return p.Status != nil -} -func (p *TSQueryTemplateResp) IsSetResult_() bool { - return p.Result_ != nil +func (p *TSAppendSchemaTemplateReq) GetDataTypes() []int32 { + return p.DataTypes } -func (p *TSQueryTemplateResp) IsSetCount() bool { - return p.Count != nil +func (p *TSAppendSchemaTemplateReq) GetEncodings() []int32 { + return p.Encodings } -func (p *TSQueryTemplateResp) IsSetMeasurements() bool { - return p.Measurements != nil +func (p *TSAppendSchemaTemplateReq) GetCompressors() []int32 { + return p.Compressors } - -func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSAppendSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - var issetStatus bool = false; - var issetQueryType bool = false; + var issetSessionId bool = false; + var issetName bool = false; + var issetIsAligned bool = false; + var issetMeasurements bool = false; + var issetDataTypes bool = false; + var issetEncodings bool = false; + var issetCompressors bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -13938,22 +14418,22 @@ func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.STRUCT { + if fieldTypeId == thrift.I64 { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetStatus = true + issetSessionId = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.STRING { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetQueryType = true + issetName = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -13964,16 +14444,18 @@ func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) if err := p.ReadField3(ctx, iprot); err != nil { return err } + issetIsAligned = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 4: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.LIST { if err := p.ReadField4(ctx, iprot); err != nil { return err } + issetMeasurements = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -13984,6 +14466,29 @@ func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) if err := p.ReadField5(ctx, iprot); err != nil { return err } + issetDataTypes = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.LIST { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + issetEncodings = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.LIST { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + issetCompressors = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -14001,51 +14506,58 @@ func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if !issetStatus{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); + if !issetSessionId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetQueryType{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set")); + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); } - return nil -} - -func (p *TSQueryTemplateResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Status = &TSStatus{} - if err := p.Status.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) + if !issetIsAligned{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IsAligned is not set")); + } + if !issetMeasurements{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurements is not set")); + } + if !issetDataTypes{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataTypes is not set")); + } + if !issetEncodings{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Encodings is not set")); + } + if !issetCompressors{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Compressors is not set")); } return nil } -func (p *TSQueryTemplateResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) +func (p *TSAppendSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) } else { - p.QueryType = v + p.SessionId = v } return nil } -func (p *TSQueryTemplateResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) +func (p *TSAppendSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) } else { - p.Result_ = &v + p.Name = v } return nil } -func (p *TSQueryTemplateResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(ctx); err != nil { - return thrift.PrependError("error reading field 4: ", err) +func (p *TSAppendSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) } else { - p.Count = &v + p.IsAligned = v } return nil } -func (p *TSQueryTemplateResp) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSAppendSchemaTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin(ctx) if err != nil { return thrift.PrependError("error reading list begin: ", err) @@ -14053,13 +14565,13 @@ func (p *TSQueryTemplateResp) ReadField5(ctx context.Context, iprot thrift.TPro tSlice := make([]string, 0, size) p.Measurements = tSlice for i := 0; i < size; i ++ { -var _elem161 string +var _elem175 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem161 = v + _elem175 = v } - p.Measurements = append(p.Measurements, _elem161) + p.Measurements = append(p.Measurements, _elem175) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -14067,15 +14579,83 @@ var _elem161 string return nil } -func (p *TSQueryTemplateResp) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateResp"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } - if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } - if err := p.writeField3(ctx, oprot); err != nil { return err } +func (p *TSAppendSchemaTemplateReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int32, 0, size) + p.DataTypes = tSlice + for i := 0; i < size; i ++ { +var _elem176 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem176 = v +} + p.DataTypes = append(p.DataTypes, _elem176) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSAppendSchemaTemplateReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int32, 0, size) + p.Encodings = tSlice + for i := 0; i < size; i ++ { +var _elem177 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem177 = v +} + p.Encodings = append(p.Encodings, _elem177) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSAppendSchemaTemplateReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]int32, 0, size) + p.Compressors = tSlice + for i := 0; i < size; i ++ { +var _elem178 int32 + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem178 = v +} + p.Compressors = append(p.Compressors, _elem178) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSAppendSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSAppendSchemaTemplateReq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } if err := p.writeField4(ctx, oprot); err != nil { return err } if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -14084,140 +14664,181 @@ func (p *TSQueryTemplateResp) Write(ctx context.Context, oprot thrift.TProtocol) return nil } -func (p *TSQueryTemplateResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } - if err := p.Status.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) - } +func (p *TSAppendSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } return err } -func (p *TSQueryTemplateResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryType: ", p), err) } - if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.queryType (2) field write error: ", p), err) } +func (p *TSAppendSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryType: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) } return err } -func (p *TSQueryTemplateResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetResult_() { - if err := oprot.WriteFieldBegin(ctx, "result", thrift.BOOL, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:result: ", p), err) } - if err := oprot.WriteBool(ctx, bool(*p.Result_)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.result (3) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:result: ", p), err) } +func (p *TSAppendSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "isAligned", thrift.BOOL, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:isAligned: ", p), err) } + if err := oprot.WriteBool(ctx, bool(p.IsAligned)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.isAligned (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:isAligned: ", p), err) } + return err +} + +func (p *TSAppendSchemaTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurements: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Measurements { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurements: ", p), err) } return err } -func (p *TSQueryTemplateResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetCount() { - if err := oprot.WriteFieldBegin(ctx, "count", thrift.I32, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:count: ", p), err) } - if err := oprot.WriteI32(ctx, int32(*p.Count)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.count (4) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:count: ", p), err) } +func (p *TSAppendSchemaTemplateReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "dataTypes", thrift.LIST, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:dataTypes: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.DataTypes)); err != nil { + return thrift.PrependError("error writing list begin: ", err) } + for _, v := range p.DataTypes { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:dataTypes: ", p), err) } return err } -func (p *TSQueryTemplateResp) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { - if p.IsSetMeasurements() { - if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:measurements: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Measurements { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:measurements: ", p), err) } +func (p *TSAppendSchemaTemplateReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "encodings", thrift.LIST, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:encodings: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Encodings)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Encodings { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:encodings: ", p), err) } return err } -func (p *TSQueryTemplateResp) Equals(other *TSQueryTemplateResp) bool { +func (p *TSAppendSchemaTemplateReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "compressors", thrift.LIST, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:compressors: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.I32, len(p.Compressors)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Compressors { + if err := oprot.WriteI32(ctx, int32(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:compressors: ", p), err) } + return err +} + +func (p *TSAppendSchemaTemplateReq) Equals(other *TSAppendSchemaTemplateReq) bool { if p == other { return true } else if p == nil || other == nil { return false } - if !p.Status.Equals(other.Status) { return false } - if p.QueryType != other.QueryType { return false } - if p.Result_ != other.Result_ { - if p.Result_ == nil || other.Result_ == nil { - return false - } - if (*p.Result_) != (*other.Result_) { return false } - } - if p.Count != other.Count { - if p.Count == nil || other.Count == nil { - return false - } - if (*p.Count) != (*other.Count) { return false } - } + if p.SessionId != other.SessionId { return false } + if p.Name != other.Name { return false } + if p.IsAligned != other.IsAligned { return false } if len(p.Measurements) != len(other.Measurements) { return false } for i, _tgt := range p.Measurements { - _src162 := other.Measurements[i] - if _tgt != _src162 { return false } + _src179 := other.Measurements[i] + if _tgt != _src179 { return false } + } + if len(p.DataTypes) != len(other.DataTypes) { return false } + for i, _tgt := range p.DataTypes { + _src180 := other.DataTypes[i] + if _tgt != _src180 { return false } + } + if len(p.Encodings) != len(other.Encodings) { return false } + for i, _tgt := range p.Encodings { + _src181 := other.Encodings[i] + if _tgt != _src181 { return false } + } + if len(p.Compressors) != len(other.Compressors) { return false } + for i, _tgt := range p.Compressors { + _src182 := other.Compressors[i] + if _tgt != _src182 { return false } } return true } -func (p *TSQueryTemplateResp) String() string { +func (p *TSAppendSchemaTemplateReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSQueryTemplateResp(%+v)", *p) + return fmt.Sprintf("TSAppendSchemaTemplateReq(%+v)", *p) } // Attributes: // - SessionId -// - PrefixPath -// - TemplateName -type TSUnsetSchemaTemplateReq struct { +// - Name +// - Path +type TSPruneSchemaTemplateReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` - TemplateName string `thrift:"templateName,3,required" db:"templateName" json:"templateName"` + Name string `thrift:"name,2,required" db:"name" json:"name"` + Path string `thrift:"path,3,required" db:"path" json:"path"` } -func NewTSUnsetSchemaTemplateReq() *TSUnsetSchemaTemplateReq { - return &TSUnsetSchemaTemplateReq{} +func NewTSPruneSchemaTemplateReq() *TSPruneSchemaTemplateReq { + return &TSPruneSchemaTemplateReq{} } -func (p *TSUnsetSchemaTemplateReq) GetSessionId() int64 { +func (p *TSPruneSchemaTemplateReq) GetSessionId() int64 { return p.SessionId } -func (p *TSUnsetSchemaTemplateReq) GetPrefixPath() string { - return p.PrefixPath +func (p *TSPruneSchemaTemplateReq) GetName() string { + return p.Name } -func (p *TSUnsetSchemaTemplateReq) GetTemplateName() string { - return p.TemplateName +func (p *TSPruneSchemaTemplateReq) GetPath() string { + return p.Path } -func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSPruneSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetPrefixPath bool = false; - var issetTemplateName bool = false; + var issetName bool = false; + var issetPath bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -14242,7 +14863,7 @@ func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetPrefixPath = true + issetName = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -14253,7 +14874,7 @@ func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetTemplateName = true + issetPath = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -14274,16 +14895,16 @@ func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProto if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetPrefixPath{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")); + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); } - if !issetTemplateName{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set")); + if !issetPath{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Path is not set")); } return nil } -func (p *TSUnsetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSPruneSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -14292,26 +14913,26 @@ func (p *TSUnsetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift return nil } -func (p *TSUnsetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSPruneSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { - p.PrefixPath = v + p.Name = v } return nil } -func (p *TSUnsetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSPruneSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { - p.TemplateName = v + p.Path = v } return nil } -func (p *TSUnsetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSUnsetSchemaTemplateReq"); err != nil { +func (p *TSPruneSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSPruneSchemaTemplateReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -14325,7 +14946,7 @@ func (p *TSUnsetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProt return nil } -func (p *TSUnsetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSPruneSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -14335,72 +14956,92 @@ func (p *TSUnsetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift return err } -func (p *TSUnsetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) } - if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) } +func (p *TSPruneSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) } return err } -func (p *TSUnsetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:templateName: ", p), err) } - if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.templateName (3) field write error: ", p), err) } +func (p *TSPruneSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "path", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:path: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Path)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.path (3) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:templateName: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:path: ", p), err) } return err } -func (p *TSUnsetSchemaTemplateReq) Equals(other *TSUnsetSchemaTemplateReq) bool { +func (p *TSPruneSchemaTemplateReq) Equals(other *TSPruneSchemaTemplateReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if p.PrefixPath != other.PrefixPath { return false } - if p.TemplateName != other.TemplateName { return false } + if p.Name != other.Name { return false } + if p.Path != other.Path { return false } return true } -func (p *TSUnsetSchemaTemplateReq) String() string { +func (p *TSPruneSchemaTemplateReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSUnsetSchemaTemplateReq(%+v)", *p) + return fmt.Sprintf("TSPruneSchemaTemplateReq(%+v)", *p) } // Attributes: // - SessionId -// - DstPath -type TSSetUsingTemplateReq struct { +// - Name +// - QueryType +// - Measurement +type TSQueryTemplateReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - DstPath string `thrift:"dstPath,2,required" db:"dstPath" json:"dstPath"` + Name string `thrift:"name,2,required" db:"name" json:"name"` + QueryType int32 `thrift:"queryType,3,required" db:"queryType" json:"queryType"` + Measurement *string `thrift:"measurement,4" db:"measurement" json:"measurement,omitempty"` } -func NewTSSetUsingTemplateReq() *TSSetUsingTemplateReq { - return &TSSetUsingTemplateReq{} +func NewTSQueryTemplateReq() *TSQueryTemplateReq { + return &TSQueryTemplateReq{} } -func (p *TSSetUsingTemplateReq) GetSessionId() int64 { +func (p *TSQueryTemplateReq) GetSessionId() int64 { return p.SessionId } -func (p *TSSetUsingTemplateReq) GetDstPath() string { - return p.DstPath +func (p *TSQueryTemplateReq) GetName() string { + return p.Name +} + +func (p *TSQueryTemplateReq) GetQueryType() int32 { + return p.QueryType +} +var TSQueryTemplateReq_Measurement_DEFAULT string +func (p *TSQueryTemplateReq) GetMeasurement() string { + if !p.IsSetMeasurement() { + return TSQueryTemplateReq_Measurement_DEFAULT + } +return *p.Measurement +} +func (p *TSQueryTemplateReq) IsSetMeasurement() bool { + return p.Measurement != nil } -func (p *TSSetUsingTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *TSQueryTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetDstPath bool = false; + var issetName bool = false; + var issetQueryType bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -14425,7 +15066,28 @@ func (p *TSSetUsingTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetDstPath = true + issetName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I32 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetQueryType = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -14446,13 +15108,16 @@ func (p *TSSetUsingTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetDstPath{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DstPath is not set")); + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + } + if !issetQueryType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set")); } return nil } -func (p *TSSetUsingTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSQueryTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -14461,21 +15126,41 @@ func (p *TSSetUsingTemplateReq) ReadField1(ctx context.Context, iprot thrift.TP return nil } -func (p *TSSetUsingTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSQueryTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { - p.DstPath = v + p.Name = v +} + return nil +} + +func (p *TSQueryTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.QueryType = v +} + return nil +} + +func (p *TSQueryTemplateReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Measurement = &v } return nil } -func (p *TSSetUsingTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSSetUsingTemplateReq"); err != nil { +func (p *TSQueryTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -14484,7 +15169,7 @@ func (p *TSSetUsingTemplateReq) Write(ctx context.Context, oprot thrift.TProtoco return nil } -func (p *TSSetUsingTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSQueryTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -14494,61 +15179,134 @@ func (p *TSSetUsingTemplateReq) writeField1(ctx context.Context, oprot thrift.TP return err } -func (p *TSSetUsingTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "dstPath", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:dstPath: ", p), err) } - if err := oprot.WriteString(ctx, string(p.DstPath)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.dstPath (2) field write error: ", p), err) } +func (p *TSQueryTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:name: ", p), err) } + return err +} + +func (p *TSQueryTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:queryType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.queryType (3) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:dstPath: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:queryType: ", p), err) } + return err +} + +func (p *TSQueryTemplateReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMeasurement() { + if err := oprot.WriteFieldBegin(ctx, "measurement", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:measurement: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Measurement)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.measurement (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:measurement: ", p), err) } + } return err } -func (p *TSSetUsingTemplateReq) Equals(other *TSSetUsingTemplateReq) bool { +func (p *TSQueryTemplateReq) Equals(other *TSQueryTemplateReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if p.DstPath != other.DstPath { return false } + if p.Name != other.Name { return false } + if p.QueryType != other.QueryType { return false } + if p.Measurement != other.Measurement { + if p.Measurement == nil || other.Measurement == nil { + return false + } + if (*p.Measurement) != (*other.Measurement) { return false } + } return true } -func (p *TSSetUsingTemplateReq) String() string { +func (p *TSQueryTemplateReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSSetUsingTemplateReq(%+v)", *p) + return fmt.Sprintf("TSQueryTemplateReq(%+v)", *p) } // Attributes: -// - SessionId -// - TemplateName -type TSDropSchemaTemplateReq struct { - SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"` +// - Status +// - QueryType +// - Result_ +// - Count +// - Measurements +type TSQueryTemplateResp struct { + Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` + QueryType int32 `thrift:"queryType,2,required" db:"queryType" json:"queryType"` + Result_ *bool `thrift:"result,3" db:"result" json:"result,omitempty"` + Count *int32 `thrift:"count,4" db:"count" json:"count,omitempty"` + Measurements []string `thrift:"measurements,5" db:"measurements" json:"measurements,omitempty"` } -func NewTSDropSchemaTemplateReq() *TSDropSchemaTemplateReq { - return &TSDropSchemaTemplateReq{} +func NewTSQueryTemplateResp() *TSQueryTemplateResp { + return &TSQueryTemplateResp{} } +var TSQueryTemplateResp_Status_DEFAULT *common.TSStatus +func (p *TSQueryTemplateResp) GetStatus() *common.TSStatus { + if !p.IsSetStatus() { + return TSQueryTemplateResp_Status_DEFAULT + } +return p.Status +} -func (p *TSDropSchemaTemplateReq) GetSessionId() int64 { - return p.SessionId +func (p *TSQueryTemplateResp) GetQueryType() int32 { + return p.QueryType +} +var TSQueryTemplateResp_Result__DEFAULT bool +func (p *TSQueryTemplateResp) GetResult_() bool { + if !p.IsSetResult_() { + return TSQueryTemplateResp_Result__DEFAULT + } +return *p.Result_ +} +var TSQueryTemplateResp_Count_DEFAULT int32 +func (p *TSQueryTemplateResp) GetCount() int32 { + if !p.IsSetCount() { + return TSQueryTemplateResp_Count_DEFAULT + } +return *p.Count } +var TSQueryTemplateResp_Measurements_DEFAULT []string -func (p *TSDropSchemaTemplateReq) GetTemplateName() string { - return p.TemplateName +func (p *TSQueryTemplateResp) GetMeasurements() []string { + return p.Measurements } -func (p *TSDropSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSQueryTemplateResp) IsSetStatus() bool { + return p.Status != nil +} + +func (p *TSQueryTemplateResp) IsSetResult_() bool { + return p.Result_ != nil +} + +func (p *TSQueryTemplateResp) IsSetCount() bool { + return p.Count != nil +} + +func (p *TSQueryTemplateResp) IsSetMeasurements() bool { + return p.Measurements != nil +} + +func (p *TSQueryTemplateResp) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - var issetSessionId bool = false; - var issetTemplateName bool = false; + var issetStatus bool = false; + var issetQueryType bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -14558,22 +15316,52 @@ func (p *TSDropSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtoc if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetSessionId = true + issetStatus = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.I32 { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetTemplateName = true + issetQueryType = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.LIST { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -14591,39 +15379,81 @@ func (p *TSDropSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtoc if err := iprot.ReadStructEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if !issetSessionId{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); + if !issetStatus{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); } - if !issetTemplateName{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set")); + if !issetQueryType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueryType is not set")); } return nil } -func (p *TSDropSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) +func (p *TSQueryTemplateResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Status = &common.TSStatus{} + if err := p.Status.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) + } + return nil +} + +func (p *TSQueryTemplateResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) } else { - p.SessionId = v + p.QueryType = v } return nil } -func (p *TSDropSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) +func (p *TSQueryTemplateResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) } else { - p.TemplateName = v + p.Result_ = &v } return nil } -func (p *TSDropSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSDropSchemaTemplateReq"); err != nil { +func (p *TSQueryTemplateResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Count = &v +} + return nil +} + +func (p *TSQueryTemplateResp) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Measurements = tSlice + for i := 0; i < size; i ++ { +var _elem183 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem183 = v +} + p.Measurements = append(p.Measurements, _elem183) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSQueryTemplateResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSQueryTemplateResp"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -14632,78 +15462,140 @@ func (p *TSDropSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProto return nil } -func (p *TSDropSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } +func (p *TSQueryTemplateResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } + if err := p.Status.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } return err } -func (p *TSDropSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) } - if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) } +func (p *TSQueryTemplateResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "queryType", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:queryType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.QueryType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.queryType (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:queryType: ", p), err) } return err } -func (p *TSDropSchemaTemplateReq) Equals(other *TSDropSchemaTemplateReq) bool { +func (p *TSQueryTemplateResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetResult_() { + if err := oprot.WriteFieldBegin(ctx, "result", thrift.BOOL, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:result: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Result_)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.result (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:result: ", p), err) } + } + return err +} + +func (p *TSQueryTemplateResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCount() { + if err := oprot.WriteFieldBegin(ctx, "count", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:count: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Count)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.count (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:count: ", p), err) } + } + return err +} + +func (p *TSQueryTemplateResp) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMeasurements() { + if err := oprot.WriteFieldBegin(ctx, "measurements", thrift.LIST, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:measurements: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Measurements)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Measurements { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:measurements: ", p), err) } + } + return err +} + +func (p *TSQueryTemplateResp) Equals(other *TSQueryTemplateResp) bool { if p == other { return true } else if p == nil || other == nil { return false } - if p.SessionId != other.SessionId { return false } - if p.TemplateName != other.TemplateName { return false } + if !p.Status.Equals(other.Status) { return false } + if p.QueryType != other.QueryType { return false } + if p.Result_ != other.Result_ { + if p.Result_ == nil || other.Result_ == nil { + return false + } + if (*p.Result_) != (*other.Result_) { return false } + } + if p.Count != other.Count { + if p.Count == nil || other.Count == nil { + return false + } + if (*p.Count) != (*other.Count) { return false } + } + if len(p.Measurements) != len(other.Measurements) { return false } + for i, _tgt := range p.Measurements { + _src184 := other.Measurements[i] + if _tgt != _src184 { return false } + } return true } -func (p *TSDropSchemaTemplateReq) String() string { +func (p *TSQueryTemplateResp) String() string { if p == nil { return "" } - return fmt.Sprintf("TSDropSchemaTemplateReq(%+v)", *p) + return fmt.Sprintf("TSQueryTemplateResp(%+v)", *p) } // Attributes: // - SessionId -// - OperationSyncType -// - PhysicalPlan -type TSOperationSyncWriteReq struct { +// - PrefixPath +// - TemplateName +type TSUnsetSchemaTemplateReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` - OperationSyncType int8 `thrift:"operationSyncType,2,required" db:"operationSyncType" json:"operationSyncType"` - PhysicalPlan []byte `thrift:"physicalPlan,3,required" db:"physicalPlan" json:"physicalPlan"` + PrefixPath string `thrift:"prefixPath,2,required" db:"prefixPath" json:"prefixPath"` + TemplateName string `thrift:"templateName,3,required" db:"templateName" json:"templateName"` } -func NewTSOperationSyncWriteReq() *TSOperationSyncWriteReq { - return &TSOperationSyncWriteReq{} +func NewTSUnsetSchemaTemplateReq() *TSUnsetSchemaTemplateReq { + return &TSUnsetSchemaTemplateReq{} } -func (p *TSOperationSyncWriteReq) GetSessionId() int64 { +func (p *TSUnsetSchemaTemplateReq) GetSessionId() int64 { return p.SessionId } -func (p *TSOperationSyncWriteReq) GetOperationSyncType() int8 { - return p.OperationSyncType +func (p *TSUnsetSchemaTemplateReq) GetPrefixPath() string { + return p.PrefixPath } -func (p *TSOperationSyncWriteReq) GetPhysicalPlan() []byte { - return p.PhysicalPlan +func (p *TSUnsetSchemaTemplateReq) GetTemplateName() string { + return p.TemplateName } -func (p *TSOperationSyncWriteReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSUnsetSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } var issetSessionId bool = false; - var issetOperationSyncType bool = false; - var issetPhysicalPlan bool = false; + var issetPrefixPath bool = false; + var issetTemplateName bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -14724,11 +15616,11 @@ func (p *TSOperationSyncWriteReq) Read(ctx context.Context, iprot thrift.TProtoc } } case 2: - if fieldTypeId == thrift.BYTE { + if fieldTypeId == thrift.STRING { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetOperationSyncType = true + issetPrefixPath = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -14739,7 +15631,7 @@ func (p *TSOperationSyncWriteReq) Read(ctx context.Context, iprot thrift.TProtoc if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetPhysicalPlan = true + issetTemplateName = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -14760,16 +15652,16 @@ func (p *TSOperationSyncWriteReq) Read(ctx context.Context, iprot thrift.TProtoc if !issetSessionId{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } - if !issetOperationSyncType{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field OperationSyncType is not set")); + if !issetPrefixPath{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPath is not set")); } - if !issetPhysicalPlan{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PhysicalPlan is not set")); + if !issetTemplateName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set")); } return nil } -func (p *TSOperationSyncWriteReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSUnsetSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -14778,27 +15670,26 @@ func (p *TSOperationSyncWriteReq) ReadField1(ctx context.Context, iprot thrift. return nil } -func (p *TSOperationSyncWriteReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadByte(ctx); err != nil { +func (p *TSUnsetSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { - temp := int8(v) - p.OperationSyncType = temp + p.PrefixPath = v } return nil } -func (p *TSOperationSyncWriteReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(ctx); err != nil { +func (p *TSUnsetSchemaTemplateReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 3: ", err) } else { - p.PhysicalPlan = v + p.TemplateName = v } return nil } -func (p *TSOperationSyncWriteReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSOperationSyncWriteReq"); err != nil { +func (p *TSUnsetSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSUnsetSchemaTemplateReq"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -14812,7 +15703,7 @@ func (p *TSOperationSyncWriteReq) Write(ctx context.Context, oprot thrift.TProto return nil } -func (p *TSOperationSyncWriteReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *TSUnsetSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -14822,1057 +15713,5130 @@ func (p *TSOperationSyncWriteReq) writeField1(ctx context.Context, oprot thrift. return err } -func (p *TSOperationSyncWriteReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "operationSyncType", thrift.BYTE, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:operationSyncType: ", p), err) } - if err := oprot.WriteByte(ctx, int8(p.OperationSyncType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.operationSyncType (2) field write error: ", p), err) } +func (p *TSUnsetSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:prefixPath: ", p), err) } + if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.prefixPath (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:operationSyncType: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPath: ", p), err) } return err } -func (p *TSOperationSyncWriteReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "physicalPlan", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:physicalPlan: ", p), err) } - if err := oprot.WriteBinary(ctx, p.PhysicalPlan); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.physicalPlan (3) field write error: ", p), err) } +func (p *TSUnsetSchemaTemplateReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:templateName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.templateName (3) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:physicalPlan: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:templateName: ", p), err) } return err } -func (p *TSOperationSyncWriteReq) Equals(other *TSOperationSyncWriteReq) bool { +func (p *TSUnsetSchemaTemplateReq) Equals(other *TSUnsetSchemaTemplateReq) bool { if p == other { return true } else if p == nil || other == nil { return false } if p.SessionId != other.SessionId { return false } - if p.OperationSyncType != other.OperationSyncType { return false } - if bytes.Compare(p.PhysicalPlan, other.PhysicalPlan) != 0 { return false } + if p.PrefixPath != other.PrefixPath { return false } + if p.TemplateName != other.TemplateName { return false } return true } -func (p *TSOperationSyncWriteReq) String() string { +func (p *TSUnsetSchemaTemplateReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSOperationSyncWriteReq(%+v)", *p) + return fmt.Sprintf("TSUnsetSchemaTemplateReq(%+v)", *p) } -type TSIService interface { - // Parameters: - // - Req - OpenSession(ctx context.Context, req *TSOpenSessionReq) (_r *TSOpenSessionResp, _err error) - // Parameters: - // - Req - CloseSession(ctx context.Context, req *TSCloseSessionReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - ExecuteStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) - // Parameters: - // - Req - ExecuteBatchStatement(ctx context.Context, req *TSExecuteBatchStatementReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - ExecuteQueryStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) - // Parameters: - // - Req - ExecuteUpdateStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) - // Parameters: - // - Req - FetchResults(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) - // Parameters: - // - Req - FetchMetadata(ctx context.Context, req *TSFetchMetadataReq) (_r *TSFetchMetadataResp, _err error) - // Parameters: - // - Req - CancelOperation(ctx context.Context, req *TSCancelOperationReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - CloseOperation(ctx context.Context, req *TSCloseOperationReq) (_r *TSStatus, _err error) - // Parameters: - // - SessionId - GetTimeZone(ctx context.Context, sessionId int64) (_r *TSGetTimeZoneResp, _err error) - // Parameters: - // - Req - SetTimeZone(ctx context.Context, req *TSSetTimeZoneReq) (_r *TSStatus, _err error) - GetProperties(ctx context.Context) (_r *ServerProperties, _err error) - // Parameters: - // - SessionId - // - StorageGroup - SetStorageGroup(ctx context.Context, sessionId int64, storageGroup string) (_r *TSStatus, _err error) - // Parameters: - // - Req - CreateTimeseries(ctx context.Context, req *TSCreateTimeseriesReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - CreateAlignedTimeseries(ctx context.Context, req *TSCreateAlignedTimeseriesReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - CreateMultiTimeseries(ctx context.Context, req *TSCreateMultiTimeseriesReq) (_r *TSStatus, _err error) - // Parameters: - // - SessionId - // - Path - DeleteTimeseries(ctx context.Context, sessionId int64, path []string) (_r *TSStatus, _err error) - // Parameters: - // - SessionId - // - StorageGroup - DeleteStorageGroups(ctx context.Context, sessionId int64, storageGroup []string) (_r *TSStatus, _err error) - // Parameters: - // - Req - InsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - InsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - InsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - InsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - InsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - InsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - InsertStringRecordsOfOneDevice(ctx context.Context, req *TSInsertStringRecordsOfOneDeviceReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - InsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - TestInsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - TestInsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - TestInsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - TestInsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - TestInsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - TestInsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - TestInsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - DeleteData(ctx context.Context, req *TSDeleteDataReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - ExecuteRawDataQuery(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) - // Parameters: - // - Req - ExecuteLastDataQuery(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) - // Parameters: - // - SessionId - RequestStatementId(ctx context.Context, sessionId int64) (_r int64, _err error) - // Parameters: - // - Req - CreateSchemaTemplate(ctx context.Context, req *TSCreateSchemaTemplateReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - AppendSchemaTemplate(ctx context.Context, req *TSAppendSchemaTemplateReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - PruneSchemaTemplate(ctx context.Context, req *TSPruneSchemaTemplateReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - QuerySchemaTemplate(ctx context.Context, req *TSQueryTemplateReq) (_r *TSQueryTemplateResp, _err error) - // Parameters: - // - Req - SetSchemaTemplate(ctx context.Context, req *TSSetSchemaTemplateReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - UnsetSchemaTemplate(ctx context.Context, req *TSUnsetSchemaTemplateReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - SetUsingTemplate(ctx context.Context, req *TSSetUsingTemplateReq) (_r *TSStatus, _err error) - // Parameters: - // - SessionId - // - TemplateName - // - PrefixPath - UnsetUsingTemplate(ctx context.Context, sessionId int64, templateName string, prefixPath string) (_r *TSStatus, _err error) - // Parameters: - // - Req - DropSchemaTemplate(ctx context.Context, req *TSDropSchemaTemplateReq) (_r *TSStatus, _err error) - // Parameters: - // - Req - ExecuteOperationSync(ctx context.Context, req *TSOperationSyncWriteReq) (_r *TSStatus, _err error) +// Attributes: +// - SessionId +// - TemplateName +type TSDropSchemaTemplateReq struct { + SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` + TemplateName string `thrift:"templateName,2,required" db:"templateName" json:"templateName"` } -type TSIServiceClient struct { - c thrift.TClient - meta thrift.ResponseMeta +func NewTSDropSchemaTemplateReq() *TSDropSchemaTemplateReq { + return &TSDropSchemaTemplateReq{} } -func NewTSIServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *TSIServiceClient { - return &TSIServiceClient{ - c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), - } + +func (p *TSDropSchemaTemplateReq) GetSessionId() int64 { + return p.SessionId } -func NewTSIServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *TSIServiceClient { - return &TSIServiceClient{ - c: thrift.NewTStandardClient(iprot, oprot), - } +func (p *TSDropSchemaTemplateReq) GetTemplateName() string { + return p.TemplateName } +func (p *TSDropSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } -func NewTSIServiceClient(c thrift.TClient) *TSIServiceClient { - return &TSIServiceClient{ - c: c, + var issetSessionId bool = false; + var issetTemplateName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetSessionId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTemplateName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetSessionId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); } + if !issetTemplateName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TemplateName is not set")); + } + return nil } -func (p *TSIServiceClient) Client_() thrift.TClient { - return p.c +func (p *TSDropSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.SessionId = v } - -func (p *TSIServiceClient) LastResponseMeta_() thrift.ResponseMeta { - return p.meta + return nil } -func (p *TSIServiceClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { - p.meta = meta +func (p *TSDropSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.TemplateName = v +} + return nil } -// Parameters: -// - Req -func (p *TSIServiceClient) OpenSession(ctx context.Context, req *TSOpenSessionReq) (_r *TSOpenSessionResp, _err error) { - var _args163 TSIServiceOpenSessionArgs - _args163.Req = req - var _result165 TSIServiceOpenSessionResult - var _meta164 thrift.ResponseMeta - _meta164, _err = p.Client_().Call(ctx, "openSession", &_args163, &_result165) - p.SetLastResponseMeta_(_meta164) - if _err != nil { - return +func (p *TSDropSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSDropSchemaTemplateReq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } - return _result165.GetSuccess(), nil + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil } -// Parameters: -// - Req -func (p *TSIServiceClient) CloseSession(ctx context.Context, req *TSCloseSessionReq) (_r *TSStatus, _err error) { - var _args166 TSIServiceCloseSessionArgs - _args166.Req = req - var _result168 TSIServiceCloseSessionResult - var _meta167 thrift.ResponseMeta - _meta167, _err = p.Client_().Call(ctx, "closeSession", &_args166, &_result168) - p.SetLastResponseMeta_(_meta167) - if _err != nil { - return +func (p *TSDropSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } + return err +} + +func (p *TSDropSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) } + return err +} + +func (p *TSDropSchemaTemplateReq) Equals(other *TSDropSchemaTemplateReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false } - return _result168.GetSuccess(), nil + if p.SessionId != other.SessionId { return false } + if p.TemplateName != other.TemplateName { return false } + return true } -// Parameters: -// - Req -func (p *TSIServiceClient) ExecuteStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { - var _args169 TSIServiceExecuteStatementArgs - _args169.Req = req - var _result171 TSIServiceExecuteStatementResult - var _meta170 thrift.ResponseMeta - _meta170, _err = p.Client_().Call(ctx, "executeStatement", &_args169, &_result171) - p.SetLastResponseMeta_(_meta170) - if _err != nil { - return +func (p *TSDropSchemaTemplateReq) String() string { + if p == nil { + return "" } - return _result171.GetSuccess(), nil + return fmt.Sprintf("TSDropSchemaTemplateReq(%+v)", *p) } -// Parameters: -// - Req -func (p *TSIServiceClient) ExecuteBatchStatement(ctx context.Context, req *TSExecuteBatchStatementReq) (_r *TSStatus, _err error) { - var _args172 TSIServiceExecuteBatchStatementArgs - _args172.Req = req - var _result174 TSIServiceExecuteBatchStatementResult - var _meta173 thrift.ResponseMeta - _meta173, _err = p.Client_().Call(ctx, "executeBatchStatement", &_args172, &_result174) - p.SetLastResponseMeta_(_meta173) - if _err != nil { +// Attributes: +// - SessionId +// - DevicePathList +type TCreateTimeseriesUsingSchemaTemplateReq struct { + SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` + DevicePathList []string `thrift:"devicePathList,2,required" db:"devicePathList" json:"devicePathList"` +} + +func NewTCreateTimeseriesUsingSchemaTemplateReq() *TCreateTimeseriesUsingSchemaTemplateReq { + return &TCreateTimeseriesUsingSchemaTemplateReq{} +} + + +func (p *TCreateTimeseriesUsingSchemaTemplateReq) GetSessionId() int64 { + return p.SessionId +} + +func (p *TCreateTimeseriesUsingSchemaTemplateReq) GetDevicePathList() []string { + return p.DevicePathList +} +func (p *TCreateTimeseriesUsingSchemaTemplateReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetSessionId bool = false; + var issetDevicePathList bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetSessionId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetDevicePathList = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetSessionId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SessionId is not set")); + } + if !issetDevicePathList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DevicePathList is not set")); + } + return nil +} + +func (p *TCreateTimeseriesUsingSchemaTemplateReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.SessionId = v +} + return nil +} + +func (p *TCreateTimeseriesUsingSchemaTemplateReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.DevicePathList = tSlice + for i := 0; i < size; i ++ { +var _elem185 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem185 = v +} + p.DevicePathList = append(p.DevicePathList, _elem185) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TCreateTimeseriesUsingSchemaTemplateReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TCreateTimeseriesUsingSchemaTemplateReq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TCreateTimeseriesUsingSchemaTemplateReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } + return err +} + +func (p *TCreateTimeseriesUsingSchemaTemplateReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "devicePathList", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:devicePathList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.DevicePathList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.DevicePathList { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:devicePathList: ", p), err) } + return err +} + +func (p *TCreateTimeseriesUsingSchemaTemplateReq) Equals(other *TCreateTimeseriesUsingSchemaTemplateReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.SessionId != other.SessionId { return false } + if len(p.DevicePathList) != len(other.DevicePathList) { return false } + for i, _tgt := range p.DevicePathList { + _src186 := other.DevicePathList[i] + if _tgt != _src186 { return false } + } + return true +} + +func (p *TCreateTimeseriesUsingSchemaTemplateReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TCreateTimeseriesUsingSchemaTemplateReq(%+v)", *p) +} + +// Attributes: +// - PipeName +// - CreateTime +// - Version +// - Database +type TSyncIdentityInfo struct { + PipeName string `thrift:"pipeName,1,required" db:"pipeName" json:"pipeName"` + CreateTime int64 `thrift:"createTime,2,required" db:"createTime" json:"createTime"` + Version string `thrift:"version,3,required" db:"version" json:"version"` + Database string `thrift:"database,4,required" db:"database" json:"database"` +} + +func NewTSyncIdentityInfo() *TSyncIdentityInfo { + return &TSyncIdentityInfo{} +} + + +func (p *TSyncIdentityInfo) GetPipeName() string { + return p.PipeName +} + +func (p *TSyncIdentityInfo) GetCreateTime() int64 { + return p.CreateTime +} + +func (p *TSyncIdentityInfo) GetVersion() string { + return p.Version +} + +func (p *TSyncIdentityInfo) GetDatabase() string { + return p.Database +} +func (p *TSyncIdentityInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetPipeName bool = false; + var issetCreateTime bool = false; + var issetVersion bool = false; + var issetDatabase bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetPipeName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetCreateTime = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetVersion = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetDatabase = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetPipeName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PipeName is not set")); + } + if !issetCreateTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field CreateTime is not set")); + } + if !issetVersion{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")); + } + if !issetDatabase{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Database is not set")); + } + return nil +} + +func (p *TSyncIdentityInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.PipeName = v +} + return nil +} + +func (p *TSyncIdentityInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.CreateTime = v +} + return nil +} + +func (p *TSyncIdentityInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Version = v +} + return nil +} + +func (p *TSyncIdentityInfo) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Database = v +} + return nil +} + +func (p *TSyncIdentityInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSyncIdentityInfo"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSyncIdentityInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pipeName", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pipeName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.PipeName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pipeName (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pipeName: ", p), err) } + return err +} + +func (p *TSyncIdentityInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "createTime", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:createTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.CreateTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.createTime (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:createTime: ", p), err) } + return err +} + +func (p *TSyncIdentityInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:version: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Version)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.version (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:version: ", p), err) } + return err +} + +func (p *TSyncIdentityInfo) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "database", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:database: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Database)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.database (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:database: ", p), err) } + return err +} + +func (p *TSyncIdentityInfo) Equals(other *TSyncIdentityInfo) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.PipeName != other.PipeName { return false } + if p.CreateTime != other.CreateTime { return false } + if p.Version != other.Version { return false } + if p.Database != other.Database { return false } + return true +} + +func (p *TSyncIdentityInfo) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSyncIdentityInfo(%+v)", *p) +} + +// Attributes: +// - FileName +// - StartIndex +type TSyncTransportMetaInfo struct { + FileName string `thrift:"fileName,1,required" db:"fileName" json:"fileName"` + StartIndex int64 `thrift:"startIndex,2,required" db:"startIndex" json:"startIndex"` +} + +func NewTSyncTransportMetaInfo() *TSyncTransportMetaInfo { + return &TSyncTransportMetaInfo{} +} + + +func (p *TSyncTransportMetaInfo) GetFileName() string { + return p.FileName +} + +func (p *TSyncTransportMetaInfo) GetStartIndex() int64 { + return p.StartIndex +} +func (p *TSyncTransportMetaInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetFileName bool = false; + var issetStartIndex bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetFileName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetStartIndex = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetFileName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field FileName is not set")); + } + if !issetStartIndex{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartIndex is not set")); + } + return nil +} + +func (p *TSyncTransportMetaInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.FileName = v +} + return nil +} + +func (p *TSyncTransportMetaInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.StartIndex = v +} + return nil +} + +func (p *TSyncTransportMetaInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSyncTransportMetaInfo"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSyncTransportMetaInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "fileName", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fileName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.FileName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.fileName (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fileName: ", p), err) } + return err +} + +func (p *TSyncTransportMetaInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "startIndex", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:startIndex: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.StartIndex)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startIndex (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:startIndex: ", p), err) } + return err +} + +func (p *TSyncTransportMetaInfo) Equals(other *TSyncTransportMetaInfo) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.FileName != other.FileName { return false } + if p.StartIndex != other.StartIndex { return false } + return true +} + +func (p *TSyncTransportMetaInfo) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSyncTransportMetaInfo(%+v)", *p) +} + +// Attributes: +// - Status +// - EnableOperationSync +// - SecondaryAddress +// - SecondaryPort +type TSBackupConfigurationResp struct { + Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` + EnableOperationSync *bool `thrift:"enableOperationSync,2" db:"enableOperationSync" json:"enableOperationSync,omitempty"` + SecondaryAddress *string `thrift:"secondaryAddress,3" db:"secondaryAddress" json:"secondaryAddress,omitempty"` + SecondaryPort *int32 `thrift:"secondaryPort,4" db:"secondaryPort" json:"secondaryPort,omitempty"` +} + +func NewTSBackupConfigurationResp() *TSBackupConfigurationResp { + return &TSBackupConfigurationResp{} +} + +var TSBackupConfigurationResp_Status_DEFAULT *common.TSStatus +func (p *TSBackupConfigurationResp) GetStatus() *common.TSStatus { + if !p.IsSetStatus() { + return TSBackupConfigurationResp_Status_DEFAULT + } +return p.Status +} +var TSBackupConfigurationResp_EnableOperationSync_DEFAULT bool +func (p *TSBackupConfigurationResp) GetEnableOperationSync() bool { + if !p.IsSetEnableOperationSync() { + return TSBackupConfigurationResp_EnableOperationSync_DEFAULT + } +return *p.EnableOperationSync +} +var TSBackupConfigurationResp_SecondaryAddress_DEFAULT string +func (p *TSBackupConfigurationResp) GetSecondaryAddress() string { + if !p.IsSetSecondaryAddress() { + return TSBackupConfigurationResp_SecondaryAddress_DEFAULT + } +return *p.SecondaryAddress +} +var TSBackupConfigurationResp_SecondaryPort_DEFAULT int32 +func (p *TSBackupConfigurationResp) GetSecondaryPort() int32 { + if !p.IsSetSecondaryPort() { + return TSBackupConfigurationResp_SecondaryPort_DEFAULT + } +return *p.SecondaryPort +} +func (p *TSBackupConfigurationResp) IsSetStatus() bool { + return p.Status != nil +} + +func (p *TSBackupConfigurationResp) IsSetEnableOperationSync() bool { + return p.EnableOperationSync != nil +} + +func (p *TSBackupConfigurationResp) IsSetSecondaryAddress() bool { + return p.SecondaryAddress != nil +} + +func (p *TSBackupConfigurationResp) IsSetSecondaryPort() bool { + return p.SecondaryPort != nil +} + +func (p *TSBackupConfigurationResp) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetStatus bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetStatus = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetStatus{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); + } + return nil +} + +func (p *TSBackupConfigurationResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Status = &common.TSStatus{} + if err := p.Status.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Status), err) + } + return nil +} + +func (p *TSBackupConfigurationResp) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.EnableOperationSync = &v +} + return nil +} + +func (p *TSBackupConfigurationResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.SecondaryAddress = &v +} + return nil +} + +func (p *TSBackupConfigurationResp) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.SecondaryPort = &v +} + return nil +} + +func (p *TSBackupConfigurationResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSBackupConfigurationResp"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSBackupConfigurationResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:status: ", p), err) } + if err := p.Status.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Status), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", p), err) } + return err +} + +func (p *TSBackupConfigurationResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetEnableOperationSync() { + if err := oprot.WriteFieldBegin(ctx, "enableOperationSync", thrift.BOOL, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:enableOperationSync: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.EnableOperationSync)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.enableOperationSync (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:enableOperationSync: ", p), err) } + } + return err +} + +func (p *TSBackupConfigurationResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSecondaryAddress() { + if err := oprot.WriteFieldBegin(ctx, "secondaryAddress", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:secondaryAddress: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.SecondaryAddress)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.secondaryAddress (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:secondaryAddress: ", p), err) } + } + return err +} + +func (p *TSBackupConfigurationResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSecondaryPort() { + if err := oprot.WriteFieldBegin(ctx, "secondaryPort", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondaryPort: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.SecondaryPort)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.secondaryPort (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondaryPort: ", p), err) } + } + return err +} + +func (p *TSBackupConfigurationResp) Equals(other *TSBackupConfigurationResp) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Status.Equals(other.Status) { return false } + if p.EnableOperationSync != other.EnableOperationSync { + if p.EnableOperationSync == nil || other.EnableOperationSync == nil { + return false + } + if (*p.EnableOperationSync) != (*other.EnableOperationSync) { return false } + } + if p.SecondaryAddress != other.SecondaryAddress { + if p.SecondaryAddress == nil || other.SecondaryAddress == nil { + return false + } + if (*p.SecondaryAddress) != (*other.SecondaryAddress) { return false } + } + if p.SecondaryPort != other.SecondaryPort { + if p.SecondaryPort == nil || other.SecondaryPort == nil { + return false + } + if (*p.SecondaryPort) != (*other.SecondaryPort) { return false } + } + return true +} + +func (p *TSBackupConfigurationResp) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSBackupConfigurationResp(%+v)", *p) +} + +// Attributes: +// - UserName +// - LogInTime +// - ConnectionId +// - Type +type TSConnectionInfo struct { + UserName string `thrift:"userName,1,required" db:"userName" json:"userName"` + LogInTime int64 `thrift:"logInTime,2,required" db:"logInTime" json:"logInTime"` + ConnectionId string `thrift:"connectionId,3,required" db:"connectionId" json:"connectionId"` + Type TSConnectionType `thrift:"type,4,required" db:"type" json:"type"` +} + +func NewTSConnectionInfo() *TSConnectionInfo { + return &TSConnectionInfo{} +} + + +func (p *TSConnectionInfo) GetUserName() string { + return p.UserName +} + +func (p *TSConnectionInfo) GetLogInTime() int64 { + return p.LogInTime +} + +func (p *TSConnectionInfo) GetConnectionId() string { + return p.ConnectionId +} + +func (p *TSConnectionInfo) GetType() TSConnectionType { + return p.Type +} +func (p *TSConnectionInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetUserName bool = false; + var issetLogInTime bool = false; + var issetConnectionId bool = false; + var issetType bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetUserName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetLogInTime = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetConnectionId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetType = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetUserName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field UserName is not set")); + } + if !issetLogInTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field LogInTime is not set")); + } + if !issetConnectionId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ConnectionId is not set")); + } + if !issetType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")); + } + return nil +} + +func (p *TSConnectionInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.UserName = v +} + return nil +} + +func (p *TSConnectionInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.LogInTime = v +} + return nil +} + +func (p *TSConnectionInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.ConnectionId = v +} + return nil +} + +func (p *TSConnectionInfo) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + temp := TSConnectionType(v) + p.Type = temp +} + return nil +} + +func (p *TSConnectionInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSConnectionInfo"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSConnectionInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "userName", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:userName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.UserName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.userName (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:userName: ", p), err) } + return err +} + +func (p *TSConnectionInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "logInTime", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:logInTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.LogInTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.logInTime (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:logInTime: ", p), err) } + return err +} + +func (p *TSConnectionInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "connectionId", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:connectionId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ConnectionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.connectionId (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:connectionId: ", p), err) } + return err +} + +func (p *TSConnectionInfo) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) } + return err +} + +func (p *TSConnectionInfo) Equals(other *TSConnectionInfo) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.UserName != other.UserName { return false } + if p.LogInTime != other.LogInTime { return false } + if p.ConnectionId != other.ConnectionId { return false } + if p.Type != other.Type { return false } + return true +} + +func (p *TSConnectionInfo) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSConnectionInfo(%+v)", *p) +} + +// Attributes: +// - ConnectionInfoList +type TSConnectionInfoResp struct { + ConnectionInfoList []*TSConnectionInfo `thrift:"connectionInfoList,1,required" db:"connectionInfoList" json:"connectionInfoList"` +} + +func NewTSConnectionInfoResp() *TSConnectionInfoResp { + return &TSConnectionInfoResp{} +} + + +func (p *TSConnectionInfoResp) GetConnectionInfoList() []*TSConnectionInfo { + return p.ConnectionInfoList +} +func (p *TSConnectionInfoResp) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetConnectionInfoList bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.LIST { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetConnectionInfoList = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetConnectionInfoList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ConnectionInfoList is not set")); + } + return nil +} + +func (p *TSConnectionInfoResp) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TSConnectionInfo, 0, size) + p.ConnectionInfoList = tSlice + for i := 0; i < size; i ++ { + _elem187 := &TSConnectionInfo{} + if err := _elem187.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem187), err) + } + p.ConnectionInfoList = append(p.ConnectionInfoList, _elem187) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSConnectionInfoResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSConnectionInfoResp"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSConnectionInfoResp) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "connectionInfoList", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:connectionInfoList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ConnectionInfoList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ConnectionInfoList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:connectionInfoList: ", p), err) } + return err +} + +func (p *TSConnectionInfoResp) Equals(other *TSConnectionInfoResp) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.ConnectionInfoList) != len(other.ConnectionInfoList) { return false } + for i, _tgt := range p.ConnectionInfoList { + _src188 := other.ConnectionInfoList[i] + if !_tgt.Equals(_src188) { return false } + } + return true +} + +func (p *TSConnectionInfoResp) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSConnectionInfoResp(%+v)", *p) +} + +type IClientRPCService interface { + // Parameters: + // - Req + ExecuteQueryStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + ExecuteUpdateStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + ExecuteStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + ExecuteRawDataQueryV2(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + ExecuteLastDataQueryV2(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + ExecuteAggregationQueryV2(ctx context.Context, req *TSAggregationQueryReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + FetchResultsV2(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) + // Parameters: + // - Req + OpenSession(ctx context.Context, req *TSOpenSessionReq) (_r *TSOpenSessionResp, _err error) + // Parameters: + // - Req + CloseSession(ctx context.Context, req *TSCloseSessionReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + ExecuteStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + ExecuteBatchStatement(ctx context.Context, req *TSExecuteBatchStatementReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + ExecuteQueryStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + ExecuteUpdateStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + FetchResults(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) + // Parameters: + // - Req + FetchMetadata(ctx context.Context, req *TSFetchMetadataReq) (_r *TSFetchMetadataResp, _err error) + // Parameters: + // - Req + CancelOperation(ctx context.Context, req *TSCancelOperationReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + CloseOperation(ctx context.Context, req *TSCloseOperationReq) (_r *common.TSStatus, _err error) + // Parameters: + // - SessionId + GetTimeZone(ctx context.Context, sessionId int64) (_r *TSGetTimeZoneResp, _err error) + // Parameters: + // - Req + SetTimeZone(ctx context.Context, req *TSSetTimeZoneReq) (_r *common.TSStatus, _err error) + GetProperties(ctx context.Context) (_r *ServerProperties, _err error) + // Parameters: + // - SessionId + // - StorageGroup + SetStorageGroup(ctx context.Context, sessionId int64, storageGroup string) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + CreateTimeseries(ctx context.Context, req *TSCreateTimeseriesReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + CreateAlignedTimeseries(ctx context.Context, req *TSCreateAlignedTimeseriesReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + CreateMultiTimeseries(ctx context.Context, req *TSCreateMultiTimeseriesReq) (_r *common.TSStatus, _err error) + // Parameters: + // - SessionId + // - Path + DeleteTimeseries(ctx context.Context, sessionId int64, path []string) (_r *common.TSStatus, _err error) + // Parameters: + // - SessionId + // - StorageGroup + DeleteStorageGroups(ctx context.Context, sessionId int64, storageGroup []string) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + InsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + InsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + InsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + InsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + InsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + FastInsertRecords(ctx context.Context, req *TSFastInsertRecordsReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + InsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + InsertStringRecordsOfOneDevice(ctx context.Context, req *TSInsertStringRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + InsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + TestInsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + TestInsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + TestInsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + TestInsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + TestInsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + TestInsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + TestInsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + DeleteData(ctx context.Context, req *TSDeleteDataReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + ExecuteRawDataQuery(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + ExecuteLastDataQuery(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req + ExecuteAggregationQuery(ctx context.Context, req *TSAggregationQueryReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - SessionId + RequestStatementId(ctx context.Context, sessionId int64) (_r int64, _err error) + // Parameters: + // - Req + CreateSchemaTemplate(ctx context.Context, req *TSCreateSchemaTemplateReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + AppendSchemaTemplate(ctx context.Context, req *TSAppendSchemaTemplateReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + PruneSchemaTemplate(ctx context.Context, req *TSPruneSchemaTemplateReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + QuerySchemaTemplate(ctx context.Context, req *TSQueryTemplateReq) (_r *TSQueryTemplateResp, _err error) + // Parameters: + // - Req + SetSchemaTemplate(ctx context.Context, req *TSSetSchemaTemplateReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + UnsetSchemaTemplate(ctx context.Context, req *TSUnsetSchemaTemplateReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + DropSchemaTemplate(ctx context.Context, req *TSDropSchemaTemplateReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + CreateTimeseriesUsingSchemaTemplate(ctx context.Context, req *TCreateTimeseriesUsingSchemaTemplateReq) (_r *common.TSStatus, _err error) + // Parameters: + // - Info + Handshake(ctx context.Context, info *TSyncIdentityInfo) (_r *common.TSStatus, _err error) + // Parameters: + // - Buff + SendPipeData(ctx context.Context, buff []byte) (_r *common.TSStatus, _err error) + // Parameters: + // - MetaInfo + // - Buff + SendFile(ctx context.Context, metaInfo *TSyncTransportMetaInfo, buff []byte) (_r *common.TSStatus, _err error) + GetBackupConfiguration(ctx context.Context) (_r *TSBackupConfigurationResp, _err error) + FetchAllConnectionsInfo(ctx context.Context) (_r *TSConnectionInfoResp, _err error) +} + +type IClientRPCServiceClient struct { + c thrift.TClient + meta thrift.ResponseMeta +} + +func NewIClientRPCServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *IClientRPCServiceClient { + return &IClientRPCServiceClient{ + c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), + } +} + +func NewIClientRPCServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *IClientRPCServiceClient { + return &IClientRPCServiceClient{ + c: thrift.NewTStandardClient(iprot, oprot), + } +} + +func NewIClientRPCServiceClient(c thrift.TClient) *IClientRPCServiceClient { + return &IClientRPCServiceClient{ + c: c, + } +} + +func (p *IClientRPCServiceClient) Client_() thrift.TClient { + return p.c +} + +func (p *IClientRPCServiceClient) LastResponseMeta_() thrift.ResponseMeta { + return p.meta +} + +func (p *IClientRPCServiceClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { + p.meta = meta +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteQueryStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { + var _args189 IClientRPCServiceExecuteQueryStatementV2Args + _args189.Req = req + var _result191 IClientRPCServiceExecuteQueryStatementV2Result + var _meta190 thrift.ResponseMeta + _meta190, _err = p.Client_().Call(ctx, "executeQueryStatementV2", &_args189, &_result191) + p.SetLastResponseMeta_(_meta190) + if _err != nil { + return + } + return _result191.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteUpdateStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { + var _args192 IClientRPCServiceExecuteUpdateStatementV2Args + _args192.Req = req + var _result194 IClientRPCServiceExecuteUpdateStatementV2Result + var _meta193 thrift.ResponseMeta + _meta193, _err = p.Client_().Call(ctx, "executeUpdateStatementV2", &_args192, &_result194) + p.SetLastResponseMeta_(_meta193) + if _err != nil { + return + } + return _result194.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteStatementV2(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { + var _args195 IClientRPCServiceExecuteStatementV2Args + _args195.Req = req + var _result197 IClientRPCServiceExecuteStatementV2Result + var _meta196 thrift.ResponseMeta + _meta196, _err = p.Client_().Call(ctx, "executeStatementV2", &_args195, &_result197) + p.SetLastResponseMeta_(_meta196) + if _err != nil { + return + } + return _result197.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteRawDataQueryV2(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) { + var _args198 IClientRPCServiceExecuteRawDataQueryV2Args + _args198.Req = req + var _result200 IClientRPCServiceExecuteRawDataQueryV2Result + var _meta199 thrift.ResponseMeta + _meta199, _err = p.Client_().Call(ctx, "executeRawDataQueryV2", &_args198, &_result200) + p.SetLastResponseMeta_(_meta199) + if _err != nil { + return + } + return _result200.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteLastDataQueryV2(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) { + var _args201 IClientRPCServiceExecuteLastDataQueryV2Args + _args201.Req = req + var _result203 IClientRPCServiceExecuteLastDataQueryV2Result + var _meta202 thrift.ResponseMeta + _meta202, _err = p.Client_().Call(ctx, "executeLastDataQueryV2", &_args201, &_result203) + p.SetLastResponseMeta_(_meta202) + if _err != nil { + return + } + return _result203.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteAggregationQueryV2(ctx context.Context, req *TSAggregationQueryReq) (_r *TSExecuteStatementResp, _err error) { + var _args204 IClientRPCServiceExecuteAggregationQueryV2Args + _args204.Req = req + var _result206 IClientRPCServiceExecuteAggregationQueryV2Result + var _meta205 thrift.ResponseMeta + _meta205, _err = p.Client_().Call(ctx, "executeAggregationQueryV2", &_args204, &_result206) + p.SetLastResponseMeta_(_meta205) + if _err != nil { + return + } + return _result206.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) FetchResultsV2(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) { + var _args207 IClientRPCServiceFetchResultsV2Args + _args207.Req = req + var _result209 IClientRPCServiceFetchResultsV2Result + var _meta208 thrift.ResponseMeta + _meta208, _err = p.Client_().Call(ctx, "fetchResultsV2", &_args207, &_result209) + p.SetLastResponseMeta_(_meta208) + if _err != nil { + return + } + return _result209.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) OpenSession(ctx context.Context, req *TSOpenSessionReq) (_r *TSOpenSessionResp, _err error) { + var _args210 IClientRPCServiceOpenSessionArgs + _args210.Req = req + var _result212 IClientRPCServiceOpenSessionResult + var _meta211 thrift.ResponseMeta + _meta211, _err = p.Client_().Call(ctx, "openSession", &_args210, &_result212) + p.SetLastResponseMeta_(_meta211) + if _err != nil { + return + } + return _result212.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) CloseSession(ctx context.Context, req *TSCloseSessionReq) (_r *common.TSStatus, _err error) { + var _args213 IClientRPCServiceCloseSessionArgs + _args213.Req = req + var _result215 IClientRPCServiceCloseSessionResult + var _meta214 thrift.ResponseMeta + _meta214, _err = p.Client_().Call(ctx, "closeSession", &_args213, &_result215) + p.SetLastResponseMeta_(_meta214) + if _err != nil { + return + } + return _result215.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { + var _args216 IClientRPCServiceExecuteStatementArgs + _args216.Req = req + var _result218 IClientRPCServiceExecuteStatementResult + var _meta217 thrift.ResponseMeta + _meta217, _err = p.Client_().Call(ctx, "executeStatement", &_args216, &_result218) + p.SetLastResponseMeta_(_meta217) + if _err != nil { + return + } + return _result218.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteBatchStatement(ctx context.Context, req *TSExecuteBatchStatementReq) (_r *common.TSStatus, _err error) { + var _args219 IClientRPCServiceExecuteBatchStatementArgs + _args219.Req = req + var _result221 IClientRPCServiceExecuteBatchStatementResult + var _meta220 thrift.ResponseMeta + _meta220, _err = p.Client_().Call(ctx, "executeBatchStatement", &_args219, &_result221) + p.SetLastResponseMeta_(_meta220) + if _err != nil { + return + } + return _result221.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteQueryStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { + var _args222 IClientRPCServiceExecuteQueryStatementArgs + _args222.Req = req + var _result224 IClientRPCServiceExecuteQueryStatementResult + var _meta223 thrift.ResponseMeta + _meta223, _err = p.Client_().Call(ctx, "executeQueryStatement", &_args222, &_result224) + p.SetLastResponseMeta_(_meta223) + if _err != nil { + return + } + return _result224.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteUpdateStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { + var _args225 IClientRPCServiceExecuteUpdateStatementArgs + _args225.Req = req + var _result227 IClientRPCServiceExecuteUpdateStatementResult + var _meta226 thrift.ResponseMeta + _meta226, _err = p.Client_().Call(ctx, "executeUpdateStatement", &_args225, &_result227) + p.SetLastResponseMeta_(_meta226) + if _err != nil { + return + } + return _result227.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) FetchResults(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) { + var _args228 IClientRPCServiceFetchResultsArgs + _args228.Req = req + var _result230 IClientRPCServiceFetchResultsResult + var _meta229 thrift.ResponseMeta + _meta229, _err = p.Client_().Call(ctx, "fetchResults", &_args228, &_result230) + p.SetLastResponseMeta_(_meta229) + if _err != nil { + return + } + return _result230.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) FetchMetadata(ctx context.Context, req *TSFetchMetadataReq) (_r *TSFetchMetadataResp, _err error) { + var _args231 IClientRPCServiceFetchMetadataArgs + _args231.Req = req + var _result233 IClientRPCServiceFetchMetadataResult + var _meta232 thrift.ResponseMeta + _meta232, _err = p.Client_().Call(ctx, "fetchMetadata", &_args231, &_result233) + p.SetLastResponseMeta_(_meta232) + if _err != nil { + return + } + return _result233.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) CancelOperation(ctx context.Context, req *TSCancelOperationReq) (_r *common.TSStatus, _err error) { + var _args234 IClientRPCServiceCancelOperationArgs + _args234.Req = req + var _result236 IClientRPCServiceCancelOperationResult + var _meta235 thrift.ResponseMeta + _meta235, _err = p.Client_().Call(ctx, "cancelOperation", &_args234, &_result236) + p.SetLastResponseMeta_(_meta235) + if _err != nil { + return + } + return _result236.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) CloseOperation(ctx context.Context, req *TSCloseOperationReq) (_r *common.TSStatus, _err error) { + var _args237 IClientRPCServiceCloseOperationArgs + _args237.Req = req + var _result239 IClientRPCServiceCloseOperationResult + var _meta238 thrift.ResponseMeta + _meta238, _err = p.Client_().Call(ctx, "closeOperation", &_args237, &_result239) + p.SetLastResponseMeta_(_meta238) + if _err != nil { + return + } + return _result239.GetSuccess(), nil +} + +// Parameters: +// - SessionId +func (p *IClientRPCServiceClient) GetTimeZone(ctx context.Context, sessionId int64) (_r *TSGetTimeZoneResp, _err error) { + var _args240 IClientRPCServiceGetTimeZoneArgs + _args240.SessionId = sessionId + var _result242 IClientRPCServiceGetTimeZoneResult + var _meta241 thrift.ResponseMeta + _meta241, _err = p.Client_().Call(ctx, "getTimeZone", &_args240, &_result242) + p.SetLastResponseMeta_(_meta241) + if _err != nil { + return + } + return _result242.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) SetTimeZone(ctx context.Context, req *TSSetTimeZoneReq) (_r *common.TSStatus, _err error) { + var _args243 IClientRPCServiceSetTimeZoneArgs + _args243.Req = req + var _result245 IClientRPCServiceSetTimeZoneResult + var _meta244 thrift.ResponseMeta + _meta244, _err = p.Client_().Call(ctx, "setTimeZone", &_args243, &_result245) + p.SetLastResponseMeta_(_meta244) + if _err != nil { + return + } + return _result245.GetSuccess(), nil +} + +func (p *IClientRPCServiceClient) GetProperties(ctx context.Context) (_r *ServerProperties, _err error) { + var _args246 IClientRPCServiceGetPropertiesArgs + var _result248 IClientRPCServiceGetPropertiesResult + var _meta247 thrift.ResponseMeta + _meta247, _err = p.Client_().Call(ctx, "getProperties", &_args246, &_result248) + p.SetLastResponseMeta_(_meta247) + if _err != nil { + return + } + return _result248.GetSuccess(), nil +} + +// Parameters: +// - SessionId +// - StorageGroup +func (p *IClientRPCServiceClient) SetStorageGroup(ctx context.Context, sessionId int64, storageGroup string) (_r *common.TSStatus, _err error) { + var _args249 IClientRPCServiceSetStorageGroupArgs + _args249.SessionId = sessionId + _args249.StorageGroup = storageGroup + var _result251 IClientRPCServiceSetStorageGroupResult + var _meta250 thrift.ResponseMeta + _meta250, _err = p.Client_().Call(ctx, "setStorageGroup", &_args249, &_result251) + p.SetLastResponseMeta_(_meta250) + if _err != nil { + return + } + return _result251.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) CreateTimeseries(ctx context.Context, req *TSCreateTimeseriesReq) (_r *common.TSStatus, _err error) { + var _args252 IClientRPCServiceCreateTimeseriesArgs + _args252.Req = req + var _result254 IClientRPCServiceCreateTimeseriesResult + var _meta253 thrift.ResponseMeta + _meta253, _err = p.Client_().Call(ctx, "createTimeseries", &_args252, &_result254) + p.SetLastResponseMeta_(_meta253) + if _err != nil { + return + } + return _result254.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) CreateAlignedTimeseries(ctx context.Context, req *TSCreateAlignedTimeseriesReq) (_r *common.TSStatus, _err error) { + var _args255 IClientRPCServiceCreateAlignedTimeseriesArgs + _args255.Req = req + var _result257 IClientRPCServiceCreateAlignedTimeseriesResult + var _meta256 thrift.ResponseMeta + _meta256, _err = p.Client_().Call(ctx, "createAlignedTimeseries", &_args255, &_result257) + p.SetLastResponseMeta_(_meta256) + if _err != nil { + return + } + return _result257.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) CreateMultiTimeseries(ctx context.Context, req *TSCreateMultiTimeseriesReq) (_r *common.TSStatus, _err error) { + var _args258 IClientRPCServiceCreateMultiTimeseriesArgs + _args258.Req = req + var _result260 IClientRPCServiceCreateMultiTimeseriesResult + var _meta259 thrift.ResponseMeta + _meta259, _err = p.Client_().Call(ctx, "createMultiTimeseries", &_args258, &_result260) + p.SetLastResponseMeta_(_meta259) + if _err != nil { + return + } + return _result260.GetSuccess(), nil +} + +// Parameters: +// - SessionId +// - Path +func (p *IClientRPCServiceClient) DeleteTimeseries(ctx context.Context, sessionId int64, path []string) (_r *common.TSStatus, _err error) { + var _args261 IClientRPCServiceDeleteTimeseriesArgs + _args261.SessionId = sessionId + _args261.Path = path + var _result263 IClientRPCServiceDeleteTimeseriesResult + var _meta262 thrift.ResponseMeta + _meta262, _err = p.Client_().Call(ctx, "deleteTimeseries", &_args261, &_result263) + p.SetLastResponseMeta_(_meta262) + if _err != nil { + return + } + return _result263.GetSuccess(), nil +} + +// Parameters: +// - SessionId +// - StorageGroup +func (p *IClientRPCServiceClient) DeleteStorageGroups(ctx context.Context, sessionId int64, storageGroup []string) (_r *common.TSStatus, _err error) { + var _args264 IClientRPCServiceDeleteStorageGroupsArgs + _args264.SessionId = sessionId + _args264.StorageGroup = storageGroup + var _result266 IClientRPCServiceDeleteStorageGroupsResult + var _meta265 thrift.ResponseMeta + _meta265, _err = p.Client_().Call(ctx, "deleteStorageGroups", &_args264, &_result266) + p.SetLastResponseMeta_(_meta265) + if _err != nil { + return + } + return _result266.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) InsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *common.TSStatus, _err error) { + var _args267 IClientRPCServiceInsertRecordArgs + _args267.Req = req + var _result269 IClientRPCServiceInsertRecordResult + var _meta268 thrift.ResponseMeta + _meta268, _err = p.Client_().Call(ctx, "insertRecord", &_args267, &_result269) + p.SetLastResponseMeta_(_meta268) + if _err != nil { + return + } + return _result269.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) InsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *common.TSStatus, _err error) { + var _args270 IClientRPCServiceInsertStringRecordArgs + _args270.Req = req + var _result272 IClientRPCServiceInsertStringRecordResult + var _meta271 thrift.ResponseMeta + _meta271, _err = p.Client_().Call(ctx, "insertStringRecord", &_args270, &_result272) + p.SetLastResponseMeta_(_meta271) + if _err != nil { + return + } + return _result272.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) InsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *common.TSStatus, _err error) { + var _args273 IClientRPCServiceInsertTabletArgs + _args273.Req = req + var _result275 IClientRPCServiceInsertTabletResult + var _meta274 thrift.ResponseMeta + _meta274, _err = p.Client_().Call(ctx, "insertTablet", &_args273, &_result275) + p.SetLastResponseMeta_(_meta274) + if _err != nil { + return + } + return _result275.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) InsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *common.TSStatus, _err error) { + var _args276 IClientRPCServiceInsertTabletsArgs + _args276.Req = req + var _result278 IClientRPCServiceInsertTabletsResult + var _meta277 thrift.ResponseMeta + _meta277, _err = p.Client_().Call(ctx, "insertTablets", &_args276, &_result278) + p.SetLastResponseMeta_(_meta277) + if _err != nil { + return + } + return _result278.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) InsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *common.TSStatus, _err error) { + var _args279 IClientRPCServiceInsertRecordsArgs + _args279.Req = req + var _result281 IClientRPCServiceInsertRecordsResult + var _meta280 thrift.ResponseMeta + _meta280, _err = p.Client_().Call(ctx, "insertRecords", &_args279, &_result281) + p.SetLastResponseMeta_(_meta280) + if _err != nil { + return + } + return _result281.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) FastInsertRecords(ctx context.Context, req *TSFastInsertRecordsReq) (_r *common.TSStatus, _err error) { + var _args282 IClientRPCServiceFastInsertRecordsArgs + _args282.Req = req + var _result284 IClientRPCServiceFastInsertRecordsResult + var _meta283 thrift.ResponseMeta + _meta283, _err = p.Client_().Call(ctx, "fastInsertRecords", &_args282, &_result284) + p.SetLastResponseMeta_(_meta283) + if _err != nil { + return + } + return _result284.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) InsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) { + var _args285 IClientRPCServiceInsertRecordsOfOneDeviceArgs + _args285.Req = req + var _result287 IClientRPCServiceInsertRecordsOfOneDeviceResult + var _meta286 thrift.ResponseMeta + _meta286, _err = p.Client_().Call(ctx, "insertRecordsOfOneDevice", &_args285, &_result287) + p.SetLastResponseMeta_(_meta286) + if _err != nil { + return + } + return _result287.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) InsertStringRecordsOfOneDevice(ctx context.Context, req *TSInsertStringRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) { + var _args288 IClientRPCServiceInsertStringRecordsOfOneDeviceArgs + _args288.Req = req + var _result290 IClientRPCServiceInsertStringRecordsOfOneDeviceResult + var _meta289 thrift.ResponseMeta + _meta289, _err = p.Client_().Call(ctx, "insertStringRecordsOfOneDevice", &_args288, &_result290) + p.SetLastResponseMeta_(_meta289) + if _err != nil { + return + } + return _result290.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) InsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *common.TSStatus, _err error) { + var _args291 IClientRPCServiceInsertStringRecordsArgs + _args291.Req = req + var _result293 IClientRPCServiceInsertStringRecordsResult + var _meta292 thrift.ResponseMeta + _meta292, _err = p.Client_().Call(ctx, "insertStringRecords", &_args291, &_result293) + p.SetLastResponseMeta_(_meta292) + if _err != nil { + return + } + return _result293.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) TestInsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *common.TSStatus, _err error) { + var _args294 IClientRPCServiceTestInsertTabletArgs + _args294.Req = req + var _result296 IClientRPCServiceTestInsertTabletResult + var _meta295 thrift.ResponseMeta + _meta295, _err = p.Client_().Call(ctx, "testInsertTablet", &_args294, &_result296) + p.SetLastResponseMeta_(_meta295) + if _err != nil { + return + } + return _result296.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) TestInsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *common.TSStatus, _err error) { + var _args297 IClientRPCServiceTestInsertTabletsArgs + _args297.Req = req + var _result299 IClientRPCServiceTestInsertTabletsResult + var _meta298 thrift.ResponseMeta + _meta298, _err = p.Client_().Call(ctx, "testInsertTablets", &_args297, &_result299) + p.SetLastResponseMeta_(_meta298) + if _err != nil { + return + } + return _result299.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) TestInsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *common.TSStatus, _err error) { + var _args300 IClientRPCServiceTestInsertRecordArgs + _args300.Req = req + var _result302 IClientRPCServiceTestInsertRecordResult + var _meta301 thrift.ResponseMeta + _meta301, _err = p.Client_().Call(ctx, "testInsertRecord", &_args300, &_result302) + p.SetLastResponseMeta_(_meta301) + if _err != nil { + return + } + return _result302.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) TestInsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *common.TSStatus, _err error) { + var _args303 IClientRPCServiceTestInsertStringRecordArgs + _args303.Req = req + var _result305 IClientRPCServiceTestInsertStringRecordResult + var _meta304 thrift.ResponseMeta + _meta304, _err = p.Client_().Call(ctx, "testInsertStringRecord", &_args303, &_result305) + p.SetLastResponseMeta_(_meta304) + if _err != nil { + return + } + return _result305.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) TestInsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *common.TSStatus, _err error) { + var _args306 IClientRPCServiceTestInsertRecordsArgs + _args306.Req = req + var _result308 IClientRPCServiceTestInsertRecordsResult + var _meta307 thrift.ResponseMeta + _meta307, _err = p.Client_().Call(ctx, "testInsertRecords", &_args306, &_result308) + p.SetLastResponseMeta_(_meta307) + if _err != nil { + return + } + return _result308.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) TestInsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *common.TSStatus, _err error) { + var _args309 IClientRPCServiceTestInsertRecordsOfOneDeviceArgs + _args309.Req = req + var _result311 IClientRPCServiceTestInsertRecordsOfOneDeviceResult + var _meta310 thrift.ResponseMeta + _meta310, _err = p.Client_().Call(ctx, "testInsertRecordsOfOneDevice", &_args309, &_result311) + p.SetLastResponseMeta_(_meta310) + if _err != nil { + return + } + return _result311.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) TestInsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *common.TSStatus, _err error) { + var _args312 IClientRPCServiceTestInsertStringRecordsArgs + _args312.Req = req + var _result314 IClientRPCServiceTestInsertStringRecordsResult + var _meta313 thrift.ResponseMeta + _meta313, _err = p.Client_().Call(ctx, "testInsertStringRecords", &_args312, &_result314) + p.SetLastResponseMeta_(_meta313) + if _err != nil { + return + } + return _result314.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) DeleteData(ctx context.Context, req *TSDeleteDataReq) (_r *common.TSStatus, _err error) { + var _args315 IClientRPCServiceDeleteDataArgs + _args315.Req = req + var _result317 IClientRPCServiceDeleteDataResult + var _meta316 thrift.ResponseMeta + _meta316, _err = p.Client_().Call(ctx, "deleteData", &_args315, &_result317) + p.SetLastResponseMeta_(_meta316) + if _err != nil { + return + } + return _result317.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteRawDataQuery(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) { + var _args318 IClientRPCServiceExecuteRawDataQueryArgs + _args318.Req = req + var _result320 IClientRPCServiceExecuteRawDataQueryResult + var _meta319 thrift.ResponseMeta + _meta319, _err = p.Client_().Call(ctx, "executeRawDataQuery", &_args318, &_result320) + p.SetLastResponseMeta_(_meta319) + if _err != nil { + return + } + return _result320.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteLastDataQuery(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) { + var _args321 IClientRPCServiceExecuteLastDataQueryArgs + _args321.Req = req + var _result323 IClientRPCServiceExecuteLastDataQueryResult + var _meta322 thrift.ResponseMeta + _meta322, _err = p.Client_().Call(ctx, "executeLastDataQuery", &_args321, &_result323) + p.SetLastResponseMeta_(_meta322) + if _err != nil { + return + } + return _result323.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteAggregationQuery(ctx context.Context, req *TSAggregationQueryReq) (_r *TSExecuteStatementResp, _err error) { + var _args324 IClientRPCServiceExecuteAggregationQueryArgs + _args324.Req = req + var _result326 IClientRPCServiceExecuteAggregationQueryResult + var _meta325 thrift.ResponseMeta + _meta325, _err = p.Client_().Call(ctx, "executeAggregationQuery", &_args324, &_result326) + p.SetLastResponseMeta_(_meta325) + if _err != nil { + return + } + return _result326.GetSuccess(), nil +} + +// Parameters: +// - SessionId +func (p *IClientRPCServiceClient) RequestStatementId(ctx context.Context, sessionId int64) (_r int64, _err error) { + var _args327 IClientRPCServiceRequestStatementIdArgs + _args327.SessionId = sessionId + var _result329 IClientRPCServiceRequestStatementIdResult + var _meta328 thrift.ResponseMeta + _meta328, _err = p.Client_().Call(ctx, "requestStatementId", &_args327, &_result329) + p.SetLastResponseMeta_(_meta328) + if _err != nil { + return + } + return _result329.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) CreateSchemaTemplate(ctx context.Context, req *TSCreateSchemaTemplateReq) (_r *common.TSStatus, _err error) { + var _args330 IClientRPCServiceCreateSchemaTemplateArgs + _args330.Req = req + var _result332 IClientRPCServiceCreateSchemaTemplateResult + var _meta331 thrift.ResponseMeta + _meta331, _err = p.Client_().Call(ctx, "createSchemaTemplate", &_args330, &_result332) + p.SetLastResponseMeta_(_meta331) + if _err != nil { + return + } + return _result332.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) AppendSchemaTemplate(ctx context.Context, req *TSAppendSchemaTemplateReq) (_r *common.TSStatus, _err error) { + var _args333 IClientRPCServiceAppendSchemaTemplateArgs + _args333.Req = req + var _result335 IClientRPCServiceAppendSchemaTemplateResult + var _meta334 thrift.ResponseMeta + _meta334, _err = p.Client_().Call(ctx, "appendSchemaTemplate", &_args333, &_result335) + p.SetLastResponseMeta_(_meta334) + if _err != nil { + return + } + return _result335.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) PruneSchemaTemplate(ctx context.Context, req *TSPruneSchemaTemplateReq) (_r *common.TSStatus, _err error) { + var _args336 IClientRPCServicePruneSchemaTemplateArgs + _args336.Req = req + var _result338 IClientRPCServicePruneSchemaTemplateResult + var _meta337 thrift.ResponseMeta + _meta337, _err = p.Client_().Call(ctx, "pruneSchemaTemplate", &_args336, &_result338) + p.SetLastResponseMeta_(_meta337) + if _err != nil { + return + } + return _result338.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) QuerySchemaTemplate(ctx context.Context, req *TSQueryTemplateReq) (_r *TSQueryTemplateResp, _err error) { + var _args339 IClientRPCServiceQuerySchemaTemplateArgs + _args339.Req = req + var _result341 IClientRPCServiceQuerySchemaTemplateResult + var _meta340 thrift.ResponseMeta + _meta340, _err = p.Client_().Call(ctx, "querySchemaTemplate", &_args339, &_result341) + p.SetLastResponseMeta_(_meta340) + if _err != nil { + return + } + return _result341.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) SetSchemaTemplate(ctx context.Context, req *TSSetSchemaTemplateReq) (_r *common.TSStatus, _err error) { + var _args342 IClientRPCServiceSetSchemaTemplateArgs + _args342.Req = req + var _result344 IClientRPCServiceSetSchemaTemplateResult + var _meta343 thrift.ResponseMeta + _meta343, _err = p.Client_().Call(ctx, "setSchemaTemplate", &_args342, &_result344) + p.SetLastResponseMeta_(_meta343) + if _err != nil { + return + } + return _result344.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) UnsetSchemaTemplate(ctx context.Context, req *TSUnsetSchemaTemplateReq) (_r *common.TSStatus, _err error) { + var _args345 IClientRPCServiceUnsetSchemaTemplateArgs + _args345.Req = req + var _result347 IClientRPCServiceUnsetSchemaTemplateResult + var _meta346 thrift.ResponseMeta + _meta346, _err = p.Client_().Call(ctx, "unsetSchemaTemplate", &_args345, &_result347) + p.SetLastResponseMeta_(_meta346) + if _err != nil { + return + } + return _result347.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) DropSchemaTemplate(ctx context.Context, req *TSDropSchemaTemplateReq) (_r *common.TSStatus, _err error) { + var _args348 IClientRPCServiceDropSchemaTemplateArgs + _args348.Req = req + var _result350 IClientRPCServiceDropSchemaTemplateResult + var _meta349 thrift.ResponseMeta + _meta349, _err = p.Client_().Call(ctx, "dropSchemaTemplate", &_args348, &_result350) + p.SetLastResponseMeta_(_meta349) + if _err != nil { + return + } + return _result350.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) CreateTimeseriesUsingSchemaTemplate(ctx context.Context, req *TCreateTimeseriesUsingSchemaTemplateReq) (_r *common.TSStatus, _err error) { + var _args351 IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs + _args351.Req = req + var _result353 IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult + var _meta352 thrift.ResponseMeta + _meta352, _err = p.Client_().Call(ctx, "createTimeseriesUsingSchemaTemplate", &_args351, &_result353) + p.SetLastResponseMeta_(_meta352) + if _err != nil { + return + } + return _result353.GetSuccess(), nil +} + +// Parameters: +// - Info +func (p *IClientRPCServiceClient) Handshake(ctx context.Context, info *TSyncIdentityInfo) (_r *common.TSStatus, _err error) { + var _args354 IClientRPCServiceHandshakeArgs + _args354.Info = info + var _result356 IClientRPCServiceHandshakeResult + var _meta355 thrift.ResponseMeta + _meta355, _err = p.Client_().Call(ctx, "handshake", &_args354, &_result356) + p.SetLastResponseMeta_(_meta355) + if _err != nil { + return + } + return _result356.GetSuccess(), nil +} + +// Parameters: +// - Buff +func (p *IClientRPCServiceClient) SendPipeData(ctx context.Context, buff []byte) (_r *common.TSStatus, _err error) { + var _args357 IClientRPCServiceSendPipeDataArgs + _args357.Buff = buff + var _result359 IClientRPCServiceSendPipeDataResult + var _meta358 thrift.ResponseMeta + _meta358, _err = p.Client_().Call(ctx, "sendPipeData", &_args357, &_result359) + p.SetLastResponseMeta_(_meta358) + if _err != nil { + return + } + return _result359.GetSuccess(), nil +} + +// Parameters: +// - MetaInfo +// - Buff +func (p *IClientRPCServiceClient) SendFile(ctx context.Context, metaInfo *TSyncTransportMetaInfo, buff []byte) (_r *common.TSStatus, _err error) { + var _args360 IClientRPCServiceSendFileArgs + _args360.MetaInfo = metaInfo + _args360.Buff = buff + var _result362 IClientRPCServiceSendFileResult + var _meta361 thrift.ResponseMeta + _meta361, _err = p.Client_().Call(ctx, "sendFile", &_args360, &_result362) + p.SetLastResponseMeta_(_meta361) + if _err != nil { + return + } + return _result362.GetSuccess(), nil +} + +func (p *IClientRPCServiceClient) GetBackupConfiguration(ctx context.Context) (_r *TSBackupConfigurationResp, _err error) { + var _args363 IClientRPCServiceGetBackupConfigurationArgs + var _result365 IClientRPCServiceGetBackupConfigurationResult + var _meta364 thrift.ResponseMeta + _meta364, _err = p.Client_().Call(ctx, "getBackupConfiguration", &_args363, &_result365) + p.SetLastResponseMeta_(_meta364) + if _err != nil { + return + } + return _result365.GetSuccess(), nil +} + +func (p *IClientRPCServiceClient) FetchAllConnectionsInfo(ctx context.Context) (_r *TSConnectionInfoResp, _err error) { + var _args366 IClientRPCServiceFetchAllConnectionsInfoArgs + var _result368 IClientRPCServiceFetchAllConnectionsInfoResult + var _meta367 thrift.ResponseMeta + _meta367, _err = p.Client_().Call(ctx, "fetchAllConnectionsInfo", &_args366, &_result368) + p.SetLastResponseMeta_(_meta367) + if _err != nil { + return + } + return _result368.GetSuccess(), nil +} + +type IClientRPCServiceProcessor struct { + processorMap map[string]thrift.TProcessorFunction + handler IClientRPCService +} + +func (p *IClientRPCServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { + p.processorMap[key] = processor +} + +func (p *IClientRPCServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { + processor, ok = p.processorMap[key] + return processor, ok +} + +func (p *IClientRPCServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { + return p.processorMap +} + +func NewIClientRPCServiceProcessor(handler IClientRPCService) *IClientRPCServiceProcessor { + + self369 := &IClientRPCServiceProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} + self369.processorMap["executeQueryStatementV2"] = &iClientRPCServiceProcessorExecuteQueryStatementV2{handler:handler} + self369.processorMap["executeUpdateStatementV2"] = &iClientRPCServiceProcessorExecuteUpdateStatementV2{handler:handler} + self369.processorMap["executeStatementV2"] = &iClientRPCServiceProcessorExecuteStatementV2{handler:handler} + self369.processorMap["executeRawDataQueryV2"] = &iClientRPCServiceProcessorExecuteRawDataQueryV2{handler:handler} + self369.processorMap["executeLastDataQueryV2"] = &iClientRPCServiceProcessorExecuteLastDataQueryV2{handler:handler} + self369.processorMap["executeAggregationQueryV2"] = &iClientRPCServiceProcessorExecuteAggregationQueryV2{handler:handler} + self369.processorMap["fetchResultsV2"] = &iClientRPCServiceProcessorFetchResultsV2{handler:handler} + self369.processorMap["openSession"] = &iClientRPCServiceProcessorOpenSession{handler:handler} + self369.processorMap["closeSession"] = &iClientRPCServiceProcessorCloseSession{handler:handler} + self369.processorMap["executeStatement"] = &iClientRPCServiceProcessorExecuteStatement{handler:handler} + self369.processorMap["executeBatchStatement"] = &iClientRPCServiceProcessorExecuteBatchStatement{handler:handler} + self369.processorMap["executeQueryStatement"] = &iClientRPCServiceProcessorExecuteQueryStatement{handler:handler} + self369.processorMap["executeUpdateStatement"] = &iClientRPCServiceProcessorExecuteUpdateStatement{handler:handler} + self369.processorMap["fetchResults"] = &iClientRPCServiceProcessorFetchResults{handler:handler} + self369.processorMap["fetchMetadata"] = &iClientRPCServiceProcessorFetchMetadata{handler:handler} + self369.processorMap["cancelOperation"] = &iClientRPCServiceProcessorCancelOperation{handler:handler} + self369.processorMap["closeOperation"] = &iClientRPCServiceProcessorCloseOperation{handler:handler} + self369.processorMap["getTimeZone"] = &iClientRPCServiceProcessorGetTimeZone{handler:handler} + self369.processorMap["setTimeZone"] = &iClientRPCServiceProcessorSetTimeZone{handler:handler} + self369.processorMap["getProperties"] = &iClientRPCServiceProcessorGetProperties{handler:handler} + self369.processorMap["setStorageGroup"] = &iClientRPCServiceProcessorSetStorageGroup{handler:handler} + self369.processorMap["createTimeseries"] = &iClientRPCServiceProcessorCreateTimeseries{handler:handler} + self369.processorMap["createAlignedTimeseries"] = &iClientRPCServiceProcessorCreateAlignedTimeseries{handler:handler} + self369.processorMap["createMultiTimeseries"] = &iClientRPCServiceProcessorCreateMultiTimeseries{handler:handler} + self369.processorMap["deleteTimeseries"] = &iClientRPCServiceProcessorDeleteTimeseries{handler:handler} + self369.processorMap["deleteStorageGroups"] = &iClientRPCServiceProcessorDeleteStorageGroups{handler:handler} + self369.processorMap["insertRecord"] = &iClientRPCServiceProcessorInsertRecord{handler:handler} + self369.processorMap["insertStringRecord"] = &iClientRPCServiceProcessorInsertStringRecord{handler:handler} + self369.processorMap["insertTablet"] = &iClientRPCServiceProcessorInsertTablet{handler:handler} + self369.processorMap["insertTablets"] = &iClientRPCServiceProcessorInsertTablets{handler:handler} + self369.processorMap["insertRecords"] = &iClientRPCServiceProcessorInsertRecords{handler:handler} + self369.processorMap["fastInsertRecords"] = &iClientRPCServiceProcessorFastInsertRecords{handler:handler} + self369.processorMap["insertRecordsOfOneDevice"] = &iClientRPCServiceProcessorInsertRecordsOfOneDevice{handler:handler} + self369.processorMap["insertStringRecordsOfOneDevice"] = &iClientRPCServiceProcessorInsertStringRecordsOfOneDevice{handler:handler} + self369.processorMap["insertStringRecords"] = &iClientRPCServiceProcessorInsertStringRecords{handler:handler} + self369.processorMap["testInsertTablet"] = &iClientRPCServiceProcessorTestInsertTablet{handler:handler} + self369.processorMap["testInsertTablets"] = &iClientRPCServiceProcessorTestInsertTablets{handler:handler} + self369.processorMap["testInsertRecord"] = &iClientRPCServiceProcessorTestInsertRecord{handler:handler} + self369.processorMap["testInsertStringRecord"] = &iClientRPCServiceProcessorTestInsertStringRecord{handler:handler} + self369.processorMap["testInsertRecords"] = &iClientRPCServiceProcessorTestInsertRecords{handler:handler} + self369.processorMap["testInsertRecordsOfOneDevice"] = &iClientRPCServiceProcessorTestInsertRecordsOfOneDevice{handler:handler} + self369.processorMap["testInsertStringRecords"] = &iClientRPCServiceProcessorTestInsertStringRecords{handler:handler} + self369.processorMap["deleteData"] = &iClientRPCServiceProcessorDeleteData{handler:handler} + self369.processorMap["executeRawDataQuery"] = &iClientRPCServiceProcessorExecuteRawDataQuery{handler:handler} + self369.processorMap["executeLastDataQuery"] = &iClientRPCServiceProcessorExecuteLastDataQuery{handler:handler} + self369.processorMap["executeAggregationQuery"] = &iClientRPCServiceProcessorExecuteAggregationQuery{handler:handler} + self369.processorMap["requestStatementId"] = &iClientRPCServiceProcessorRequestStatementId{handler:handler} + self369.processorMap["createSchemaTemplate"] = &iClientRPCServiceProcessorCreateSchemaTemplate{handler:handler} + self369.processorMap["appendSchemaTemplate"] = &iClientRPCServiceProcessorAppendSchemaTemplate{handler:handler} + self369.processorMap["pruneSchemaTemplate"] = &iClientRPCServiceProcessorPruneSchemaTemplate{handler:handler} + self369.processorMap["querySchemaTemplate"] = &iClientRPCServiceProcessorQuerySchemaTemplate{handler:handler} + self369.processorMap["setSchemaTemplate"] = &iClientRPCServiceProcessorSetSchemaTemplate{handler:handler} + self369.processorMap["unsetSchemaTemplate"] = &iClientRPCServiceProcessorUnsetSchemaTemplate{handler:handler} + self369.processorMap["dropSchemaTemplate"] = &iClientRPCServiceProcessorDropSchemaTemplate{handler:handler} + self369.processorMap["createTimeseriesUsingSchemaTemplate"] = &iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate{handler:handler} + self369.processorMap["handshake"] = &iClientRPCServiceProcessorHandshake{handler:handler} + self369.processorMap["sendPipeData"] = &iClientRPCServiceProcessorSendPipeData{handler:handler} + self369.processorMap["sendFile"] = &iClientRPCServiceProcessorSendFile{handler:handler} + self369.processorMap["getBackupConfiguration"] = &iClientRPCServiceProcessorGetBackupConfiguration{handler:handler} + self369.processorMap["fetchAllConnectionsInfo"] = &iClientRPCServiceProcessorFetchAllConnectionsInfo{handler:handler} +return self369 +} + +func (p *IClientRPCServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) + if err2 != nil { return false, thrift.WrapTException(err2) } + if processor, ok := p.GetProcessorFunction(name); ok { + return processor.Process(ctx, seqId, iprot, oprot) + } + iprot.Skip(ctx, thrift.STRUCT) + iprot.ReadMessageEnd(ctx) + x370 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) + oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) + x370.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, x370 + +} + +type iClientRPCServiceProcessorExecuteQueryStatementV2 struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteQueryStatementV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteQueryStatementV2Args{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeQueryStatementV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteQueryStatementV2Result{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteQueryStatementV2(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeQueryStatementV2: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeQueryStatementV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeQueryStatementV2", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorExecuteUpdateStatementV2 struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteUpdateStatementV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteUpdateStatementV2Args{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeUpdateStatementV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteUpdateStatementV2Result{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteUpdateStatementV2(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeUpdateStatementV2: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeUpdateStatementV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeUpdateStatementV2", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorExecuteStatementV2 struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteStatementV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteStatementV2Args{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeStatementV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteStatementV2Result{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteStatementV2(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeStatementV2: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeStatementV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeStatementV2", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorExecuteRawDataQueryV2 struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteRawDataQueryV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteRawDataQueryV2Args{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeRawDataQueryV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteRawDataQueryV2Result{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteRawDataQueryV2(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeRawDataQueryV2: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeRawDataQueryV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeRawDataQueryV2", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorExecuteLastDataQueryV2 struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteLastDataQueryV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteLastDataQueryV2Args{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeLastDataQueryV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteLastDataQueryV2Result{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteLastDataQueryV2(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeLastDataQueryV2: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeLastDataQueryV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeLastDataQueryV2", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorExecuteAggregationQueryV2 struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteAggregationQueryV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteAggregationQueryV2Args{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeAggregationQueryV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteAggregationQueryV2Result{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteAggregationQueryV2(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeAggregationQueryV2: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeAggregationQueryV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeAggregationQueryV2", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorFetchResultsV2 struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorFetchResultsV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceFetchResultsV2Args{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "fetchResultsV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceFetchResultsV2Result{} + var retval *TSFetchResultsResp + if retval, err2 = p.handler.FetchResultsV2(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchResultsV2: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "fetchResultsV2", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "fetchResultsV2", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorOpenSession struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorOpenSession) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceOpenSessionArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "openSession", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceOpenSessionResult{} + var retval *TSOpenSessionResp + if retval, err2 = p.handler.OpenSession(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing openSession: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "openSession", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "openSession", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorCloseSession struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorCloseSession) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceCloseSessionArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "closeSession", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceCloseSessionResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.CloseSession(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing closeSession: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "closeSession", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "closeSession", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorExecuteStatement struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteStatementArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeStatement", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteStatementResult{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteStatement(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeStatement: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeStatement", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeStatement", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorExecuteBatchStatement struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteBatchStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteBatchStatementArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeBatchStatement", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteBatchStatementResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.ExecuteBatchStatement(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeBatchStatement: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeBatchStatement", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeBatchStatement", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorExecuteQueryStatement struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteQueryStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteQueryStatementArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeQueryStatement", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteQueryStatementResult{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteQueryStatement(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeQueryStatement: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeQueryStatement", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeQueryStatement", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorExecuteUpdateStatement struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteUpdateStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteUpdateStatementArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "executeUpdateStatement", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceExecuteUpdateStatementResult{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteUpdateStatement(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeUpdateStatement: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeUpdateStatement", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "executeUpdateStatement", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorFetchResults struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorFetchResults) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceFetchResultsArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "fetchResults", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceFetchResultsResult{} + var retval *TSFetchResultsResp + if retval, err2 = p.handler.FetchResults(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchResults: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "fetchResults", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "fetchResults", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorFetchMetadata struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorFetchMetadata) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceFetchMetadataArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "fetchMetadata", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceFetchMetadataResult{} + var retval *TSFetchMetadataResp + if retval, err2 = p.handler.FetchMetadata(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchMetadata: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "fetchMetadata", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "fetchMetadata", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorCancelOperation struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorCancelOperation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceCancelOperationArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "cancelOperation", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceCancelOperationResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.CancelOperation(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing cancelOperation: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "cancelOperation", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "cancelOperation", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorCloseOperation struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorCloseOperation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceCloseOperationArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "closeOperation", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceCloseOperationResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.CloseOperation(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing closeOperation: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "closeOperation", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "closeOperation", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorGetTimeZone struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorGetTimeZone) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceGetTimeZoneArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTimeZone", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceGetTimeZoneResult{} + var retval *TSGetTimeZoneResp + if retval, err2 = p.handler.GetTimeZone(ctx, args.SessionId); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTimeZone: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "getTimeZone", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getTimeZone", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorSetTimeZone struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorSetTimeZone) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceSetTimeZoneArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "setTimeZone", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceSetTimeZoneResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.SetTimeZone(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setTimeZone: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "setTimeZone", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "setTimeZone", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorGetProperties struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorGetProperties) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceGetPropertiesArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getProperties", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceGetPropertiesResult{} + var retval *ServerProperties + if retval, err2 = p.handler.GetProperties(ctx); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getProperties: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "getProperties", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "getProperties", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorSetStorageGroup struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorSetStorageGroup) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceSetStorageGroupArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "setStorageGroup", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceSetStorageGroupResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.SetStorageGroup(ctx, args.SessionId, args.StorageGroup); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setStorageGroup: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "setStorageGroup", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "setStorageGroup", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorCreateTimeseries struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorCreateTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceCreateTimeseriesArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "createTimeseries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceCreateTimeseriesResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.CreateTimeseries(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTimeseries: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "createTimeseries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "createTimeseries", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorCreateAlignedTimeseries struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorCreateAlignedTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceCreateAlignedTimeseriesArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "createAlignedTimeseries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceCreateAlignedTimeseriesResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.CreateAlignedTimeseries(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createAlignedTimeseries: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "createAlignedTimeseries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "createAlignedTimeseries", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorCreateMultiTimeseries struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorCreateMultiTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceCreateMultiTimeseriesArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "createMultiTimeseries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceCreateMultiTimeseriesResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.CreateMultiTimeseries(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createMultiTimeseries: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "createMultiTimeseries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "createMultiTimeseries", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorDeleteTimeseries struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorDeleteTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceDeleteTimeseriesArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteTimeseries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceDeleteTimeseriesResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.DeleteTimeseries(ctx, args.SessionId, args.Path); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTimeseries: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteTimeseries", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "deleteTimeseries", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + +type iClientRPCServiceProcessorDeleteStorageGroups struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorDeleteStorageGroups) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceDeleteStorageGroupsArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteStorageGroups", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceDeleteStorageGroupsResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.DeleteStorageGroups(ctx, args.SessionId, args.StorageGroup); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteStorageGroups: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteStorageGroups", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "deleteStorageGroups", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { return } - return _result174.GetSuccess(), nil + return true, err } -// Parameters: -// - Req -func (p *TSIServiceClient) ExecuteQueryStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { - var _args175 TSIServiceExecuteQueryStatementArgs - _args175.Req = req - var _result177 TSIServiceExecuteQueryStatementResult - var _meta176 thrift.ResponseMeta - _meta176, _err = p.Client_().Call(ctx, "executeQueryStatement", &_args175, &_result177) - p.SetLastResponseMeta_(_meta176) - if _err != nil { - return - } - return _result177.GetSuccess(), nil +type iClientRPCServiceProcessorInsertRecord struct { + handler IClientRPCService } -// Parameters: -// - Req -func (p *TSIServiceClient) ExecuteUpdateStatement(ctx context.Context, req *TSExecuteStatementReq) (_r *TSExecuteStatementResp, _err error) { - var _args178 TSIServiceExecuteUpdateStatementArgs - _args178.Req = req - var _result180 TSIServiceExecuteUpdateStatementResult - var _meta179 thrift.ResponseMeta - _meta179, _err = p.Client_().Call(ctx, "executeUpdateStatement", &_args178, &_result180) - p.SetLastResponseMeta_(_meta179) - if _err != nil { - return +func (p *iClientRPCServiceProcessorInsertRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceInsertRecordArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "insertRecord", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) } - return _result180.GetSuccess(), nil -} + iprot.ReadMessageEnd(ctx) -// Parameters: -// - Req -func (p *TSIServiceClient) FetchResults(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) { - var _args181 TSIServiceFetchResultsArgs - _args181.Req = req - var _result183 TSIServiceFetchResultsResult - var _meta182 thrift.ResponseMeta - _meta182, _err = p.Client_().Call(ctx, "fetchResults", &_args181, &_result183) - p.SetLastResponseMeta_(_meta182) - if _err != nil { - return + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - return _result183.GetSuccess(), nil -} -// Parameters: -// - Req -func (p *TSIServiceClient) FetchMetadata(ctx context.Context, req *TSFetchMetadataReq) (_r *TSFetchMetadataResp, _err error) { - var _args184 TSIServiceFetchMetadataArgs - _args184.Req = req - var _result186 TSIServiceFetchMetadataResult - var _meta185 thrift.ResponseMeta - _meta185, _err = p.Client_().Call(ctx, "fetchMetadata", &_args184, &_result186) - p.SetLastResponseMeta_(_meta185) - if _err != nil { - return + result := IClientRPCServiceInsertRecordResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.InsertRecord(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertRecord: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertRecord", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval } - return _result186.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) CancelOperation(ctx context.Context, req *TSCancelOperationReq) (_r *TSStatus, _err error) { - var _args187 TSIServiceCancelOperationArgs - _args187.Req = req - var _result189 TSIServiceCancelOperationResult - var _meta188 thrift.ResponseMeta - _meta188, _err = p.Client_().Call(ctx, "cancelOperation", &_args187, &_result189) - p.SetLastResponseMeta_(_meta188) - if _err != nil { - return + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "insertRecord", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - return _result189.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) CloseOperation(ctx context.Context, req *TSCloseOperationReq) (_r *TSStatus, _err error) { - var _args190 TSIServiceCloseOperationArgs - _args190.Req = req - var _result192 TSIServiceCloseOperationResult - var _meta191 thrift.ResponseMeta - _meta191, _err = p.Client_().Call(ctx, "closeOperation", &_args190, &_result192) - p.SetLastResponseMeta_(_meta191) - if _err != nil { - return + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result192.GetSuccess(), nil -} - -// Parameters: -// - SessionId -func (p *TSIServiceClient) GetTimeZone(ctx context.Context, sessionId int64) (_r *TSGetTimeZoneResp, _err error) { - var _args193 TSIServiceGetTimeZoneArgs - _args193.SessionId = sessionId - var _result195 TSIServiceGetTimeZoneResult - var _meta194 thrift.ResponseMeta - _meta194, _err = p.Client_().Call(ctx, "getTimeZone", &_args193, &_result195) - p.SetLastResponseMeta_(_meta194) - if _err != nil { - return + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result195.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) SetTimeZone(ctx context.Context, req *TSSetTimeZoneReq) (_r *TSStatus, _err error) { - var _args196 TSIServiceSetTimeZoneArgs - _args196.Req = req - var _result198 TSIServiceSetTimeZoneResult - var _meta197 thrift.ResponseMeta - _meta197, _err = p.Client_().Call(ctx, "setTimeZone", &_args196, &_result198) - p.SetLastResponseMeta_(_meta197) - if _err != nil { - return + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result198.GetSuccess(), nil -} - -func (p *TSIServiceClient) GetProperties(ctx context.Context) (_r *ServerProperties, _err error) { - var _args199 TSIServiceGetPropertiesArgs - var _result201 TSIServiceGetPropertiesResult - var _meta200 thrift.ResponseMeta - _meta200, _err = p.Client_().Call(ctx, "getProperties", &_args199, &_result201) - p.SetLastResponseMeta_(_meta200) - if _err != nil { + if err != nil { return } - return _result201.GetSuccess(), nil + return true, err } -// Parameters: -// - SessionId -// - StorageGroup -func (p *TSIServiceClient) SetStorageGroup(ctx context.Context, sessionId int64, storageGroup string) (_r *TSStatus, _err error) { - var _args202 TSIServiceSetStorageGroupArgs - _args202.SessionId = sessionId - _args202.StorageGroup = storageGroup - var _result204 TSIServiceSetStorageGroupResult - var _meta203 thrift.ResponseMeta - _meta203, _err = p.Client_().Call(ctx, "setStorageGroup", &_args202, &_result204) - p.SetLastResponseMeta_(_meta203) - if _err != nil { - return - } - return _result204.GetSuccess(), nil +type iClientRPCServiceProcessorInsertStringRecord struct { + handler IClientRPCService } -// Parameters: -// - Req -func (p *TSIServiceClient) CreateTimeseries(ctx context.Context, req *TSCreateTimeseriesReq) (_r *TSStatus, _err error) { - var _args205 TSIServiceCreateTimeseriesArgs - _args205.Req = req - var _result207 TSIServiceCreateTimeseriesResult - var _meta206 thrift.ResponseMeta - _meta206, _err = p.Client_().Call(ctx, "createTimeseries", &_args205, &_result207) - p.SetLastResponseMeta_(_meta206) - if _err != nil { - return +func (p *iClientRPCServiceProcessorInsertStringRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceInsertStringRecordArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "insertStringRecord", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) } - return _result207.GetSuccess(), nil -} + iprot.ReadMessageEnd(ctx) -// Parameters: -// - Req -func (p *TSIServiceClient) CreateAlignedTimeseries(ctx context.Context, req *TSCreateAlignedTimeseriesReq) (_r *TSStatus, _err error) { - var _args208 TSIServiceCreateAlignedTimeseriesArgs - _args208.Req = req - var _result210 TSIServiceCreateAlignedTimeseriesResult - var _meta209 thrift.ResponseMeta - _meta209, _err = p.Client_().Call(ctx, "createAlignedTimeseries", &_args208, &_result210) - p.SetLastResponseMeta_(_meta209) - if _err != nil { - return + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - return _result210.GetSuccess(), nil -} -// Parameters: -// - Req -func (p *TSIServiceClient) CreateMultiTimeseries(ctx context.Context, req *TSCreateMultiTimeseriesReq) (_r *TSStatus, _err error) { - var _args211 TSIServiceCreateMultiTimeseriesArgs - _args211.Req = req - var _result213 TSIServiceCreateMultiTimeseriesResult - var _meta212 thrift.ResponseMeta - _meta212, _err = p.Client_().Call(ctx, "createMultiTimeseries", &_args211, &_result213) - p.SetLastResponseMeta_(_meta212) - if _err != nil { - return + result := IClientRPCServiceInsertStringRecordResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.InsertStringRecord(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertStringRecord: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertStringRecord", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval } - return _result213.GetSuccess(), nil -} - -// Parameters: -// - SessionId -// - Path -func (p *TSIServiceClient) DeleteTimeseries(ctx context.Context, sessionId int64, path []string) (_r *TSStatus, _err error) { - var _args214 TSIServiceDeleteTimeseriesArgs - _args214.SessionId = sessionId - _args214.Path = path - var _result216 TSIServiceDeleteTimeseriesResult - var _meta215 thrift.ResponseMeta - _meta215, _err = p.Client_().Call(ctx, "deleteTimeseries", &_args214, &_result216) - p.SetLastResponseMeta_(_meta215) - if _err != nil { - return + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "insertStringRecord", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - return _result216.GetSuccess(), nil -} - -// Parameters: -// - SessionId -// - StorageGroup -func (p *TSIServiceClient) DeleteStorageGroups(ctx context.Context, sessionId int64, storageGroup []string) (_r *TSStatus, _err error) { - var _args217 TSIServiceDeleteStorageGroupsArgs - _args217.SessionId = sessionId - _args217.StorageGroup = storageGroup - var _result219 TSIServiceDeleteStorageGroupsResult - var _meta218 thrift.ResponseMeta - _meta218, _err = p.Client_().Call(ctx, "deleteStorageGroups", &_args217, &_result219) - p.SetLastResponseMeta_(_meta218) - if _err != nil { - return + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result219.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) InsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *TSStatus, _err error) { - var _args220 TSIServiceInsertRecordArgs - _args220.Req = req - var _result222 TSIServiceInsertRecordResult - var _meta221 thrift.ResponseMeta - _meta221, _err = p.Client_().Call(ctx, "insertRecord", &_args220, &_result222) - p.SetLastResponseMeta_(_meta221) - if _err != nil { - return + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result222.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) InsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *TSStatus, _err error) { - var _args223 TSIServiceInsertStringRecordArgs - _args223.Req = req - var _result225 TSIServiceInsertStringRecordResult - var _meta224 thrift.ResponseMeta - _meta224, _err = p.Client_().Call(ctx, "insertStringRecord", &_args223, &_result225) - p.SetLastResponseMeta_(_meta224) - if _err != nil { + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { return } - return _result225.GetSuccess(), nil + return true, err } -// Parameters: -// - Req -func (p *TSIServiceClient) InsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *TSStatus, _err error) { - var _args226 TSIServiceInsertTabletArgs - _args226.Req = req - var _result228 TSIServiceInsertTabletResult - var _meta227 thrift.ResponseMeta - _meta227, _err = p.Client_().Call(ctx, "insertTablet", &_args226, &_result228) - p.SetLastResponseMeta_(_meta227) - if _err != nil { - return - } - return _result228.GetSuccess(), nil +type iClientRPCServiceProcessorInsertTablet struct { + handler IClientRPCService } -// Parameters: -// - Req -func (p *TSIServiceClient) InsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *TSStatus, _err error) { - var _args229 TSIServiceInsertTabletsArgs - _args229.Req = req - var _result231 TSIServiceInsertTabletsResult - var _meta230 thrift.ResponseMeta - _meta230, _err = p.Client_().Call(ctx, "insertTablets", &_args229, &_result231) - p.SetLastResponseMeta_(_meta230) - if _err != nil { - return +func (p *iClientRPCServiceProcessorInsertTablet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceInsertTabletArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "insertTablet", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) } - return _result231.GetSuccess(), nil -} + iprot.ReadMessageEnd(ctx) -// Parameters: -// - Req -func (p *TSIServiceClient) InsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *TSStatus, _err error) { - var _args232 TSIServiceInsertRecordsArgs - _args232.Req = req - var _result234 TSIServiceInsertRecordsResult - var _meta233 thrift.ResponseMeta - _meta233, _err = p.Client_().Call(ctx, "insertRecords", &_args232, &_result234) - p.SetLastResponseMeta_(_meta233) - if _err != nil { - return + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - return _result234.GetSuccess(), nil -} -// Parameters: -// - Req -func (p *TSIServiceClient) InsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *TSStatus, _err error) { - var _args235 TSIServiceInsertRecordsOfOneDeviceArgs - _args235.Req = req - var _result237 TSIServiceInsertRecordsOfOneDeviceResult - var _meta236 thrift.ResponseMeta - _meta236, _err = p.Client_().Call(ctx, "insertRecordsOfOneDevice", &_args235, &_result237) - p.SetLastResponseMeta_(_meta236) - if _err != nil { - return + result := IClientRPCServiceInsertTabletResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.InsertTablet(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertTablet: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertTablet", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval } - return _result237.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) InsertStringRecordsOfOneDevice(ctx context.Context, req *TSInsertStringRecordsOfOneDeviceReq) (_r *TSStatus, _err error) { - var _args238 TSIServiceInsertStringRecordsOfOneDeviceArgs - _args238.Req = req - var _result240 TSIServiceInsertStringRecordsOfOneDeviceResult - var _meta239 thrift.ResponseMeta - _meta239, _err = p.Client_().Call(ctx, "insertStringRecordsOfOneDevice", &_args238, &_result240) - p.SetLastResponseMeta_(_meta239) - if _err != nil { - return + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "insertTablet", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - return _result240.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) InsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *TSStatus, _err error) { - var _args241 TSIServiceInsertStringRecordsArgs - _args241.Req = req - var _result243 TSIServiceInsertStringRecordsResult - var _meta242 thrift.ResponseMeta - _meta242, _err = p.Client_().Call(ctx, "insertStringRecords", &_args241, &_result243) - p.SetLastResponseMeta_(_meta242) - if _err != nil { - return + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result243.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) TestInsertTablet(ctx context.Context, req *TSInsertTabletReq) (_r *TSStatus, _err error) { - var _args244 TSIServiceTestInsertTabletArgs - _args244.Req = req - var _result246 TSIServiceTestInsertTabletResult - var _meta245 thrift.ResponseMeta - _meta245, _err = p.Client_().Call(ctx, "testInsertTablet", &_args244, &_result246) - p.SetLastResponseMeta_(_meta245) - if _err != nil { - return + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result246.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) TestInsertTablets(ctx context.Context, req *TSInsertTabletsReq) (_r *TSStatus, _err error) { - var _args247 TSIServiceTestInsertTabletsArgs - _args247.Req = req - var _result249 TSIServiceTestInsertTabletsResult - var _meta248 thrift.ResponseMeta - _meta248, _err = p.Client_().Call(ctx, "testInsertTablets", &_args247, &_result249) - p.SetLastResponseMeta_(_meta248) - if _err != nil { - return + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result249.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) TestInsertRecord(ctx context.Context, req *TSInsertRecordReq) (_r *TSStatus, _err error) { - var _args250 TSIServiceTestInsertRecordArgs - _args250.Req = req - var _result252 TSIServiceTestInsertRecordResult - var _meta251 thrift.ResponseMeta - _meta251, _err = p.Client_().Call(ctx, "testInsertRecord", &_args250, &_result252) - p.SetLastResponseMeta_(_meta251) - if _err != nil { + if err != nil { return } - return _result252.GetSuccess(), nil + return true, err } -// Parameters: -// - Req -func (p *TSIServiceClient) TestInsertStringRecord(ctx context.Context, req *TSInsertStringRecordReq) (_r *TSStatus, _err error) { - var _args253 TSIServiceTestInsertStringRecordArgs - _args253.Req = req - var _result255 TSIServiceTestInsertStringRecordResult - var _meta254 thrift.ResponseMeta - _meta254, _err = p.Client_().Call(ctx, "testInsertStringRecord", &_args253, &_result255) - p.SetLastResponseMeta_(_meta254) - if _err != nil { - return - } - return _result255.GetSuccess(), nil +type iClientRPCServiceProcessorInsertTablets struct { + handler IClientRPCService } -// Parameters: -// - Req -func (p *TSIServiceClient) TestInsertRecords(ctx context.Context, req *TSInsertRecordsReq) (_r *TSStatus, _err error) { - var _args256 TSIServiceTestInsertRecordsArgs - _args256.Req = req - var _result258 TSIServiceTestInsertRecordsResult - var _meta257 thrift.ResponseMeta - _meta257, _err = p.Client_().Call(ctx, "testInsertRecords", &_args256, &_result258) - p.SetLastResponseMeta_(_meta257) - if _err != nil { - return +func (p *iClientRPCServiceProcessorInsertTablets) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceInsertTabletsArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "insertTablets", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) } - return _result258.GetSuccess(), nil -} + iprot.ReadMessageEnd(ctx) -// Parameters: -// - Req -func (p *TSIServiceClient) TestInsertRecordsOfOneDevice(ctx context.Context, req *TSInsertRecordsOfOneDeviceReq) (_r *TSStatus, _err error) { - var _args259 TSIServiceTestInsertRecordsOfOneDeviceArgs - _args259.Req = req - var _result261 TSIServiceTestInsertRecordsOfOneDeviceResult - var _meta260 thrift.ResponseMeta - _meta260, _err = p.Client_().Call(ctx, "testInsertRecordsOfOneDevice", &_args259, &_result261) - p.SetLastResponseMeta_(_meta260) - if _err != nil { - return + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - return _result261.GetSuccess(), nil -} -// Parameters: -// - Req -func (p *TSIServiceClient) TestInsertStringRecords(ctx context.Context, req *TSInsertStringRecordsReq) (_r *TSStatus, _err error) { - var _args262 TSIServiceTestInsertStringRecordsArgs - _args262.Req = req - var _result264 TSIServiceTestInsertStringRecordsResult - var _meta263 thrift.ResponseMeta - _meta263, _err = p.Client_().Call(ctx, "testInsertStringRecords", &_args262, &_result264) - p.SetLastResponseMeta_(_meta263) - if _err != nil { - return + result := IClientRPCServiceInsertTabletsResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.InsertTablets(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertTablets: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertTablets", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval } - return _result264.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) DeleteData(ctx context.Context, req *TSDeleteDataReq) (_r *TSStatus, _err error) { - var _args265 TSIServiceDeleteDataArgs - _args265.Req = req - var _result267 TSIServiceDeleteDataResult - var _meta266 thrift.ResponseMeta - _meta266, _err = p.Client_().Call(ctx, "deleteData", &_args265, &_result267) - p.SetLastResponseMeta_(_meta266) - if _err != nil { - return + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "insertTablets", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - return _result267.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) ExecuteRawDataQuery(ctx context.Context, req *TSRawDataQueryReq) (_r *TSExecuteStatementResp, _err error) { - var _args268 TSIServiceExecuteRawDataQueryArgs - _args268.Req = req - var _result270 TSIServiceExecuteRawDataQueryResult - var _meta269 thrift.ResponseMeta - _meta269, _err = p.Client_().Call(ctx, "executeRawDataQuery", &_args268, &_result270) - p.SetLastResponseMeta_(_meta269) - if _err != nil { - return + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result270.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) ExecuteLastDataQuery(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) { - var _args271 TSIServiceExecuteLastDataQueryArgs - _args271.Req = req - var _result273 TSIServiceExecuteLastDataQueryResult - var _meta272 thrift.ResponseMeta - _meta272, _err = p.Client_().Call(ctx, "executeLastDataQuery", &_args271, &_result273) - p.SetLastResponseMeta_(_meta272) - if _err != nil { - return + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result273.GetSuccess(), nil -} - -// Parameters: -// - SessionId -func (p *TSIServiceClient) RequestStatementId(ctx context.Context, sessionId int64) (_r int64, _err error) { - var _args274 TSIServiceRequestStatementIdArgs - _args274.SessionId = sessionId - var _result276 TSIServiceRequestStatementIdResult - var _meta275 thrift.ResponseMeta - _meta275, _err = p.Client_().Call(ctx, "requestStatementId", &_args274, &_result276) - p.SetLastResponseMeta_(_meta275) - if _err != nil { - return + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result276.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) CreateSchemaTemplate(ctx context.Context, req *TSCreateSchemaTemplateReq) (_r *TSStatus, _err error) { - var _args277 TSIServiceCreateSchemaTemplateArgs - _args277.Req = req - var _result279 TSIServiceCreateSchemaTemplateResult - var _meta278 thrift.ResponseMeta - _meta278, _err = p.Client_().Call(ctx, "createSchemaTemplate", &_args277, &_result279) - p.SetLastResponseMeta_(_meta278) - if _err != nil { + if err != nil { return } - return _result279.GetSuccess(), nil + return true, err } -// Parameters: -// - Req -func (p *TSIServiceClient) AppendSchemaTemplate(ctx context.Context, req *TSAppendSchemaTemplateReq) (_r *TSStatus, _err error) { - var _args280 TSIServiceAppendSchemaTemplateArgs - _args280.Req = req - var _result282 TSIServiceAppendSchemaTemplateResult - var _meta281 thrift.ResponseMeta - _meta281, _err = p.Client_().Call(ctx, "appendSchemaTemplate", &_args280, &_result282) - p.SetLastResponseMeta_(_meta281) - if _err != nil { - return - } - return _result282.GetSuccess(), nil +type iClientRPCServiceProcessorInsertRecords struct { + handler IClientRPCService } -// Parameters: -// - Req -func (p *TSIServiceClient) PruneSchemaTemplate(ctx context.Context, req *TSPruneSchemaTemplateReq) (_r *TSStatus, _err error) { - var _args283 TSIServicePruneSchemaTemplateArgs - _args283.Req = req - var _result285 TSIServicePruneSchemaTemplateResult - var _meta284 thrift.ResponseMeta - _meta284, _err = p.Client_().Call(ctx, "pruneSchemaTemplate", &_args283, &_result285) - p.SetLastResponseMeta_(_meta284) - if _err != nil { - return +func (p *iClientRPCServiceProcessorInsertRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceInsertRecordsArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "insertRecords", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) } - return _result285.GetSuccess(), nil -} + iprot.ReadMessageEnd(ctx) -// Parameters: -// - Req -func (p *TSIServiceClient) QuerySchemaTemplate(ctx context.Context, req *TSQueryTemplateReq) (_r *TSQueryTemplateResp, _err error) { - var _args286 TSIServiceQuerySchemaTemplateArgs - _args286.Req = req - var _result288 TSIServiceQuerySchemaTemplateResult - var _meta287 thrift.ResponseMeta - _meta287, _err = p.Client_().Call(ctx, "querySchemaTemplate", &_args286, &_result288) - p.SetLastResponseMeta_(_meta287) - if _err != nil { - return + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) } - return _result288.GetSuccess(), nil -} -// Parameters: -// - Req -func (p *TSIServiceClient) SetSchemaTemplate(ctx context.Context, req *TSSetSchemaTemplateReq) (_r *TSStatus, _err error) { - var _args289 TSIServiceSetSchemaTemplateArgs - _args289.Req = req - var _result291 TSIServiceSetSchemaTemplateResult - var _meta290 thrift.ResponseMeta - _meta290, _err = p.Client_().Call(ctx, "setSchemaTemplate", &_args289, &_result291) - p.SetLastResponseMeta_(_meta290) - if _err != nil { - return + result := IClientRPCServiceInsertRecordsResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.InsertRecords(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertRecords: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertRecords", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval } - return _result291.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) UnsetSchemaTemplate(ctx context.Context, req *TSUnsetSchemaTemplateReq) (_r *TSStatus, _err error) { - var _args292 TSIServiceUnsetSchemaTemplateArgs - _args292.Req = req - var _result294 TSIServiceUnsetSchemaTemplateResult - var _meta293 thrift.ResponseMeta - _meta293, _err = p.Client_().Call(ctx, "unsetSchemaTemplate", &_args292, &_result294) - p.SetLastResponseMeta_(_meta293) - if _err != nil { - return + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "insertRecords", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) } - return _result294.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) SetUsingTemplate(ctx context.Context, req *TSSetUsingTemplateReq) (_r *TSStatus, _err error) { - var _args295 TSIServiceSetUsingTemplateArgs - _args295.Req = req - var _result297 TSIServiceSetUsingTemplateResult - var _meta296 thrift.ResponseMeta - _meta296, _err = p.Client_().Call(ctx, "setUsingTemplate", &_args295, &_result297) - p.SetLastResponseMeta_(_meta296) - if _err != nil { - return + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result297.GetSuccess(), nil -} - -// Parameters: -// - SessionId -// - TemplateName -// - PrefixPath -func (p *TSIServiceClient) UnsetUsingTemplate(ctx context.Context, sessionId int64, templateName string, prefixPath string) (_r *TSStatus, _err error) { - var _args298 TSIServiceUnsetUsingTemplateArgs - _args298.SessionId = sessionId - _args298.TemplateName = templateName - _args298.PrefixPath = prefixPath - var _result300 TSIServiceUnsetUsingTemplateResult - var _meta299 thrift.ResponseMeta - _meta299, _err = p.Client_().Call(ctx, "unsetUsingTemplate", &_args298, &_result300) - p.SetLastResponseMeta_(_meta299) - if _err != nil { - return + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result300.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) DropSchemaTemplate(ctx context.Context, req *TSDropSchemaTemplateReq) (_r *TSStatus, _err error) { - var _args301 TSIServiceDropSchemaTemplateArgs - _args301.Req = req - var _result303 TSIServiceDropSchemaTemplateResult - var _meta302 thrift.ResponseMeta - _meta302, _err = p.Client_().Call(ctx, "dropSchemaTemplate", &_args301, &_result303) - p.SetLastResponseMeta_(_meta302) - if _err != nil { - return + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) } - return _result303.GetSuccess(), nil -} - -// Parameters: -// - Req -func (p *TSIServiceClient) ExecuteOperationSync(ctx context.Context, req *TSOperationSyncWriteReq) (_r *TSStatus, _err error) { - var _args304 TSIServiceExecuteOperationSyncArgs - _args304.Req = req - var _result306 TSIServiceExecuteOperationSyncResult - var _meta305 thrift.ResponseMeta - _meta305, _err = p.Client_().Call(ctx, "executeOperationSync", &_args304, &_result306) - p.SetLastResponseMeta_(_meta305) - if _err != nil { + if err != nil { return } - return _result306.GetSuccess(), nil -} - -type TSIServiceProcessor struct { - processorMap map[string]thrift.TProcessorFunction - handler TSIService -} - -func (p *TSIServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { - p.processorMap[key] = processor -} - -func (p *TSIServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { - processor, ok = p.processorMap[key] - return processor, ok + return true, err } -func (p *TSIServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { - return p.processorMap +type iClientRPCServiceProcessorFastInsertRecords struct { + handler IClientRPCService } -func NewTSIServiceProcessor(handler TSIService) *TSIServiceProcessor { - - self307 := &TSIServiceProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} - self307.processorMap["openSession"] = &tSIServiceProcessorOpenSession{handler:handler} - self307.processorMap["closeSession"] = &tSIServiceProcessorCloseSession{handler:handler} - self307.processorMap["executeStatement"] = &tSIServiceProcessorExecuteStatement{handler:handler} - self307.processorMap["executeBatchStatement"] = &tSIServiceProcessorExecuteBatchStatement{handler:handler} - self307.processorMap["executeQueryStatement"] = &tSIServiceProcessorExecuteQueryStatement{handler:handler} - self307.processorMap["executeUpdateStatement"] = &tSIServiceProcessorExecuteUpdateStatement{handler:handler} - self307.processorMap["fetchResults"] = &tSIServiceProcessorFetchResults{handler:handler} - self307.processorMap["fetchMetadata"] = &tSIServiceProcessorFetchMetadata{handler:handler} - self307.processorMap["cancelOperation"] = &tSIServiceProcessorCancelOperation{handler:handler} - self307.processorMap["closeOperation"] = &tSIServiceProcessorCloseOperation{handler:handler} - self307.processorMap["getTimeZone"] = &tSIServiceProcessorGetTimeZone{handler:handler} - self307.processorMap["setTimeZone"] = &tSIServiceProcessorSetTimeZone{handler:handler} - self307.processorMap["getProperties"] = &tSIServiceProcessorGetProperties{handler:handler} - self307.processorMap["setStorageGroup"] = &tSIServiceProcessorSetStorageGroup{handler:handler} - self307.processorMap["createTimeseries"] = &tSIServiceProcessorCreateTimeseries{handler:handler} - self307.processorMap["createAlignedTimeseries"] = &tSIServiceProcessorCreateAlignedTimeseries{handler:handler} - self307.processorMap["createMultiTimeseries"] = &tSIServiceProcessorCreateMultiTimeseries{handler:handler} - self307.processorMap["deleteTimeseries"] = &tSIServiceProcessorDeleteTimeseries{handler:handler} - self307.processorMap["deleteStorageGroups"] = &tSIServiceProcessorDeleteStorageGroups{handler:handler} - self307.processorMap["insertRecord"] = &tSIServiceProcessorInsertRecord{handler:handler} - self307.processorMap["insertStringRecord"] = &tSIServiceProcessorInsertStringRecord{handler:handler} - self307.processorMap["insertTablet"] = &tSIServiceProcessorInsertTablet{handler:handler} - self307.processorMap["insertTablets"] = &tSIServiceProcessorInsertTablets{handler:handler} - self307.processorMap["insertRecords"] = &tSIServiceProcessorInsertRecords{handler:handler} - self307.processorMap["insertRecordsOfOneDevice"] = &tSIServiceProcessorInsertRecordsOfOneDevice{handler:handler} - self307.processorMap["insertStringRecordsOfOneDevice"] = &tSIServiceProcessorInsertStringRecordsOfOneDevice{handler:handler} - self307.processorMap["insertStringRecords"] = &tSIServiceProcessorInsertStringRecords{handler:handler} - self307.processorMap["testInsertTablet"] = &tSIServiceProcessorTestInsertTablet{handler:handler} - self307.processorMap["testInsertTablets"] = &tSIServiceProcessorTestInsertTablets{handler:handler} - self307.processorMap["testInsertRecord"] = &tSIServiceProcessorTestInsertRecord{handler:handler} - self307.processorMap["testInsertStringRecord"] = &tSIServiceProcessorTestInsertStringRecord{handler:handler} - self307.processorMap["testInsertRecords"] = &tSIServiceProcessorTestInsertRecords{handler:handler} - self307.processorMap["testInsertRecordsOfOneDevice"] = &tSIServiceProcessorTestInsertRecordsOfOneDevice{handler:handler} - self307.processorMap["testInsertStringRecords"] = &tSIServiceProcessorTestInsertStringRecords{handler:handler} - self307.processorMap["deleteData"] = &tSIServiceProcessorDeleteData{handler:handler} - self307.processorMap["executeRawDataQuery"] = &tSIServiceProcessorExecuteRawDataQuery{handler:handler} - self307.processorMap["executeLastDataQuery"] = &tSIServiceProcessorExecuteLastDataQuery{handler:handler} - self307.processorMap["requestStatementId"] = &tSIServiceProcessorRequestStatementId{handler:handler} - self307.processorMap["createSchemaTemplate"] = &tSIServiceProcessorCreateSchemaTemplate{handler:handler} - self307.processorMap["appendSchemaTemplate"] = &tSIServiceProcessorAppendSchemaTemplate{handler:handler} - self307.processorMap["pruneSchemaTemplate"] = &tSIServiceProcessorPruneSchemaTemplate{handler:handler} - self307.processorMap["querySchemaTemplate"] = &tSIServiceProcessorQuerySchemaTemplate{handler:handler} - self307.processorMap["setSchemaTemplate"] = &tSIServiceProcessorSetSchemaTemplate{handler:handler} - self307.processorMap["unsetSchemaTemplate"] = &tSIServiceProcessorUnsetSchemaTemplate{handler:handler} - self307.processorMap["setUsingTemplate"] = &tSIServiceProcessorSetUsingTemplate{handler:handler} - self307.processorMap["unsetUsingTemplate"] = &tSIServiceProcessorUnsetUsingTemplate{handler:handler} - self307.processorMap["dropSchemaTemplate"] = &tSIServiceProcessorDropSchemaTemplate{handler:handler} - self307.processorMap["executeOperationSync"] = &tSIServiceProcessorExecuteOperationSync{handler:handler} -return self307 -} - -func (p *TSIServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) - if err2 != nil { return false, thrift.WrapTException(err2) } - if processor, ok := p.GetProcessorFunction(name); ok { - return processor.Process(ctx, seqId, iprot, oprot) +func (p *iClientRPCServiceProcessorFastInsertRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceFastInsertRecordsArgs{} + var err2 error + if err2 = args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "fastInsertRecords", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) } - iprot.Skip(ctx, thrift.STRUCT) iprot.ReadMessageEnd(ctx) - x308 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) - oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) - x308.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, x308 + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := IClientRPCServiceFastInsertRecordsResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.FastInsertRecords(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fastInsertRecords: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "fastInsertRecords", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return true, thrift.WrapTException(err2) + } else { + result.Success = retval + } + tickerCancel() + if err2 = oprot.WriteMessageBegin(ctx, "fastInsertRecords", thrift.REPLY, seqId); err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err } -type tSIServiceProcessorOpenSession struct { - handler TSIService +type iClientRPCServiceProcessorInsertRecordsOfOneDevice struct { + handler IClientRPCService } -func (p *tSIServiceProcessorOpenSession) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceOpenSessionArgs{} +func (p *iClientRPCServiceProcessorInsertRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceInsertRecordsOfOneDeviceArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "openSession", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -15906,15 +20870,15 @@ func (p *tSIServiceProcessorOpenSession) Process(ctx context.Context, seqId int3 }(tickerCtx, cancel) } - result := TSIServiceOpenSessionResult{} - var retval *TSOpenSessionResp - if retval, err2 = p.handler.OpenSession(ctx, args.Req); err2 != nil { + result := IClientRPCServiceInsertRecordsOfOneDeviceResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.InsertRecordsOfOneDevice(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing openSession: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "openSession", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertRecordsOfOneDevice: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -15923,7 +20887,7 @@ func (p *tSIServiceProcessorOpenSession) Process(ctx context.Context, seqId int3 result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "openSession", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -15941,17 +20905,17 @@ func (p *tSIServiceProcessorOpenSession) Process(ctx context.Context, seqId int3 return true, err } -type tSIServiceProcessorCloseSession struct { - handler TSIService +type iClientRPCServiceProcessorInsertStringRecordsOfOneDevice struct { + handler IClientRPCService } -func (p *tSIServiceProcessorCloseSession) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceCloseSessionArgs{} +func (p *iClientRPCServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceInsertStringRecordsOfOneDeviceArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "closeSession", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -15985,15 +20949,15 @@ func (p *tSIServiceProcessorCloseSession) Process(ctx context.Context, seqId int }(tickerCtx, cancel) } - result := TSIServiceCloseSessionResult{} - var retval *TSStatus - if retval, err2 = p.handler.CloseSession(ctx, args.Req); err2 != nil { + result := IClientRPCServiceInsertStringRecordsOfOneDeviceResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.InsertStringRecordsOfOneDevice(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing closeSession: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "closeSession", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertStringRecordsOfOneDevice: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16002,7 +20966,7 @@ func (p *tSIServiceProcessorCloseSession) Process(ctx context.Context, seqId int result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "closeSession", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16020,17 +20984,17 @@ func (p *tSIServiceProcessorCloseSession) Process(ctx context.Context, seqId int return true, err } -type tSIServiceProcessorExecuteStatement struct { - handler TSIService +type iClientRPCServiceProcessorInsertStringRecords struct { + handler IClientRPCService } -func (p *tSIServiceProcessorExecuteStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceExecuteStatementArgs{} +func (p *iClientRPCServiceProcessorInsertStringRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceInsertStringRecordsArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "executeStatement", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "insertStringRecords", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16064,15 +21028,15 @@ func (p *tSIServiceProcessorExecuteStatement) Process(ctx context.Context, seqId }(tickerCtx, cancel) } - result := TSIServiceExecuteStatementResult{} - var retval *TSExecuteStatementResp - if retval, err2 = p.handler.ExecuteStatement(ctx, args.Req); err2 != nil { + result := IClientRPCServiceInsertStringRecordsResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.InsertStringRecords(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeStatement: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeStatement", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertStringRecords: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertStringRecords", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16081,7 +21045,7 @@ func (p *tSIServiceProcessorExecuteStatement) Process(ctx context.Context, seqId result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeStatement", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "insertStringRecords", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16099,17 +21063,17 @@ func (p *tSIServiceProcessorExecuteStatement) Process(ctx context.Context, seqId return true, err } -type tSIServiceProcessorExecuteBatchStatement struct { - handler TSIService +type iClientRPCServiceProcessorTestInsertTablet struct { + handler IClientRPCService } -func (p *tSIServiceProcessorExecuteBatchStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceExecuteBatchStatementArgs{} +func (p *iClientRPCServiceProcessorTestInsertTablet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceTestInsertTabletArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "executeBatchStatement", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertTablet", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16143,15 +21107,15 @@ func (p *tSIServiceProcessorExecuteBatchStatement) Process(ctx context.Context, }(tickerCtx, cancel) } - result := TSIServiceExecuteBatchStatementResult{} - var retval *TSStatus - if retval, err2 = p.handler.ExecuteBatchStatement(ctx, args.Req); err2 != nil { + result := IClientRPCServiceTestInsertTabletResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.TestInsertTablet(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeBatchStatement: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeBatchStatement", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertTablet: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "testInsertTablet", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16160,7 +21124,7 @@ func (p *tSIServiceProcessorExecuteBatchStatement) Process(ctx context.Context, result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeBatchStatement", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "testInsertTablet", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16178,17 +21142,17 @@ func (p *tSIServiceProcessorExecuteBatchStatement) Process(ctx context.Context, return true, err } -type tSIServiceProcessorExecuteQueryStatement struct { - handler TSIService +type iClientRPCServiceProcessorTestInsertTablets struct { + handler IClientRPCService } -func (p *tSIServiceProcessorExecuteQueryStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceExecuteQueryStatementArgs{} +func (p *iClientRPCServiceProcessorTestInsertTablets) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceTestInsertTabletsArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "executeQueryStatement", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertTablets", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16222,15 +21186,15 @@ func (p *tSIServiceProcessorExecuteQueryStatement) Process(ctx context.Context, }(tickerCtx, cancel) } - result := TSIServiceExecuteQueryStatementResult{} - var retval *TSExecuteStatementResp - if retval, err2 = p.handler.ExecuteQueryStatement(ctx, args.Req); err2 != nil { + result := IClientRPCServiceTestInsertTabletsResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.TestInsertTablets(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeQueryStatement: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeQueryStatement", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertTablets: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "testInsertTablets", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16239,7 +21203,7 @@ func (p *tSIServiceProcessorExecuteQueryStatement) Process(ctx context.Context, result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeQueryStatement", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "testInsertTablets", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16257,17 +21221,17 @@ func (p *tSIServiceProcessorExecuteQueryStatement) Process(ctx context.Context, return true, err } -type tSIServiceProcessorExecuteUpdateStatement struct { - handler TSIService +type iClientRPCServiceProcessorTestInsertRecord struct { + handler IClientRPCService } -func (p *tSIServiceProcessorExecuteUpdateStatement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceExecuteUpdateStatementArgs{} +func (p *iClientRPCServiceProcessorTestInsertRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceTestInsertRecordArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "executeUpdateStatement", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16301,15 +21265,15 @@ func (p *tSIServiceProcessorExecuteUpdateStatement) Process(ctx context.Context, }(tickerCtx, cancel) } - result := TSIServiceExecuteUpdateStatementResult{} - var retval *TSExecuteStatementResp - if retval, err2 = p.handler.ExecuteUpdateStatement(ctx, args.Req); err2 != nil { + result := IClientRPCServiceTestInsertRecordResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.TestInsertRecord(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeUpdateStatement: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeUpdateStatement", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertRecord: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16318,7 +21282,7 @@ func (p *tSIServiceProcessorExecuteUpdateStatement) Process(ctx context.Context, result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeUpdateStatement", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16336,17 +21300,17 @@ func (p *tSIServiceProcessorExecuteUpdateStatement) Process(ctx context.Context, return true, err } -type tSIServiceProcessorFetchResults struct { - handler TSIService +type iClientRPCServiceProcessorTestInsertStringRecord struct { + handler IClientRPCService } -func (p *tSIServiceProcessorFetchResults) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceFetchResultsArgs{} +func (p *iClientRPCServiceProcessorTestInsertStringRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceTestInsertStringRecordArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "fetchResults", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16380,15 +21344,15 @@ func (p *tSIServiceProcessorFetchResults) Process(ctx context.Context, seqId int }(tickerCtx, cancel) } - result := TSIServiceFetchResultsResult{} - var retval *TSFetchResultsResp - if retval, err2 = p.handler.FetchResults(ctx, args.Req); err2 != nil { + result := IClientRPCServiceTestInsertStringRecordResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.TestInsertStringRecord(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchResults: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "fetchResults", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertStringRecord: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16397,7 +21361,7 @@ func (p *tSIServiceProcessorFetchResults) Process(ctx context.Context, seqId int result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "fetchResults", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16415,17 +21379,17 @@ func (p *tSIServiceProcessorFetchResults) Process(ctx context.Context, seqId int return true, err } -type tSIServiceProcessorFetchMetadata struct { - handler TSIService +type iClientRPCServiceProcessorTestInsertRecords struct { + handler IClientRPCService } -func (p *tSIServiceProcessorFetchMetadata) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceFetchMetadataArgs{} +func (p *iClientRPCServiceProcessorTestInsertRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceTestInsertRecordsArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "fetchMetadata", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16459,15 +21423,15 @@ func (p *tSIServiceProcessorFetchMetadata) Process(ctx context.Context, seqId in }(tickerCtx, cancel) } - result := TSIServiceFetchMetadataResult{} - var retval *TSFetchMetadataResp - if retval, err2 = p.handler.FetchMetadata(ctx, args.Req); err2 != nil { + result := IClientRPCServiceTestInsertRecordsResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.TestInsertRecords(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchMetadata: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "fetchMetadata", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertRecords: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16476,7 +21440,7 @@ func (p *tSIServiceProcessorFetchMetadata) Process(ctx context.Context, seqId in result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "fetchMetadata", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16494,17 +21458,17 @@ func (p *tSIServiceProcessorFetchMetadata) Process(ctx context.Context, seqId in return true, err } -type tSIServiceProcessorCancelOperation struct { - handler TSIService +type iClientRPCServiceProcessorTestInsertRecordsOfOneDevice struct { + handler IClientRPCService } -func (p *tSIServiceProcessorCancelOperation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceCancelOperationArgs{} +func (p *iClientRPCServiceProcessorTestInsertRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceTestInsertRecordsOfOneDeviceArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "cancelOperation", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16538,15 +21502,15 @@ func (p *tSIServiceProcessorCancelOperation) Process(ctx context.Context, seqId }(tickerCtx, cancel) } - result := TSIServiceCancelOperationResult{} - var retval *TSStatus - if retval, err2 = p.handler.CancelOperation(ctx, args.Req); err2 != nil { + result := IClientRPCServiceTestInsertRecordsOfOneDeviceResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.TestInsertRecordsOfOneDevice(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing cancelOperation: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "cancelOperation", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertRecordsOfOneDevice: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16555,7 +21519,7 @@ func (p *tSIServiceProcessorCancelOperation) Process(ctx context.Context, seqId result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "cancelOperation", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16573,17 +21537,17 @@ func (p *tSIServiceProcessorCancelOperation) Process(ctx context.Context, seqId return true, err } -type tSIServiceProcessorCloseOperation struct { - handler TSIService +type iClientRPCServiceProcessorTestInsertStringRecords struct { + handler IClientRPCService } -func (p *tSIServiceProcessorCloseOperation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceCloseOperationArgs{} +func (p *iClientRPCServiceProcessorTestInsertStringRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceTestInsertStringRecordsArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "closeOperation", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16617,15 +21581,15 @@ func (p *tSIServiceProcessorCloseOperation) Process(ctx context.Context, seqId i }(tickerCtx, cancel) } - result := TSIServiceCloseOperationResult{} - var retval *TSStatus - if retval, err2 = p.handler.CloseOperation(ctx, args.Req); err2 != nil { + result := IClientRPCServiceTestInsertStringRecordsResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.TestInsertStringRecords(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing closeOperation: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "closeOperation", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertStringRecords: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16634,7 +21598,7 @@ func (p *tSIServiceProcessorCloseOperation) Process(ctx context.Context, seqId i result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "closeOperation", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16652,17 +21616,17 @@ func (p *tSIServiceProcessorCloseOperation) Process(ctx context.Context, seqId i return true, err } -type tSIServiceProcessorGetTimeZone struct { - handler TSIService +type iClientRPCServiceProcessorDeleteData struct { + handler IClientRPCService } -func (p *tSIServiceProcessorGetTimeZone) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceGetTimeZoneArgs{} +func (p *iClientRPCServiceProcessorDeleteData) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceDeleteDataArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "getTimeZone", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "deleteData", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16696,15 +21660,15 @@ func (p *tSIServiceProcessorGetTimeZone) Process(ctx context.Context, seqId int3 }(tickerCtx, cancel) } - result := TSIServiceGetTimeZoneResult{} - var retval *TSGetTimeZoneResp - if retval, err2 = p.handler.GetTimeZone(ctx, args.SessionId); err2 != nil { + result := IClientRPCServiceDeleteDataResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.DeleteData(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTimeZone: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "getTimeZone", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteData: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteData", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16713,7 +21677,7 @@ func (p *tSIServiceProcessorGetTimeZone) Process(ctx context.Context, seqId int3 result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getTimeZone", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "deleteData", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16731,17 +21695,17 @@ func (p *tSIServiceProcessorGetTimeZone) Process(ctx context.Context, seqId int3 return true, err } -type tSIServiceProcessorSetTimeZone struct { - handler TSIService +type iClientRPCServiceProcessorExecuteRawDataQuery struct { + handler IClientRPCService } -func (p *tSIServiceProcessorSetTimeZone) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceSetTimeZoneArgs{} +func (p *iClientRPCServiceProcessorExecuteRawDataQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteRawDataQueryArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "setTimeZone", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16775,15 +21739,15 @@ func (p *tSIServiceProcessorSetTimeZone) Process(ctx context.Context, seqId int3 }(tickerCtx, cancel) } - result := TSIServiceSetTimeZoneResult{} - var retval *TSStatus - if retval, err2 = p.handler.SetTimeZone(ctx, args.Req); err2 != nil { + result := IClientRPCServiceExecuteRawDataQueryResult{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteRawDataQuery(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setTimeZone: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "setTimeZone", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeRawDataQuery: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16792,7 +21756,7 @@ func (p *tSIServiceProcessorSetTimeZone) Process(ctx context.Context, seqId int3 result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "setTimeZone", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16810,17 +21774,17 @@ func (p *tSIServiceProcessorSetTimeZone) Process(ctx context.Context, seqId int3 return true, err } -type tSIServiceProcessorGetProperties struct { - handler TSIService +type iClientRPCServiceProcessorExecuteLastDataQuery struct { + handler IClientRPCService } -func (p *tSIServiceProcessorGetProperties) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceGetPropertiesArgs{} +func (p *iClientRPCServiceProcessorExecuteLastDataQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteLastDataQueryArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "getProperties", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16854,15 +21818,15 @@ func (p *tSIServiceProcessorGetProperties) Process(ctx context.Context, seqId in }(tickerCtx, cancel) } - result := TSIServiceGetPropertiesResult{} - var retval *ServerProperties - if retval, err2 = p.handler.GetProperties(ctx); err2 != nil { + result := IClientRPCServiceExecuteLastDataQueryResult{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteLastDataQuery(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getProperties: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "getProperties", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeLastDataQuery: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16871,7 +21835,7 @@ func (p *tSIServiceProcessorGetProperties) Process(ctx context.Context, seqId in result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "getProperties", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16889,17 +21853,17 @@ func (p *tSIServiceProcessorGetProperties) Process(ctx context.Context, seqId in return true, err } -type tSIServiceProcessorSetStorageGroup struct { - handler TSIService +type iClientRPCServiceProcessorExecuteAggregationQuery struct { + handler IClientRPCService } -func (p *tSIServiceProcessorSetStorageGroup) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceSetStorageGroupArgs{} +func (p *iClientRPCServiceProcessorExecuteAggregationQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteAggregationQueryArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "setStorageGroup", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "executeAggregationQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16933,15 +21897,15 @@ func (p *tSIServiceProcessorSetStorageGroup) Process(ctx context.Context, seqId }(tickerCtx, cancel) } - result := TSIServiceSetStorageGroupResult{} - var retval *TSStatus - if retval, err2 = p.handler.SetStorageGroup(ctx, args.SessionId, args.StorageGroup); err2 != nil { + result := IClientRPCServiceExecuteAggregationQueryResult{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteAggregationQuery(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setStorageGroup: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "setStorageGroup", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeAggregationQuery: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeAggregationQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -16950,7 +21914,7 @@ func (p *tSIServiceProcessorSetStorageGroup) Process(ctx context.Context, seqId result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "setStorageGroup", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "executeAggregationQuery", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -16968,17 +21932,17 @@ func (p *tSIServiceProcessorSetStorageGroup) Process(ctx context.Context, seqId return true, err } -type tSIServiceProcessorCreateTimeseries struct { - handler TSIService +type iClientRPCServiceProcessorRequestStatementId struct { + handler IClientRPCService } -func (p *tSIServiceProcessorCreateTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceCreateTimeseriesArgs{} +func (p *iClientRPCServiceProcessorRequestStatementId) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceRequestStatementIdArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "createTimeseries", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17012,24 +21976,24 @@ func (p *tSIServiceProcessorCreateTimeseries) Process(ctx context.Context, seqId }(tickerCtx, cancel) } - result := TSIServiceCreateTimeseriesResult{} - var retval *TSStatus - if retval, err2 = p.handler.CreateTimeseries(ctx, args.Req); err2 != nil { + result := IClientRPCServiceRequestStatementIdResult{} + var retval int64 + if retval, err2 = p.handler.RequestStatementId(ctx, args.SessionId); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTimeseries: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "createTimeseries", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing requestStatementId: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } else { - result.Success = retval + result.Success = &retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "createTimeseries", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17047,17 +22011,17 @@ func (p *tSIServiceProcessorCreateTimeseries) Process(ctx context.Context, seqId return true, err } -type tSIServiceProcessorCreateAlignedTimeseries struct { - handler TSIService +type iClientRPCServiceProcessorCreateSchemaTemplate struct { + handler IClientRPCService } -func (p *tSIServiceProcessorCreateAlignedTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceCreateAlignedTimeseriesArgs{} +func (p *iClientRPCServiceProcessorCreateSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceCreateSchemaTemplateArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "createAlignedTimeseries", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17091,15 +22055,15 @@ func (p *tSIServiceProcessorCreateAlignedTimeseries) Process(ctx context.Context }(tickerCtx, cancel) } - result := TSIServiceCreateAlignedTimeseriesResult{} - var retval *TSStatus - if retval, err2 = p.handler.CreateAlignedTimeseries(ctx, args.Req); err2 != nil { + result := IClientRPCServiceCreateSchemaTemplateResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.CreateSchemaTemplate(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createAlignedTimeseries: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "createAlignedTimeseries", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createSchemaTemplate: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17108,7 +22072,7 @@ func (p *tSIServiceProcessorCreateAlignedTimeseries) Process(ctx context.Context result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "createAlignedTimeseries", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17126,17 +22090,17 @@ func (p *tSIServiceProcessorCreateAlignedTimeseries) Process(ctx context.Context return true, err } -type tSIServiceProcessorCreateMultiTimeseries struct { - handler TSIService +type iClientRPCServiceProcessorAppendSchemaTemplate struct { + handler IClientRPCService } -func (p *tSIServiceProcessorCreateMultiTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceCreateMultiTimeseriesArgs{} +func (p *iClientRPCServiceProcessorAppendSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceAppendSchemaTemplateArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "createMultiTimeseries", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17170,15 +22134,15 @@ func (p *tSIServiceProcessorCreateMultiTimeseries) Process(ctx context.Context, }(tickerCtx, cancel) } - result := TSIServiceCreateMultiTimeseriesResult{} - var retval *TSStatus - if retval, err2 = p.handler.CreateMultiTimeseries(ctx, args.Req); err2 != nil { + result := IClientRPCServiceAppendSchemaTemplateResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.AppendSchemaTemplate(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createMultiTimeseries: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "createMultiTimeseries", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing appendSchemaTemplate: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17187,7 +22151,7 @@ func (p *tSIServiceProcessorCreateMultiTimeseries) Process(ctx context.Context, result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "createMultiTimeseries", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17205,17 +22169,17 @@ func (p *tSIServiceProcessorCreateMultiTimeseries) Process(ctx context.Context, return true, err } -type tSIServiceProcessorDeleteTimeseries struct { - handler TSIService +type iClientRPCServiceProcessorPruneSchemaTemplate struct { + handler IClientRPCService } -func (p *tSIServiceProcessorDeleteTimeseries) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceDeleteTimeseriesArgs{} +func (p *iClientRPCServiceProcessorPruneSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServicePruneSchemaTemplateArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "deleteTimeseries", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17249,15 +22213,15 @@ func (p *tSIServiceProcessorDeleteTimeseries) Process(ctx context.Context, seqId }(tickerCtx, cancel) } - result := TSIServiceDeleteTimeseriesResult{} - var retval *TSStatus - if retval, err2 = p.handler.DeleteTimeseries(ctx, args.SessionId, args.Path); err2 != nil { + result := IClientRPCServicePruneSchemaTemplateResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.PruneSchemaTemplate(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTimeseries: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "deleteTimeseries", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pruneSchemaTemplate: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17266,7 +22230,7 @@ func (p *tSIServiceProcessorDeleteTimeseries) Process(ctx context.Context, seqId result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "deleteTimeseries", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17284,17 +22248,17 @@ func (p *tSIServiceProcessorDeleteTimeseries) Process(ctx context.Context, seqId return true, err } -type tSIServiceProcessorDeleteStorageGroups struct { - handler TSIService +type iClientRPCServiceProcessorQuerySchemaTemplate struct { + handler IClientRPCService } -func (p *tSIServiceProcessorDeleteStorageGroups) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceDeleteStorageGroupsArgs{} +func (p *iClientRPCServiceProcessorQuerySchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceQuerySchemaTemplateArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "deleteStorageGroups", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17328,15 +22292,15 @@ func (p *tSIServiceProcessorDeleteStorageGroups) Process(ctx context.Context, se }(tickerCtx, cancel) } - result := TSIServiceDeleteStorageGroupsResult{} - var retval *TSStatus - if retval, err2 = p.handler.DeleteStorageGroups(ctx, args.SessionId, args.StorageGroup); err2 != nil { + result := IClientRPCServiceQuerySchemaTemplateResult{} + var retval *TSQueryTemplateResp + if retval, err2 = p.handler.QuerySchemaTemplate(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteStorageGroups: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "deleteStorageGroups", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing querySchemaTemplate: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17345,7 +22309,7 @@ func (p *tSIServiceProcessorDeleteStorageGroups) Process(ctx context.Context, se result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "deleteStorageGroups", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17363,17 +22327,17 @@ func (p *tSIServiceProcessorDeleteStorageGroups) Process(ctx context.Context, se return true, err } -type tSIServiceProcessorInsertRecord struct { - handler TSIService +type iClientRPCServiceProcessorSetSchemaTemplate struct { + handler IClientRPCService } -func (p *tSIServiceProcessorInsertRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceInsertRecordArgs{} +func (p *iClientRPCServiceProcessorSetSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceSetSchemaTemplateArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "insertRecord", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17407,15 +22371,15 @@ func (p *tSIServiceProcessorInsertRecord) Process(ctx context.Context, seqId int }(tickerCtx, cancel) } - result := TSIServiceInsertRecordResult{} - var retval *TSStatus - if retval, err2 = p.handler.InsertRecord(ctx, args.Req); err2 != nil { + result := IClientRPCServiceSetSchemaTemplateResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.SetSchemaTemplate(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertRecord: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertRecord", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setSchemaTemplate: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17424,7 +22388,7 @@ func (p *tSIServiceProcessorInsertRecord) Process(ctx context.Context, seqId int result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertRecord", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17442,17 +22406,17 @@ func (p *tSIServiceProcessorInsertRecord) Process(ctx context.Context, seqId int return true, err } -type tSIServiceProcessorInsertStringRecord struct { - handler TSIService +type iClientRPCServiceProcessorUnsetSchemaTemplate struct { + handler IClientRPCService } -func (p *tSIServiceProcessorInsertStringRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceInsertStringRecordArgs{} +func (p *iClientRPCServiceProcessorUnsetSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceUnsetSchemaTemplateArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "insertStringRecord", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17486,15 +22450,15 @@ func (p *tSIServiceProcessorInsertStringRecord) Process(ctx context.Context, seq }(tickerCtx, cancel) } - result := TSIServiceInsertStringRecordResult{} - var retval *TSStatus - if retval, err2 = p.handler.InsertStringRecord(ctx, args.Req); err2 != nil { + result := IClientRPCServiceUnsetSchemaTemplateResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.UnsetSchemaTemplate(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertStringRecord: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertStringRecord", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing unsetSchemaTemplate: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17503,7 +22467,7 @@ func (p *tSIServiceProcessorInsertStringRecord) Process(ctx context.Context, seq result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertStringRecord", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17521,17 +22485,17 @@ func (p *tSIServiceProcessorInsertStringRecord) Process(ctx context.Context, seq return true, err } -type tSIServiceProcessorInsertTablet struct { - handler TSIService +type iClientRPCServiceProcessorDropSchemaTemplate struct { + handler IClientRPCService } -func (p *tSIServiceProcessorInsertTablet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceInsertTabletArgs{} +func (p *iClientRPCServiceProcessorDropSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceDropSchemaTemplateArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "insertTablet", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17565,15 +22529,15 @@ func (p *tSIServiceProcessorInsertTablet) Process(ctx context.Context, seqId int }(tickerCtx, cancel) } - result := TSIServiceInsertTabletResult{} - var retval *TSStatus - if retval, err2 = p.handler.InsertTablet(ctx, args.Req); err2 != nil { + result := IClientRPCServiceDropSchemaTemplateResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.DropSchemaTemplate(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertTablet: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertTablet", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing dropSchemaTemplate: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17582,7 +22546,7 @@ func (p *tSIServiceProcessorInsertTablet) Process(ctx context.Context, seqId int result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertTablet", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17600,17 +22564,17 @@ func (p *tSIServiceProcessorInsertTablet) Process(ctx context.Context, seqId int return true, err } -type tSIServiceProcessorInsertTablets struct { - handler TSIService +type iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate struct { + handler IClientRPCService } -func (p *tSIServiceProcessorInsertTablets) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceInsertTabletsArgs{} +func (p *iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "insertTablets", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "createTimeseriesUsingSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17644,15 +22608,15 @@ func (p *tSIServiceProcessorInsertTablets) Process(ctx context.Context, seqId in }(tickerCtx, cancel) } - result := TSIServiceInsertTabletsResult{} - var retval *TSStatus - if retval, err2 = p.handler.InsertTablets(ctx, args.Req); err2 != nil { + result := IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.CreateTimeseriesUsingSchemaTemplate(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertTablets: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertTablets", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTimeseriesUsingSchemaTemplate: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "createTimeseriesUsingSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17661,7 +22625,7 @@ func (p *tSIServiceProcessorInsertTablets) Process(ctx context.Context, seqId in result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertTablets", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "createTimeseriesUsingSchemaTemplate", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17679,17 +22643,17 @@ func (p *tSIServiceProcessorInsertTablets) Process(ctx context.Context, seqId in return true, err } -type tSIServiceProcessorInsertRecords struct { - handler TSIService +type iClientRPCServiceProcessorHandshake struct { + handler IClientRPCService } -func (p *tSIServiceProcessorInsertRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceInsertRecordsArgs{} +func (p *iClientRPCServiceProcessorHandshake) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceHandshakeArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "insertRecords", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "handshake", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17723,15 +22687,15 @@ func (p *tSIServiceProcessorInsertRecords) Process(ctx context.Context, seqId in }(tickerCtx, cancel) } - result := TSIServiceInsertRecordsResult{} - var retval *TSStatus - if retval, err2 = p.handler.InsertRecords(ctx, args.Req); err2 != nil { + result := IClientRPCServiceHandshakeResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.Handshake(ctx, args.Info); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertRecords: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertRecords", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing handshake: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "handshake", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17740,7 +22704,7 @@ func (p *tSIServiceProcessorInsertRecords) Process(ctx context.Context, seqId in result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertRecords", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "handshake", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17758,17 +22722,17 @@ func (p *tSIServiceProcessorInsertRecords) Process(ctx context.Context, seqId in return true, err } -type tSIServiceProcessorInsertRecordsOfOneDevice struct { - handler TSIService +type iClientRPCServiceProcessorSendPipeData struct { + handler IClientRPCService } -func (p *tSIServiceProcessorInsertRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceInsertRecordsOfOneDeviceArgs{} +func (p *iClientRPCServiceProcessorSendPipeData) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceSendPipeDataArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "sendPipeData", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17802,15 +22766,15 @@ func (p *tSIServiceProcessorInsertRecordsOfOneDevice) Process(ctx context.Contex }(tickerCtx, cancel) } - result := TSIServiceInsertRecordsOfOneDeviceResult{} - var retval *TSStatus - if retval, err2 = p.handler.InsertRecordsOfOneDevice(ctx, args.Req); err2 != nil { + result := IClientRPCServiceSendPipeDataResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.SendPipeData(ctx, args.Buff); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertRecordsOfOneDevice: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sendPipeData: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "sendPipeData", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17819,7 +22783,7 @@ func (p *tSIServiceProcessorInsertRecordsOfOneDevice) Process(ctx context.Contex result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "sendPipeData", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17837,17 +22801,17 @@ func (p *tSIServiceProcessorInsertRecordsOfOneDevice) Process(ctx context.Contex return true, err } -type tSIServiceProcessorInsertStringRecordsOfOneDevice struct { - handler TSIService +type iClientRPCServiceProcessorSendFile struct { + handler IClientRPCService } -func (p *tSIServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceInsertStringRecordsOfOneDeviceArgs{} +func (p *iClientRPCServiceProcessorSendFile) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceSendFileArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "sendFile", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17881,15 +22845,15 @@ func (p *tSIServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx context. }(tickerCtx, cancel) } - result := TSIServiceInsertStringRecordsOfOneDeviceResult{} - var retval *TSStatus - if retval, err2 = p.handler.InsertStringRecordsOfOneDevice(ctx, args.Req); err2 != nil { + result := IClientRPCServiceSendFileResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.SendFile(ctx, args.MetaInfo, args.Buff); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertStringRecordsOfOneDevice: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sendFile: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "sendFile", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17898,7 +22862,7 @@ func (p *tSIServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx context. result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "sendFile", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17916,17 +22880,17 @@ func (p *tSIServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx context. return true, err } -type tSIServiceProcessorInsertStringRecords struct { - handler TSIService +type iClientRPCServiceProcessorGetBackupConfiguration struct { + handler IClientRPCService } -func (p *tSIServiceProcessorInsertStringRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceInsertStringRecordsArgs{} +func (p *iClientRPCServiceProcessorGetBackupConfiguration) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceGetBackupConfigurationArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "insertStringRecords", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "getBackupConfiguration", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17960,15 +22924,15 @@ func (p *tSIServiceProcessorInsertStringRecords) Process(ctx context.Context, se }(tickerCtx, cancel) } - result := TSIServiceInsertStringRecordsResult{} - var retval *TSStatus - if retval, err2 = p.handler.InsertStringRecords(ctx, args.Req); err2 != nil { + result := IClientRPCServiceGetBackupConfigurationResult{} + var retval *TSBackupConfigurationResp + if retval, err2 = p.handler.GetBackupConfiguration(ctx); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing insertStringRecords: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertStringRecords", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getBackupConfiguration: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "getBackupConfiguration", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -17977,7 +22941,7 @@ func (p *tSIServiceProcessorInsertStringRecords) Process(ctx context.Context, se result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertStringRecords", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "getBackupConfiguration", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -17995,17 +22959,17 @@ func (p *tSIServiceProcessorInsertStringRecords) Process(ctx context.Context, se return true, err } -type tSIServiceProcessorTestInsertTablet struct { - handler TSIService +type iClientRPCServiceProcessorFetchAllConnectionsInfo struct { + handler IClientRPCService } -func (p *tSIServiceProcessorTestInsertTablet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceTestInsertTabletArgs{} +func (p *iClientRPCServiceProcessorFetchAllConnectionsInfo) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceFetchAllConnectionsInfoArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertTablet", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "fetchAllConnectionsInfo", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -18039,15 +23003,15 @@ func (p *tSIServiceProcessorTestInsertTablet) Process(ctx context.Context, seqId }(tickerCtx, cancel) } - result := TSIServiceTestInsertTabletResult{} - var retval *TSStatus - if retval, err2 = p.handler.TestInsertTablet(ctx, args.Req); err2 != nil { + result := IClientRPCServiceFetchAllConnectionsInfoResult{} + var retval *TSConnectionInfoResp + if retval, err2 = p.handler.FetchAllConnectionsInfo(ctx); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertTablet: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertTablet", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchAllConnectionsInfo: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "fetchAllConnectionsInfo", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -18056,7 +23020,7 @@ func (p *tSIServiceProcessorTestInsertTablet) Process(ctx context.Context, seqId result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertTablet", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "fetchAllConnectionsInfo", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -18065,1620 +23029,2222 @@ func (p *tSIServiceProcessorTestInsertTablet) Process(ctx context.Context, seqId if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { err = thrift.WrapTException(err2) } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err2 = oprot.Flush(ctx); err == nil && err2 != nil { + err = thrift.WrapTException(err2) + } + if err != nil { + return + } + return true, err +} + + +// HELPER FUNCTIONS AND STRUCTURES + +// Attributes: +// - Req +type IClientRPCServiceExecuteQueryStatementV2Args struct { + Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` +} + +func NewIClientRPCServiceExecuteQueryStatementV2Args() *IClientRPCServiceExecuteQueryStatementV2Args { + return &IClientRPCServiceExecuteQueryStatementV2Args{} +} + +var IClientRPCServiceExecuteQueryStatementV2Args_Req_DEFAULT *TSExecuteStatementReq +func (p *IClientRPCServiceExecuteQueryStatementV2Args) GetReq() *TSExecuteStatementReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteQueryStatementV2Args_Req_DEFAULT + } +return p.Req +} +func (p *IClientRPCServiceExecuteQueryStatementV2Args) IsSetReq() bool { + return p.Req != nil +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSExecuteStatementReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) + } + return nil +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeQueryStatementV2_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Args) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceExecuteQueryStatementV2Args(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServiceExecuteQueryStatementV2Result struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewIClientRPCServiceExecuteQueryStatementV2Result() *IClientRPCServiceExecuteQueryStatementV2Result { + return &IClientRPCServiceExecuteQueryStatementV2Result{} +} + +var IClientRPCServiceExecuteQueryStatementV2Result_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteQueryStatementV2Result) GetSuccess() *TSExecuteStatementResp { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteQueryStatementV2Result_Success_DEFAULT + } +return p.Success +} +func (p *IClientRPCServiceExecuteQueryStatementV2Result) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeQueryStatementV2_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceExecuteQueryStatementV2Result) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteQueryStatementV2Result(%+v)", *p) } -type tSIServiceProcessorTestInsertTablets struct { - handler TSIService +// Attributes: +// - Req +type IClientRPCServiceExecuteUpdateStatementV2Args struct { + Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` } -func (p *tSIServiceProcessorTestInsertTablets) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceTestInsertTabletsArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertTablets", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteUpdateStatementV2Args() *IClientRPCServiceExecuteUpdateStatementV2Args { + return &IClientRPCServiceExecuteUpdateStatementV2Args{} +} + +var IClientRPCServiceExecuteUpdateStatementV2Args_Req_DEFAULT *TSExecuteStatementReq +func (p *IClientRPCServiceExecuteUpdateStatementV2Args) GetReq() *TSExecuteStatementReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteUpdateStatementV2Args_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceExecuteUpdateStatementV2Args) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteUpdateStatementV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceTestInsertTabletsResult{} - var retval *TSStatus - if retval, err2 = p.handler.TestInsertTablets(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertTablets: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertTablets", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertTablets", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteUpdateStatementV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSExecuteStatementReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteUpdateStatementV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeUpdateStatementV2_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteUpdateStatementV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceExecuteUpdateStatementV2Args) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteUpdateStatementV2Args(%+v)", *p) } -type tSIServiceProcessorTestInsertRecord struct { - handler TSIService +// Attributes: +// - Success +type IClientRPCServiceExecuteUpdateStatementV2Result struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func (p *tSIServiceProcessorTestInsertRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceTestInsertRecordArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteUpdateStatementV2Result() *IClientRPCServiceExecuteUpdateStatementV2Result { + return &IClientRPCServiceExecuteUpdateStatementV2Result{} +} + +var IClientRPCServiceExecuteUpdateStatementV2Result_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteUpdateStatementV2Result) GetSuccess() *TSExecuteStatementResp { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteUpdateStatementV2Result_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceExecuteUpdateStatementV2Result) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteUpdateStatementV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceTestInsertRecordResult{} - var retval *TSStatus - if retval, err2 = p.handler.TestInsertRecord(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertRecord: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteUpdateStatementV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteUpdateStatementV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeUpdateStatementV2_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteUpdateStatementV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceExecuteUpdateStatementV2Result) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteUpdateStatementV2Result(%+v)", *p) } -type tSIServiceProcessorTestInsertStringRecord struct { - handler TSIService +// Attributes: +// - Req +type IClientRPCServiceExecuteStatementV2Args struct { + Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` } -func (p *tSIServiceProcessorTestInsertStringRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceTestInsertStringRecordArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteStatementV2Args() *IClientRPCServiceExecuteStatementV2Args { + return &IClientRPCServiceExecuteStatementV2Args{} +} + +var IClientRPCServiceExecuteStatementV2Args_Req_DEFAULT *TSExecuteStatementReq +func (p *IClientRPCServiceExecuteStatementV2Args) GetReq() *TSExecuteStatementReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteStatementV2Args_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceExecuteStatementV2Args) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteStatementV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceTestInsertStringRecordResult{} - var retval *TSStatus - if retval, err2 = p.handler.TestInsertStringRecord(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertStringRecord: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteStatementV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSExecuteStatementReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteStatementV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeStatementV2_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteStatementV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceExecuteStatementV2Args) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteStatementV2Args(%+v)", *p) } -type tSIServiceProcessorTestInsertRecords struct { - handler TSIService +// Attributes: +// - Success +type IClientRPCServiceExecuteStatementV2Result struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func (p *tSIServiceProcessorTestInsertRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceTestInsertRecordsArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteStatementV2Result() *IClientRPCServiceExecuteStatementV2Result { + return &IClientRPCServiceExecuteStatementV2Result{} +} + +var IClientRPCServiceExecuteStatementV2Result_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteStatementV2Result) GetSuccess() *TSExecuteStatementResp { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteStatementV2Result_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceExecuteStatementV2Result) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteStatementV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceTestInsertRecordsResult{} - var retval *TSStatus - if retval, err2 = p.handler.TestInsertRecords(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertRecords: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteStatementV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteStatementV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeStatementV2_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteStatementV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceExecuteStatementV2Result) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteStatementV2Result(%+v)", *p) } -type tSIServiceProcessorTestInsertRecordsOfOneDevice struct { - handler TSIService +// Attributes: +// - Req +type IClientRPCServiceExecuteRawDataQueryV2Args struct { + Req *TSRawDataQueryReq `thrift:"req,1" db:"req" json:"req"` } -func (p *tSIServiceProcessorTestInsertRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceTestInsertRecordsOfOneDeviceArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteRawDataQueryV2Args() *IClientRPCServiceExecuteRawDataQueryV2Args { + return &IClientRPCServiceExecuteRawDataQueryV2Args{} +} + +var IClientRPCServiceExecuteRawDataQueryV2Args_Req_DEFAULT *TSRawDataQueryReq +func (p *IClientRPCServiceExecuteRawDataQueryV2Args) GetReq() *TSRawDataQueryReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteRawDataQueryV2Args_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceExecuteRawDataQueryV2Args) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteRawDataQueryV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceTestInsertRecordsOfOneDeviceResult{} - var retval *TSStatus - if retval, err2 = p.handler.TestInsertRecordsOfOneDevice(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertRecordsOfOneDevice: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteRawDataQueryV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSRawDataQueryReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteRawDataQueryV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeRawDataQueryV2_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteRawDataQueryV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceExecuteRawDataQueryV2Args) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryV2Args(%+v)", *p) } -type tSIServiceProcessorTestInsertStringRecords struct { - handler TSIService +// Attributes: +// - Success +type IClientRPCServiceExecuteRawDataQueryV2Result struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func (p *tSIServiceProcessorTestInsertStringRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceTestInsertStringRecordsArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteRawDataQueryV2Result() *IClientRPCServiceExecuteRawDataQueryV2Result { + return &IClientRPCServiceExecuteRawDataQueryV2Result{} +} + +var IClientRPCServiceExecuteRawDataQueryV2Result_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteRawDataQueryV2Result) GetSuccess() *TSExecuteStatementResp { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteRawDataQueryV2Result_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceExecuteRawDataQueryV2Result) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteRawDataQueryV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceTestInsertStringRecordsResult{} - var retval *TSStatus - if retval, err2 = p.handler.TestInsertStringRecords(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testInsertStringRecords: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteRawDataQueryV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteRawDataQueryV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeRawDataQueryV2_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteRawDataQueryV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceExecuteRawDataQueryV2Result) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryV2Result(%+v)", *p) } -type tSIServiceProcessorDeleteData struct { - handler TSIService +// Attributes: +// - Req +type IClientRPCServiceExecuteLastDataQueryV2Args struct { + Req *TSLastDataQueryReq `thrift:"req,1" db:"req" json:"req"` } -func (p *tSIServiceProcessorDeleteData) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceDeleteDataArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "deleteData", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteLastDataQueryV2Args() *IClientRPCServiceExecuteLastDataQueryV2Args { + return &IClientRPCServiceExecuteLastDataQueryV2Args{} +} + +var IClientRPCServiceExecuteLastDataQueryV2Args_Req_DEFAULT *TSLastDataQueryReq +func (p *IClientRPCServiceExecuteLastDataQueryV2Args) GetReq() *TSLastDataQueryReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteLastDataQueryV2Args_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceExecuteLastDataQueryV2Args) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteLastDataQueryV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceDeleteDataResult{} - var retval *TSStatus - if retval, err2 = p.handler.DeleteData(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteData: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "deleteData", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "deleteData", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteLastDataQueryV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSLastDataQueryReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteLastDataQueryV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeLastDataQueryV2_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteLastDataQueryV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceExecuteLastDataQueryV2Args) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryV2Args(%+v)", *p) } -type tSIServiceProcessorExecuteRawDataQuery struct { - handler TSIService +// Attributes: +// - Success +type IClientRPCServiceExecuteLastDataQueryV2Result struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func (p *tSIServiceProcessorExecuteRawDataQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceExecuteRawDataQueryArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteLastDataQueryV2Result() *IClientRPCServiceExecuteLastDataQueryV2Result { + return &IClientRPCServiceExecuteLastDataQueryV2Result{} +} + +var IClientRPCServiceExecuteLastDataQueryV2Result_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) GetSuccess() *TSExecuteStatementResp { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteLastDataQueryV2Result_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceExecuteRawDataQueryResult{} - var retval *TSExecuteStatementResp - if retval, err2 = p.handler.ExecuteRawDataQuery(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeRawDataQuery: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeLastDataQueryV2_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryV2Result(%+v)", *p) } -type tSIServiceProcessorExecuteLastDataQuery struct { - handler TSIService +// Attributes: +// - Req +type IClientRPCServiceExecuteAggregationQueryV2Args struct { + Req *TSAggregationQueryReq `thrift:"req,1" db:"req" json:"req"` } -func (p *tSIServiceProcessorExecuteLastDataQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceExecuteLastDataQueryArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteAggregationQueryV2Args() *IClientRPCServiceExecuteAggregationQueryV2Args { + return &IClientRPCServiceExecuteAggregationQueryV2Args{} +} + +var IClientRPCServiceExecuteAggregationQueryV2Args_Req_DEFAULT *TSAggregationQueryReq +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) GetReq() *TSAggregationQueryReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteAggregationQueryV2Args_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceExecuteLastDataQueryResult{} - var retval *TSExecuteStatementResp - if retval, err2 = p.handler.ExecuteLastDataQuery(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeLastDataQuery: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSAggregationQueryReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeAggregationQueryV2_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryV2Args(%+v)", *p) } -type tSIServiceProcessorRequestStatementId struct { - handler TSIService +// Attributes: +// - Success +type IClientRPCServiceExecuteAggregationQueryV2Result struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func (p *tSIServiceProcessorRequestStatementId) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceRequestStatementIdArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteAggregationQueryV2Result() *IClientRPCServiceExecuteAggregationQueryV2Result { + return &IClientRPCServiceExecuteAggregationQueryV2Result{} +} + +var IClientRPCServiceExecuteAggregationQueryV2Result_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) GetSuccess() *TSExecuteStatementResp { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteAggregationQueryV2Result_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceRequestStatementIdResult{} - var retval int64 - if retval, err2 = p.handler.RequestStatementId(ctx, args.SessionId); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing requestStatementId: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = &retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeAggregationQueryV2_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryV2Result(%+v)", *p) +} + +// Attributes: +// - Req +type IClientRPCServiceFetchResultsV2Args struct { + Req *TSFetchResultsReq `thrift:"req,1" db:"req" json:"req"` } -type tSIServiceProcessorCreateSchemaTemplate struct { - handler TSIService +func NewIClientRPCServiceFetchResultsV2Args() *IClientRPCServiceFetchResultsV2Args { + return &IClientRPCServiceFetchResultsV2Args{} } -func (p *tSIServiceProcessorCreateSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceCreateSchemaTemplateArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +var IClientRPCServiceFetchResultsV2Args_Req_DEFAULT *TSFetchResultsReq +func (p *IClientRPCServiceFetchResultsV2Args) GetReq() *TSFetchResultsReq { + if !p.IsSetReq() { + return IClientRPCServiceFetchResultsV2Args_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceFetchResultsV2Args) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceFetchResultsV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceCreateSchemaTemplateResult{} - var retval *TSStatus - if retval, err2 = p.handler.CreateSchemaTemplate(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceFetchResultsV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSFetchResultsReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceFetchResultsV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fetchResultsV2_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceFetchResultsV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceFetchResultsV2Args) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceFetchResultsV2Args(%+v)", *p) } -type tSIServiceProcessorAppendSchemaTemplate struct { - handler TSIService +// Attributes: +// - Success +type IClientRPCServiceFetchResultsV2Result struct { + Success *TSFetchResultsResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func (p *tSIServiceProcessorAppendSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceAppendSchemaTemplateArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceFetchResultsV2Result() *IClientRPCServiceFetchResultsV2Result { + return &IClientRPCServiceFetchResultsV2Result{} +} + +var IClientRPCServiceFetchResultsV2Result_Success_DEFAULT *TSFetchResultsResp +func (p *IClientRPCServiceFetchResultsV2Result) GetSuccess() *TSFetchResultsResp { + if !p.IsSetSuccess() { + return IClientRPCServiceFetchResultsV2Result_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceFetchResultsV2Result) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceFetchResultsV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceAppendSchemaTemplateResult{} - var retval *TSStatus - if retval, err2 = p.handler.AppendSchemaTemplate(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing appendSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceFetchResultsV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSFetchResultsResp{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceFetchResultsV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fetchResultsV2_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceFetchResultsV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceFetchResultsV2Result) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceFetchResultsV2Result(%+v)", *p) +} + +// Attributes: +// - Req +type IClientRPCServiceOpenSessionArgs struct { + Req *TSOpenSessionReq `thrift:"req,1" db:"req" json:"req"` } -type tSIServiceProcessorPruneSchemaTemplate struct { - handler TSIService +func NewIClientRPCServiceOpenSessionArgs() *IClientRPCServiceOpenSessionArgs { + return &IClientRPCServiceOpenSessionArgs{} } -func (p *tSIServiceProcessorPruneSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServicePruneSchemaTemplateArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +var IClientRPCServiceOpenSessionArgs_Req_DEFAULT *TSOpenSessionReq +func (p *IClientRPCServiceOpenSessionArgs) GetReq() *TSOpenSessionReq { + if !p.IsSetReq() { + return IClientRPCServiceOpenSessionArgs_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceOpenSessionArgs) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceOpenSessionArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServicePruneSchemaTemplateResult{} - var retval *TSStatus - if retval, err2 = p.handler.PruneSchemaTemplate(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pruneSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceOpenSessionArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSOpenSessionReq{ + ClientProtocol: 2, +} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceOpenSessionArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "openSession_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceOpenSessionArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceOpenSessionArgs) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceOpenSessionArgs(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServiceOpenSessionResult struct { + Success *TSOpenSessionResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -type tSIServiceProcessorQuerySchemaTemplate struct { - handler TSIService +func NewIClientRPCServiceOpenSessionResult() *IClientRPCServiceOpenSessionResult { + return &IClientRPCServiceOpenSessionResult{} } -func (p *tSIServiceProcessorQuerySchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceQuerySchemaTemplateArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +var IClientRPCServiceOpenSessionResult_Success_DEFAULT *TSOpenSessionResp +func (p *IClientRPCServiceOpenSessionResult) GetSuccess() *TSOpenSessionResp { + if !p.IsSetSuccess() { + return IClientRPCServiceOpenSessionResult_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceOpenSessionResult) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceOpenSessionResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceQuerySchemaTemplateResult{} - var retval *TSQueryTemplateResp - if retval, err2 = p.handler.QuerySchemaTemplate(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing querySchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceOpenSessionResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSOpenSessionResp{ + ServerProtocolVersion: 0, +} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceOpenSessionResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "openSession_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceOpenSessionResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceOpenSessionResult) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceOpenSessionResult(%+v)", *p) } -type tSIServiceProcessorSetSchemaTemplate struct { - handler TSIService +// Attributes: +// - Req +type IClientRPCServiceCloseSessionArgs struct { + Req *TSCloseSessionReq `thrift:"req,1" db:"req" json:"req"` } -func (p *tSIServiceProcessorSetSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceSetSchemaTemplateArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceCloseSessionArgs() *IClientRPCServiceCloseSessionArgs { + return &IClientRPCServiceCloseSessionArgs{} +} + +var IClientRPCServiceCloseSessionArgs_Req_DEFAULT *TSCloseSessionReq +func (p *IClientRPCServiceCloseSessionArgs) GetReq() *TSCloseSessionReq { + if !p.IsSetReq() { + return IClientRPCServiceCloseSessionArgs_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceCloseSessionArgs) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceCloseSessionArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceSetSchemaTemplateResult{} - var retval *TSStatus - if retval, err2 = p.handler.SetSchemaTemplate(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceCloseSessionArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSCloseSessionReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceCloseSessionArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "closeSession_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceCloseSessionArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceCloseSessionArgs) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceCloseSessionArgs(%+v)", *p) } -type tSIServiceProcessorUnsetSchemaTemplate struct { - handler TSIService +// Attributes: +// - Success +type IClientRPCServiceCloseSessionResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func (p *tSIServiceProcessorUnsetSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceUnsetSchemaTemplateArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceCloseSessionResult() *IClientRPCServiceCloseSessionResult { + return &IClientRPCServiceCloseSessionResult{} +} + +var IClientRPCServiceCloseSessionResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceCloseSessionResult) GetSuccess() *common.TSStatus { + if !p.IsSetSuccess() { + return IClientRPCServiceCloseSessionResult_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceCloseSessionResult) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceCloseSessionResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceUnsetSchemaTemplateResult{} - var retval *TSStatus - if retval, err2 = p.handler.UnsetSchemaTemplate(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing unsetSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceCloseSessionResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceCloseSessionResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "closeSession_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceCloseSessionResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceCloseSessionResult) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceCloseSessionResult(%+v)", *p) } -type tSIServiceProcessorSetUsingTemplate struct { - handler TSIService +// Attributes: +// - Req +type IClientRPCServiceExecuteStatementArgs struct { + Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` } -func (p *tSIServiceProcessorSetUsingTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceSetUsingTemplateArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "setUsingTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteStatementArgs() *IClientRPCServiceExecuteStatementArgs { + return &IClientRPCServiceExecuteStatementArgs{} +} + +var IClientRPCServiceExecuteStatementArgs_Req_DEFAULT *TSExecuteStatementReq +func (p *IClientRPCServiceExecuteStatementArgs) GetReq() *TSExecuteStatementReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteStatementArgs_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceExecuteStatementArgs) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceSetUsingTemplateResult{} - var retval *TSStatus - if retval, err2 = p.handler.SetUsingTemplate(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setUsingTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "setUsingTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "setUsingTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSExecuteStatementReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeStatement_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceExecuteStatementArgs) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteStatementArgs(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServiceExecuteStatementResult struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -type tSIServiceProcessorUnsetUsingTemplate struct { - handler TSIService +func NewIClientRPCServiceExecuteStatementResult() *IClientRPCServiceExecuteStatementResult { + return &IClientRPCServiceExecuteStatementResult{} } -func (p *tSIServiceProcessorUnsetUsingTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceUnsetUsingTemplateArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "unsetUsingTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +var IClientRPCServiceExecuteStatementResult_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteStatementResult) GetSuccess() *TSExecuteStatementResp { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteStatementResult_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceExecuteStatementResult) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceUnsetUsingTemplateResult{} - var retval *TSStatus - if retval, err2 = p.handler.UnsetUsingTemplate(ctx, args.SessionId, args.TemplateName, args.PrefixPath); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing unsetUsingTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "unsetUsingTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "unsetUsingTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeStatement_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } - if err != nil { - return + return err +} + +func (p *IClientRPCServiceExecuteStatementResult) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteStatementResult(%+v)", *p) } -type tSIServiceProcessorDropSchemaTemplate struct { - handler TSIService +// Attributes: +// - Req +type IClientRPCServiceExecuteBatchStatementArgs struct { + Req *TSExecuteBatchStatementReq `thrift:"req,1" db:"req" json:"req"` } -func (p *tSIServiceProcessorDropSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceDropSchemaTemplateArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteBatchStatementArgs() *IClientRPCServiceExecuteBatchStatementArgs { + return &IClientRPCServiceExecuteBatchStatementArgs{} +} + +var IClientRPCServiceExecuteBatchStatementArgs_Req_DEFAULT *TSExecuteBatchStatementReq +func (p *IClientRPCServiceExecuteBatchStatementArgs) GetReq() *TSExecuteBatchStatementReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteBatchStatementArgs_Req_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Req +} +func (p *IClientRPCServiceExecuteBatchStatementArgs) IsSetReq() bool { + return p.Req != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteBatchStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceDropSchemaTemplateResult{} - var retval *TSStatus - if retval, err2 = p.handler.DropSchemaTemplate(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing dropSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteBatchStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSExecuteBatchStatementReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteBatchStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeBatchStatement_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceExecuteBatchStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } - if err != nil { - return + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return err +} + +func (p *IClientRPCServiceExecuteBatchStatementArgs) String() string { + if p == nil { + return "" } - return true, err + return fmt.Sprintf("IClientRPCServiceExecuteBatchStatementArgs(%+v)", *p) } -type tSIServiceProcessorExecuteOperationSync struct { - handler TSIService +// Attributes: +// - Success +type IClientRPCServiceExecuteBatchStatementResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func (p *tSIServiceProcessorExecuteOperationSync) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := TSIServiceExecuteOperationSyncArgs{} - var err2 error - if err2 = args.Read(ctx, iprot); err2 != nil { - iprot.ReadMessageEnd(ctx) - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) - oprot.WriteMessageBegin(ctx, "executeOperationSync", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return false, thrift.WrapTException(err2) +func NewIClientRPCServiceExecuteBatchStatementResult() *IClientRPCServiceExecuteBatchStatementResult { + return &IClientRPCServiceExecuteBatchStatementResult{} +} + +var IClientRPCServiceExecuteBatchStatementResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceExecuteBatchStatementResult) GetSuccess() *common.TSStatus { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteBatchStatementResult_Success_DEFAULT } - iprot.ReadMessageEnd(ctx) +return p.Success +} +func (p *IClientRPCServiceExecuteBatchStatementResult) IsSetSuccess() bool { + return p.Success != nil +} - tickerCancel := func() {} - // Start a goroutine to do server side connectivity check. - if thrift.ServerConnectivityCheckInterval > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - var tickerCtx context.Context - tickerCtx, tickerCancel = context.WithCancel(context.Background()) - defer tickerCancel() - go func(ctx context.Context, cancel context.CancelFunc) { - ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) - defer ticker.Stop() - for { - select { - case <-ctx.Done(): - return - case <-ticker.C: - if !iprot.Transport().IsOpen() { - cancel() - return - } - } - } - }(tickerCtx, cancel) +func (p *IClientRPCServiceExecuteBatchStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - result := TSIServiceExecuteOperationSyncResult{} - var retval *TSStatus - if retval, err2 = p.handler.ExecuteOperationSync(ctx, args.Req); err2 != nil { - tickerCancel() - if err2 == thrift.ErrAbandonRequest { - return false, thrift.WrapTException(err2) + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeOperationSync: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeOperationSync", thrift.EXCEPTION, seqId) - x.Write(ctx, oprot) - oprot.WriteMessageEnd(ctx) - oprot.Flush(ctx) - return true, thrift.WrapTException(err2) - } else { - result.Success = retval - } - tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeOperationSync", thrift.REPLY, seqId); err2 != nil { - err = thrift.WrapTException(err2) - } - if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { - err = thrift.WrapTException(err2) } - if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err2 = oprot.Flush(ctx); err == nil && err2 != nil { - err = thrift.WrapTException(err2) + return nil +} + +func (p *IClientRPCServiceExecuteBatchStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } - if err != nil { - return + return nil +} + +func (p *IClientRPCServiceExecuteBatchStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeBatchStatement_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } } - return true, err + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil } +func (p *IClientRPCServiceExecuteBatchStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} -// HELPER FUNCTIONS AND STRUCTURES +func (p *IClientRPCServiceExecuteBatchStatementResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceExecuteBatchStatementResult(%+v)", *p) +} // Attributes: // - Req -type TSIServiceOpenSessionArgs struct { - Req *TSOpenSessionReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceExecuteQueryStatementArgs struct { + Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceOpenSessionArgs() *TSIServiceOpenSessionArgs { - return &TSIServiceOpenSessionArgs{} +func NewIClientRPCServiceExecuteQueryStatementArgs() *IClientRPCServiceExecuteQueryStatementArgs { + return &IClientRPCServiceExecuteQueryStatementArgs{} } -var TSIServiceOpenSessionArgs_Req_DEFAULT *TSOpenSessionReq -func (p *TSIServiceOpenSessionArgs) GetReq() *TSOpenSessionReq { +var IClientRPCServiceExecuteQueryStatementArgs_Req_DEFAULT *TSExecuteStatementReq +func (p *IClientRPCServiceExecuteQueryStatementArgs) GetReq() *TSExecuteStatementReq { if !p.IsSetReq() { - return TSIServiceOpenSessionArgs_Req_DEFAULT + return IClientRPCServiceExecuteQueryStatementArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceOpenSessionArgs) IsSetReq() bool { +func (p *IClientRPCServiceExecuteQueryStatementArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceOpenSessionArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteQueryStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -19716,18 +25282,16 @@ func (p *TSIServiceOpenSessionArgs) Read(ctx context.Context, iprot thrift.TProt return nil } -func (p *TSIServiceOpenSessionArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSOpenSessionReq{ - ClientProtocol: 2, -} +func (p *IClientRPCServiceExecuteQueryStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSExecuteStatementReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceOpenSessionArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "openSession_args"); err != nil { +func (p *IClientRPCServiceExecuteQueryStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeQueryStatement_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -19739,7 +25303,7 @@ func (p *TSIServiceOpenSessionArgs) Write(ctx context.Context, oprot thrift.TPro return nil } -func (p *TSIServiceOpenSessionArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteQueryStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -19750,35 +25314,35 @@ func (p *TSIServiceOpenSessionArgs) writeField1(ctx context.Context, oprot thrif return err } -func (p *TSIServiceOpenSessionArgs) String() string { +func (p *IClientRPCServiceExecuteQueryStatementArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceOpenSessionArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteQueryStatementArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceOpenSessionResult struct { - Success *TSOpenSessionResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceExecuteQueryStatementResult struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceOpenSessionResult() *TSIServiceOpenSessionResult { - return &TSIServiceOpenSessionResult{} +func NewIClientRPCServiceExecuteQueryStatementResult() *IClientRPCServiceExecuteQueryStatementResult { + return &IClientRPCServiceExecuteQueryStatementResult{} } -var TSIServiceOpenSessionResult_Success_DEFAULT *TSOpenSessionResp -func (p *TSIServiceOpenSessionResult) GetSuccess() *TSOpenSessionResp { +var IClientRPCServiceExecuteQueryStatementResult_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteQueryStatementResult) GetSuccess() *TSExecuteStatementResp { if !p.IsSetSuccess() { - return TSIServiceOpenSessionResult_Success_DEFAULT + return IClientRPCServiceExecuteQueryStatementResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceOpenSessionResult) IsSetSuccess() bool { +func (p *IClientRPCServiceExecuteQueryStatementResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceOpenSessionResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteQueryStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -19816,18 +25380,16 @@ func (p *TSIServiceOpenSessionResult) Read(ctx context.Context, iprot thrift.TPr return nil } -func (p *TSIServiceOpenSessionResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSOpenSessionResp{ - ServerProtocolVersion: 0, -} +func (p *IClientRPCServiceExecuteQueryStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceOpenSessionResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "openSession_result"); err != nil { +func (p *IClientRPCServiceExecuteQueryStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeQueryStatement_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -19839,7 +25401,7 @@ func (p *TSIServiceOpenSessionResult) Write(ctx context.Context, oprot thrift.TP return nil } -func (p *TSIServiceOpenSessionResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteQueryStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -19852,35 +25414,35 @@ func (p *TSIServiceOpenSessionResult) writeField0(ctx context.Context, oprot thr return err } -func (p *TSIServiceOpenSessionResult) String() string { +func (p *IClientRPCServiceExecuteQueryStatementResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceOpenSessionResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteQueryStatementResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceCloseSessionArgs struct { - Req *TSCloseSessionReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceExecuteUpdateStatementArgs struct { + Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceCloseSessionArgs() *TSIServiceCloseSessionArgs { - return &TSIServiceCloseSessionArgs{} +func NewIClientRPCServiceExecuteUpdateStatementArgs() *IClientRPCServiceExecuteUpdateStatementArgs { + return &IClientRPCServiceExecuteUpdateStatementArgs{} } -var TSIServiceCloseSessionArgs_Req_DEFAULT *TSCloseSessionReq -func (p *TSIServiceCloseSessionArgs) GetReq() *TSCloseSessionReq { +var IClientRPCServiceExecuteUpdateStatementArgs_Req_DEFAULT *TSExecuteStatementReq +func (p *IClientRPCServiceExecuteUpdateStatementArgs) GetReq() *TSExecuteStatementReq { if !p.IsSetReq() { - return TSIServiceCloseSessionArgs_Req_DEFAULT + return IClientRPCServiceExecuteUpdateStatementArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceCloseSessionArgs) IsSetReq() bool { +func (p *IClientRPCServiceExecuteUpdateStatementArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceCloseSessionArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteUpdateStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -19918,16 +25480,16 @@ func (p *TSIServiceCloseSessionArgs) Read(ctx context.Context, iprot thrift.TPro return nil } -func (p *TSIServiceCloseSessionArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSCloseSessionReq{} +func (p *IClientRPCServiceExecuteUpdateStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSExecuteStatementReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceCloseSessionArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "closeSession_args"); err != nil { +func (p *IClientRPCServiceExecuteUpdateStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeUpdateStatement_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -19939,7 +25501,7 @@ func (p *TSIServiceCloseSessionArgs) Write(ctx context.Context, oprot thrift.TPr return nil } -func (p *TSIServiceCloseSessionArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteUpdateStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -19950,35 +25512,35 @@ func (p *TSIServiceCloseSessionArgs) writeField1(ctx context.Context, oprot thri return err } -func (p *TSIServiceCloseSessionArgs) String() string { +func (p *IClientRPCServiceExecuteUpdateStatementArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCloseSessionArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteUpdateStatementArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceCloseSessionResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceExecuteUpdateStatementResult struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceCloseSessionResult() *TSIServiceCloseSessionResult { - return &TSIServiceCloseSessionResult{} +func NewIClientRPCServiceExecuteUpdateStatementResult() *IClientRPCServiceExecuteUpdateStatementResult { + return &IClientRPCServiceExecuteUpdateStatementResult{} } -var TSIServiceCloseSessionResult_Success_DEFAULT *TSStatus -func (p *TSIServiceCloseSessionResult) GetSuccess() *TSStatus { +var IClientRPCServiceExecuteUpdateStatementResult_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteUpdateStatementResult) GetSuccess() *TSExecuteStatementResp { if !p.IsSetSuccess() { - return TSIServiceCloseSessionResult_Success_DEFAULT + return IClientRPCServiceExecuteUpdateStatementResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceCloseSessionResult) IsSetSuccess() bool { +func (p *IClientRPCServiceExecuteUpdateStatementResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceCloseSessionResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteUpdateStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20016,16 +25578,16 @@ func (p *TSIServiceCloseSessionResult) Read(ctx context.Context, iprot thrift.TP return nil } -func (p *TSIServiceCloseSessionResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceExecuteUpdateStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceCloseSessionResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "closeSession_result"); err != nil { +func (p *IClientRPCServiceExecuteUpdateStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeUpdateStatement_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -20037,7 +25599,7 @@ func (p *TSIServiceCloseSessionResult) Write(ctx context.Context, oprot thrift.T return nil } -func (p *TSIServiceCloseSessionResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteUpdateStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -20050,35 +25612,35 @@ func (p *TSIServiceCloseSessionResult) writeField0(ctx context.Context, oprot th return err } -func (p *TSIServiceCloseSessionResult) String() string { +func (p *IClientRPCServiceExecuteUpdateStatementResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCloseSessionResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteUpdateStatementResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceExecuteStatementArgs struct { - Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceFetchResultsArgs struct { + Req *TSFetchResultsReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceExecuteStatementArgs() *TSIServiceExecuteStatementArgs { - return &TSIServiceExecuteStatementArgs{} +func NewIClientRPCServiceFetchResultsArgs() *IClientRPCServiceFetchResultsArgs { + return &IClientRPCServiceFetchResultsArgs{} } -var TSIServiceExecuteStatementArgs_Req_DEFAULT *TSExecuteStatementReq -func (p *TSIServiceExecuteStatementArgs) GetReq() *TSExecuteStatementReq { +var IClientRPCServiceFetchResultsArgs_Req_DEFAULT *TSFetchResultsReq +func (p *IClientRPCServiceFetchResultsArgs) GetReq() *TSFetchResultsReq { if !p.IsSetReq() { - return TSIServiceExecuteStatementArgs_Req_DEFAULT + return IClientRPCServiceFetchResultsArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceExecuteStatementArgs) IsSetReq() bool { +func (p *IClientRPCServiceFetchResultsArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceExecuteStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceFetchResultsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20116,16 +25678,16 @@ func (p *TSIServiceExecuteStatementArgs) Read(ctx context.Context, iprot thrift. return nil } -func (p *TSIServiceExecuteStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSExecuteStatementReq{} +func (p *IClientRPCServiceFetchResultsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSFetchResultsReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceExecuteStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeStatement_args"); err != nil { +func (p *IClientRPCServiceFetchResultsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fetchResults_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -20137,7 +25699,7 @@ func (p *TSIServiceExecuteStatementArgs) Write(ctx context.Context, oprot thrift return nil } -func (p *TSIServiceExecuteStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceFetchResultsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -20148,35 +25710,35 @@ func (p *TSIServiceExecuteStatementArgs) writeField1(ctx context.Context, oprot return err } -func (p *TSIServiceExecuteStatementArgs) String() string { +func (p *IClientRPCServiceFetchResultsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteStatementArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFetchResultsArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceExecuteStatementResult struct { - Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceFetchResultsResult struct { + Success *TSFetchResultsResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceExecuteStatementResult() *TSIServiceExecuteStatementResult { - return &TSIServiceExecuteStatementResult{} +func NewIClientRPCServiceFetchResultsResult() *IClientRPCServiceFetchResultsResult { + return &IClientRPCServiceFetchResultsResult{} } -var TSIServiceExecuteStatementResult_Success_DEFAULT *TSExecuteStatementResp -func (p *TSIServiceExecuteStatementResult) GetSuccess() *TSExecuteStatementResp { +var IClientRPCServiceFetchResultsResult_Success_DEFAULT *TSFetchResultsResp +func (p *IClientRPCServiceFetchResultsResult) GetSuccess() *TSFetchResultsResp { if !p.IsSetSuccess() { - return TSIServiceExecuteStatementResult_Success_DEFAULT + return IClientRPCServiceFetchResultsResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceExecuteStatementResult) IsSetSuccess() bool { +func (p *IClientRPCServiceFetchResultsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceExecuteStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceFetchResultsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20214,16 +25776,16 @@ func (p *TSIServiceExecuteStatementResult) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceExecuteStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSExecuteStatementResp{} +func (p *IClientRPCServiceFetchResultsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSFetchResultsResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceExecuteStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeStatement_result"); err != nil { +func (p *IClientRPCServiceFetchResultsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fetchResults_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -20235,7 +25797,7 @@ func (p *TSIServiceExecuteStatementResult) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceExecuteStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceFetchResultsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -20248,35 +25810,35 @@ func (p *TSIServiceExecuteStatementResult) writeField0(ctx context.Context, opro return err } -func (p *TSIServiceExecuteStatementResult) String() string { +func (p *IClientRPCServiceFetchResultsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteStatementResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFetchResultsResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceExecuteBatchStatementArgs struct { - Req *TSExecuteBatchStatementReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceFetchMetadataArgs struct { + Req *TSFetchMetadataReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceExecuteBatchStatementArgs() *TSIServiceExecuteBatchStatementArgs { - return &TSIServiceExecuteBatchStatementArgs{} +func NewIClientRPCServiceFetchMetadataArgs() *IClientRPCServiceFetchMetadataArgs { + return &IClientRPCServiceFetchMetadataArgs{} } -var TSIServiceExecuteBatchStatementArgs_Req_DEFAULT *TSExecuteBatchStatementReq -func (p *TSIServiceExecuteBatchStatementArgs) GetReq() *TSExecuteBatchStatementReq { +var IClientRPCServiceFetchMetadataArgs_Req_DEFAULT *TSFetchMetadataReq +func (p *IClientRPCServiceFetchMetadataArgs) GetReq() *TSFetchMetadataReq { if !p.IsSetReq() { - return TSIServiceExecuteBatchStatementArgs_Req_DEFAULT + return IClientRPCServiceFetchMetadataArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceExecuteBatchStatementArgs) IsSetReq() bool { +func (p *IClientRPCServiceFetchMetadataArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceExecuteBatchStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceFetchMetadataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20314,16 +25876,16 @@ func (p *TSIServiceExecuteBatchStatementArgs) Read(ctx context.Context, iprot th return nil } -func (p *TSIServiceExecuteBatchStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSExecuteBatchStatementReq{} +func (p *IClientRPCServiceFetchMetadataArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSFetchMetadataReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceExecuteBatchStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeBatchStatement_args"); err != nil { +func (p *IClientRPCServiceFetchMetadataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fetchMetadata_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -20335,7 +25897,7 @@ func (p *TSIServiceExecuteBatchStatementArgs) Write(ctx context.Context, oprot t return nil } -func (p *TSIServiceExecuteBatchStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceFetchMetadataArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -20346,35 +25908,35 @@ func (p *TSIServiceExecuteBatchStatementArgs) writeField1(ctx context.Context, o return err } -func (p *TSIServiceExecuteBatchStatementArgs) String() string { +func (p *IClientRPCServiceFetchMetadataArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteBatchStatementArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFetchMetadataArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceExecuteBatchStatementResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceFetchMetadataResult struct { + Success *TSFetchMetadataResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceExecuteBatchStatementResult() *TSIServiceExecuteBatchStatementResult { - return &TSIServiceExecuteBatchStatementResult{} +func NewIClientRPCServiceFetchMetadataResult() *IClientRPCServiceFetchMetadataResult { + return &IClientRPCServiceFetchMetadataResult{} } -var TSIServiceExecuteBatchStatementResult_Success_DEFAULT *TSStatus -func (p *TSIServiceExecuteBatchStatementResult) GetSuccess() *TSStatus { +var IClientRPCServiceFetchMetadataResult_Success_DEFAULT *TSFetchMetadataResp +func (p *IClientRPCServiceFetchMetadataResult) GetSuccess() *TSFetchMetadataResp { if !p.IsSetSuccess() { - return TSIServiceExecuteBatchStatementResult_Success_DEFAULT + return IClientRPCServiceFetchMetadataResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceExecuteBatchStatementResult) IsSetSuccess() bool { +func (p *IClientRPCServiceFetchMetadataResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceExecuteBatchStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceFetchMetadataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20412,16 +25974,16 @@ func (p *TSIServiceExecuteBatchStatementResult) Read(ctx context.Context, iprot return nil } -func (p *TSIServiceExecuteBatchStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceFetchMetadataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSFetchMetadataResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceExecuteBatchStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeBatchStatement_result"); err != nil { +func (p *IClientRPCServiceFetchMetadataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fetchMetadata_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -20433,7 +25995,7 @@ func (p *TSIServiceExecuteBatchStatementResult) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceExecuteBatchStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceFetchMetadataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -20446,35 +26008,35 @@ func (p *TSIServiceExecuteBatchStatementResult) writeField0(ctx context.Context, return err } -func (p *TSIServiceExecuteBatchStatementResult) String() string { +func (p *IClientRPCServiceFetchMetadataResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteBatchStatementResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFetchMetadataResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceExecuteQueryStatementArgs struct { - Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceCancelOperationArgs struct { + Req *TSCancelOperationReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceExecuteQueryStatementArgs() *TSIServiceExecuteQueryStatementArgs { - return &TSIServiceExecuteQueryStatementArgs{} +func NewIClientRPCServiceCancelOperationArgs() *IClientRPCServiceCancelOperationArgs { + return &IClientRPCServiceCancelOperationArgs{} } -var TSIServiceExecuteQueryStatementArgs_Req_DEFAULT *TSExecuteStatementReq -func (p *TSIServiceExecuteQueryStatementArgs) GetReq() *TSExecuteStatementReq { +var IClientRPCServiceCancelOperationArgs_Req_DEFAULT *TSCancelOperationReq +func (p *IClientRPCServiceCancelOperationArgs) GetReq() *TSCancelOperationReq { if !p.IsSetReq() { - return TSIServiceExecuteQueryStatementArgs_Req_DEFAULT + return IClientRPCServiceCancelOperationArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceExecuteQueryStatementArgs) IsSetReq() bool { +func (p *IClientRPCServiceCancelOperationArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceExecuteQueryStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCancelOperationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20512,16 +26074,16 @@ func (p *TSIServiceExecuteQueryStatementArgs) Read(ctx context.Context, iprot th return nil } -func (p *TSIServiceExecuteQueryStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSExecuteStatementReq{} +func (p *IClientRPCServiceCancelOperationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSCancelOperationReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceExecuteQueryStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeQueryStatement_args"); err != nil { +func (p *IClientRPCServiceCancelOperationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "cancelOperation_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -20533,7 +26095,7 @@ func (p *TSIServiceExecuteQueryStatementArgs) Write(ctx context.Context, oprot t return nil } -func (p *TSIServiceExecuteQueryStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCancelOperationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -20544,35 +26106,35 @@ func (p *TSIServiceExecuteQueryStatementArgs) writeField1(ctx context.Context, o return err } -func (p *TSIServiceExecuteQueryStatementArgs) String() string { +func (p *IClientRPCServiceCancelOperationArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteQueryStatementArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCancelOperationArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceExecuteQueryStatementResult struct { - Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceCancelOperationResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceExecuteQueryStatementResult() *TSIServiceExecuteQueryStatementResult { - return &TSIServiceExecuteQueryStatementResult{} +func NewIClientRPCServiceCancelOperationResult() *IClientRPCServiceCancelOperationResult { + return &IClientRPCServiceCancelOperationResult{} } -var TSIServiceExecuteQueryStatementResult_Success_DEFAULT *TSExecuteStatementResp -func (p *TSIServiceExecuteQueryStatementResult) GetSuccess() *TSExecuteStatementResp { +var IClientRPCServiceCancelOperationResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceCancelOperationResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceExecuteQueryStatementResult_Success_DEFAULT + return IClientRPCServiceCancelOperationResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceExecuteQueryStatementResult) IsSetSuccess() bool { +func (p *IClientRPCServiceCancelOperationResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceExecuteQueryStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCancelOperationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20610,16 +26172,16 @@ func (p *TSIServiceExecuteQueryStatementResult) Read(ctx context.Context, iprot return nil } -func (p *TSIServiceExecuteQueryStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSExecuteStatementResp{} +func (p *IClientRPCServiceCancelOperationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceExecuteQueryStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeQueryStatement_result"); err != nil { +func (p *IClientRPCServiceCancelOperationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "cancelOperation_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -20631,7 +26193,7 @@ func (p *TSIServiceExecuteQueryStatementResult) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceExecuteQueryStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCancelOperationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -20644,35 +26206,35 @@ func (p *TSIServiceExecuteQueryStatementResult) writeField0(ctx context.Context, return err } -func (p *TSIServiceExecuteQueryStatementResult) String() string { +func (p *IClientRPCServiceCancelOperationResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteQueryStatementResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCancelOperationResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceExecuteUpdateStatementArgs struct { - Req *TSExecuteStatementReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceCloseOperationArgs struct { + Req *TSCloseOperationReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceExecuteUpdateStatementArgs() *TSIServiceExecuteUpdateStatementArgs { - return &TSIServiceExecuteUpdateStatementArgs{} +func NewIClientRPCServiceCloseOperationArgs() *IClientRPCServiceCloseOperationArgs { + return &IClientRPCServiceCloseOperationArgs{} } -var TSIServiceExecuteUpdateStatementArgs_Req_DEFAULT *TSExecuteStatementReq -func (p *TSIServiceExecuteUpdateStatementArgs) GetReq() *TSExecuteStatementReq { +var IClientRPCServiceCloseOperationArgs_Req_DEFAULT *TSCloseOperationReq +func (p *IClientRPCServiceCloseOperationArgs) GetReq() *TSCloseOperationReq { if !p.IsSetReq() { - return TSIServiceExecuteUpdateStatementArgs_Req_DEFAULT + return IClientRPCServiceCloseOperationArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceExecuteUpdateStatementArgs) IsSetReq() bool { +func (p *IClientRPCServiceCloseOperationArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceExecuteUpdateStatementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCloseOperationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20710,16 +26272,16 @@ func (p *TSIServiceExecuteUpdateStatementArgs) Read(ctx context.Context, iprot t return nil } -func (p *TSIServiceExecuteUpdateStatementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSExecuteStatementReq{} +func (p *IClientRPCServiceCloseOperationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSCloseOperationReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceExecuteUpdateStatementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeUpdateStatement_args"); err != nil { +func (p *IClientRPCServiceCloseOperationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "closeOperation_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -20731,7 +26293,7 @@ func (p *TSIServiceExecuteUpdateStatementArgs) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceExecuteUpdateStatementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCloseOperationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -20742,35 +26304,226 @@ func (p *TSIServiceExecuteUpdateStatementArgs) writeField1(ctx context.Context, return err } -func (p *TSIServiceExecuteUpdateStatementArgs) String() string { +func (p *IClientRPCServiceCloseOperationArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceCloseOperationArgs(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServiceCloseOperationResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewIClientRPCServiceCloseOperationResult() *IClientRPCServiceCloseOperationResult { + return &IClientRPCServiceCloseOperationResult{} +} + +var IClientRPCServiceCloseOperationResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceCloseOperationResult) GetSuccess() *common.TSStatus { + if !p.IsSetSuccess() { + return IClientRPCServiceCloseOperationResult_Success_DEFAULT + } +return p.Success +} +func (p *IClientRPCServiceCloseOperationResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *IClientRPCServiceCloseOperationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *IClientRPCServiceCloseOperationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *IClientRPCServiceCloseOperationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "closeOperation_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceCloseOperationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *IClientRPCServiceCloseOperationResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceCloseOperationResult(%+v)", *p) +} + +// Attributes: +// - SessionId +type IClientRPCServiceGetTimeZoneArgs struct { + SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` +} + +func NewIClientRPCServiceGetTimeZoneArgs() *IClientRPCServiceGetTimeZoneArgs { + return &IClientRPCServiceGetTimeZoneArgs{} +} + + +func (p *IClientRPCServiceGetTimeZoneArgs) GetSessionId() int64 { + return p.SessionId +} +func (p *IClientRPCServiceGetTimeZoneArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *IClientRPCServiceGetTimeZoneArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.SessionId = v +} + return nil +} + +func (p *IClientRPCServiceGetTimeZoneArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTimeZone_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServiceGetTimeZoneArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } + return err +} + +func (p *IClientRPCServiceGetTimeZoneArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteUpdateStatementArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceGetTimeZoneArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceExecuteUpdateStatementResult struct { - Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceGetTimeZoneResult struct { + Success *TSGetTimeZoneResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceExecuteUpdateStatementResult() *TSIServiceExecuteUpdateStatementResult { - return &TSIServiceExecuteUpdateStatementResult{} +func NewIClientRPCServiceGetTimeZoneResult() *IClientRPCServiceGetTimeZoneResult { + return &IClientRPCServiceGetTimeZoneResult{} } -var TSIServiceExecuteUpdateStatementResult_Success_DEFAULT *TSExecuteStatementResp -func (p *TSIServiceExecuteUpdateStatementResult) GetSuccess() *TSExecuteStatementResp { +var IClientRPCServiceGetTimeZoneResult_Success_DEFAULT *TSGetTimeZoneResp +func (p *IClientRPCServiceGetTimeZoneResult) GetSuccess() *TSGetTimeZoneResp { if !p.IsSetSuccess() { - return TSIServiceExecuteUpdateStatementResult_Success_DEFAULT + return IClientRPCServiceGetTimeZoneResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceExecuteUpdateStatementResult) IsSetSuccess() bool { +func (p *IClientRPCServiceGetTimeZoneResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceExecuteUpdateStatementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceGetTimeZoneResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20808,16 +26561,16 @@ func (p *TSIServiceExecuteUpdateStatementResult) Read(ctx context.Context, iprot return nil } -func (p *TSIServiceExecuteUpdateStatementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSExecuteStatementResp{} +func (p *IClientRPCServiceGetTimeZoneResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSGetTimeZoneResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceExecuteUpdateStatementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeUpdateStatement_result"); err != nil { +func (p *IClientRPCServiceGetTimeZoneResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTimeZone_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -20829,7 +26582,7 @@ func (p *TSIServiceExecuteUpdateStatementResult) Write(ctx context.Context, opro return nil } -func (p *TSIServiceExecuteUpdateStatementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceGetTimeZoneResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -20842,35 +26595,35 @@ func (p *TSIServiceExecuteUpdateStatementResult) writeField0(ctx context.Context return err } -func (p *TSIServiceExecuteUpdateStatementResult) String() string { +func (p *IClientRPCServiceGetTimeZoneResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteUpdateStatementResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceGetTimeZoneResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceFetchResultsArgs struct { - Req *TSFetchResultsReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceSetTimeZoneArgs struct { + Req *TSSetTimeZoneReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceFetchResultsArgs() *TSIServiceFetchResultsArgs { - return &TSIServiceFetchResultsArgs{} +func NewIClientRPCServiceSetTimeZoneArgs() *IClientRPCServiceSetTimeZoneArgs { + return &IClientRPCServiceSetTimeZoneArgs{} } -var TSIServiceFetchResultsArgs_Req_DEFAULT *TSFetchResultsReq -func (p *TSIServiceFetchResultsArgs) GetReq() *TSFetchResultsReq { +var IClientRPCServiceSetTimeZoneArgs_Req_DEFAULT *TSSetTimeZoneReq +func (p *IClientRPCServiceSetTimeZoneArgs) GetReq() *TSSetTimeZoneReq { if !p.IsSetReq() { - return TSIServiceFetchResultsArgs_Req_DEFAULT + return IClientRPCServiceSetTimeZoneArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceFetchResultsArgs) IsSetReq() bool { +func (p *IClientRPCServiceSetTimeZoneArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceFetchResultsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceSetTimeZoneArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -20908,16 +26661,16 @@ func (p *TSIServiceFetchResultsArgs) Read(ctx context.Context, iprot thrift.TPro return nil } -func (p *TSIServiceFetchResultsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSFetchResultsReq{} +func (p *IClientRPCServiceSetTimeZoneArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSSetTimeZoneReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceFetchResultsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "fetchResults_args"); err != nil { +func (p *IClientRPCServiceSetTimeZoneArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "setTimeZone_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -20929,7 +26682,7 @@ func (p *TSIServiceFetchResultsArgs) Write(ctx context.Context, oprot thrift.TPr return nil } -func (p *TSIServiceFetchResultsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceSetTimeZoneArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -20940,35 +26693,35 @@ func (p *TSIServiceFetchResultsArgs) writeField1(ctx context.Context, oprot thri return err } -func (p *TSIServiceFetchResultsArgs) String() string { +func (p *IClientRPCServiceSetTimeZoneArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceFetchResultsArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceSetTimeZoneArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceFetchResultsResult struct { - Success *TSFetchResultsResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceSetTimeZoneResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceFetchResultsResult() *TSIServiceFetchResultsResult { - return &TSIServiceFetchResultsResult{} +func NewIClientRPCServiceSetTimeZoneResult() *IClientRPCServiceSetTimeZoneResult { + return &IClientRPCServiceSetTimeZoneResult{} } -var TSIServiceFetchResultsResult_Success_DEFAULT *TSFetchResultsResp -func (p *TSIServiceFetchResultsResult) GetSuccess() *TSFetchResultsResp { +var IClientRPCServiceSetTimeZoneResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceSetTimeZoneResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceFetchResultsResult_Success_DEFAULT + return IClientRPCServiceSetTimeZoneResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceFetchResultsResult) IsSetSuccess() bool { +func (p *IClientRPCServiceSetTimeZoneResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceFetchResultsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceSetTimeZoneResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21006,16 +26759,16 @@ func (p *TSIServiceFetchResultsResult) Read(ctx context.Context, iprot thrift.TP return nil } -func (p *TSIServiceFetchResultsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSFetchResultsResp{} +func (p *IClientRPCServiceSetTimeZoneResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceFetchResultsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "fetchResults_result"); err != nil { +func (p *IClientRPCServiceSetTimeZoneResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "setTimeZone_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -21027,7 +26780,7 @@ func (p *TSIServiceFetchResultsResult) Write(ctx context.Context, oprot thrift.T return nil } -func (p *TSIServiceFetchResultsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceSetTimeZoneResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -21040,35 +26793,21 @@ func (p *TSIServiceFetchResultsResult) writeField0(ctx context.Context, oprot th return err } -func (p *TSIServiceFetchResultsResult) String() string { +func (p *IClientRPCServiceSetTimeZoneResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceFetchResultsResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceSetTimeZoneResult(%+v)", *p) } -// Attributes: -// - Req -type TSIServiceFetchMetadataArgs struct { - Req *TSFetchMetadataReq `thrift:"req,1" db:"req" json:"req"` -} - -func NewTSIServiceFetchMetadataArgs() *TSIServiceFetchMetadataArgs { - return &TSIServiceFetchMetadataArgs{} +type IClientRPCServiceGetPropertiesArgs struct { } -var TSIServiceFetchMetadataArgs_Req_DEFAULT *TSFetchMetadataReq -func (p *TSIServiceFetchMetadataArgs) GetReq() *TSFetchMetadataReq { - if !p.IsSetReq() { - return TSIServiceFetchMetadataArgs_Req_DEFAULT - } -return p.Req -} -func (p *TSIServiceFetchMetadataArgs) IsSetReq() bool { - return p.Req != nil +func NewIClientRPCServiceGetPropertiesArgs() *IClientRPCServiceGetPropertiesArgs { + return &IClientRPCServiceGetPropertiesArgs{} } -func (p *TSIServiceFetchMetadataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceGetPropertiesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21080,21 +26819,8 @@ func (p *TSIServiceFetchMetadataArgs) Read(ctx context.Context, iprot thrift.TPr return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - switch fieldId { - case 1: - if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err } if err := iprot.ReadFieldEnd(ctx); err != nil { return err @@ -21106,19 +26832,10 @@ func (p *TSIServiceFetchMetadataArgs) Read(ctx context.Context, iprot thrift.TPr return nil } -func (p *TSIServiceFetchMetadataArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSFetchMetadataReq{} - if err := p.Req.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) - } - return nil -} - -func (p *TSIServiceFetchMetadataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "fetchMetadata_args"); err != nil { +func (p *IClientRPCServiceGetPropertiesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getProperties_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -21127,46 +26844,35 @@ func (p *TSIServiceFetchMetadataArgs) Write(ctx context.Context, oprot thrift.TP return nil } -func (p *TSIServiceFetchMetadataArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } - if err := p.Req.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } - return err -} - -func (p *TSIServiceFetchMetadataArgs) String() string { +func (p *IClientRPCServiceGetPropertiesArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceFetchMetadataArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceGetPropertiesArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceFetchMetadataResult struct { - Success *TSFetchMetadataResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceGetPropertiesResult struct { + Success *ServerProperties `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceFetchMetadataResult() *TSIServiceFetchMetadataResult { - return &TSIServiceFetchMetadataResult{} +func NewIClientRPCServiceGetPropertiesResult() *IClientRPCServiceGetPropertiesResult { + return &IClientRPCServiceGetPropertiesResult{} } -var TSIServiceFetchMetadataResult_Success_DEFAULT *TSFetchMetadataResp -func (p *TSIServiceFetchMetadataResult) GetSuccess() *TSFetchMetadataResp { +var IClientRPCServiceGetPropertiesResult_Success_DEFAULT *ServerProperties +func (p *IClientRPCServiceGetPropertiesResult) GetSuccess() *ServerProperties { if !p.IsSetSuccess() { - return TSIServiceFetchMetadataResult_Success_DEFAULT + return IClientRPCServiceGetPropertiesResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceFetchMetadataResult) IsSetSuccess() bool { +func (p *IClientRPCServiceGetPropertiesResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceFetchMetadataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceGetPropertiesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21204,16 +26910,16 @@ func (p *TSIServiceFetchMetadataResult) Read(ctx context.Context, iprot thrift.T return nil } -func (p *TSIServiceFetchMetadataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSFetchMetadataResp{} +func (p *IClientRPCServiceGetPropertiesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &ServerProperties{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceFetchMetadataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "fetchMetadata_result"); err != nil { +func (p *IClientRPCServiceGetPropertiesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getProperties_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -21225,7 +26931,7 @@ func (p *TSIServiceFetchMetadataResult) Write(ctx context.Context, oprot thrift. return nil } -func (p *TSIServiceFetchMetadataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceGetPropertiesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -21238,35 +26944,34 @@ func (p *TSIServiceFetchMetadataResult) writeField0(ctx context.Context, oprot t return err } -func (p *TSIServiceFetchMetadataResult) String() string { +func (p *IClientRPCServiceGetPropertiesResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceFetchMetadataResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceGetPropertiesResult(%+v)", *p) } // Attributes: -// - Req -type TSIServiceCancelOperationArgs struct { - Req *TSCancelOperationReq `thrift:"req,1" db:"req" json:"req"` +// - SessionId +// - StorageGroup +type IClientRPCServiceSetStorageGroupArgs struct { + SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` + StorageGroup string `thrift:"storageGroup,2" db:"storageGroup" json:"storageGroup"` } -func NewTSIServiceCancelOperationArgs() *TSIServiceCancelOperationArgs { - return &TSIServiceCancelOperationArgs{} +func NewIClientRPCServiceSetStorageGroupArgs() *IClientRPCServiceSetStorageGroupArgs { + return &IClientRPCServiceSetStorageGroupArgs{} } -var TSIServiceCancelOperationArgs_Req_DEFAULT *TSCancelOperationReq -func (p *TSIServiceCancelOperationArgs) GetReq() *TSCancelOperationReq { - if !p.IsSetReq() { - return TSIServiceCancelOperationArgs_Req_DEFAULT - } -return p.Req -} -func (p *TSIServiceCancelOperationArgs) IsSetReq() bool { - return p.Req != nil + +func (p *IClientRPCServiceSetStorageGroupArgs) GetSessionId() int64 { + return p.SessionId } -func (p *TSIServiceCancelOperationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceSetStorageGroupArgs) GetStorageGroup() string { + return p.StorageGroup +} +func (p *IClientRPCServiceSetStorageGroupArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21280,7 +26985,7 @@ func (p *TSIServiceCancelOperationArgs) Read(ctx context.Context, iprot thrift.T if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.STRUCT { + if fieldTypeId == thrift.I64 { if err := p.ReadField1(ctx, iprot); err != nil { return err } @@ -21289,6 +26994,16 @@ func (p *TSIServiceCancelOperationArgs) Read(ctx context.Context, iprot thrift.T return err } } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -21304,19 +27019,30 @@ func (p *TSIServiceCancelOperationArgs) Read(ctx context.Context, iprot thrift.T return nil } -func (p *TSIServiceCancelOperationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSCancelOperationReq{} - if err := p.Req.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) - } +func (p *IClientRPCServiceSetStorageGroupArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.SessionId = v +} return nil } -func (p *TSIServiceCancelOperationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "cancelOperation_args"); err != nil { +func (p *IClientRPCServiceSetStorageGroupArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.StorageGroup = v +} + return nil +} + +func (p *IClientRPCServiceSetStorageGroupArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "setStorageGroup_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -21325,46 +27051,55 @@ func (p *TSIServiceCancelOperationArgs) Write(ctx context.Context, oprot thrift. return nil } -func (p *TSIServiceCancelOperationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } - if err := p.Req.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) - } +func (p *IClientRPCServiceSetStorageGroupArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } + return err +} + +func (p *IClientRPCServiceSetStorageGroupArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "storageGroup", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:storageGroup: ", p), err) } + if err := oprot.WriteString(ctx, string(p.StorageGroup)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.storageGroup (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:storageGroup: ", p), err) } return err } -func (p *TSIServiceCancelOperationArgs) String() string { +func (p *IClientRPCServiceSetStorageGroupArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCancelOperationArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceSetStorageGroupArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceCancelOperationResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceSetStorageGroupResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceCancelOperationResult() *TSIServiceCancelOperationResult { - return &TSIServiceCancelOperationResult{} +func NewIClientRPCServiceSetStorageGroupResult() *IClientRPCServiceSetStorageGroupResult { + return &IClientRPCServiceSetStorageGroupResult{} } -var TSIServiceCancelOperationResult_Success_DEFAULT *TSStatus -func (p *TSIServiceCancelOperationResult) GetSuccess() *TSStatus { +var IClientRPCServiceSetStorageGroupResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceSetStorageGroupResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceCancelOperationResult_Success_DEFAULT + return IClientRPCServiceSetStorageGroupResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceCancelOperationResult) IsSetSuccess() bool { +func (p *IClientRPCServiceSetStorageGroupResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceCancelOperationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceSetStorageGroupResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21402,16 +27137,16 @@ func (p *TSIServiceCancelOperationResult) Read(ctx context.Context, iprot thrift return nil } -func (p *TSIServiceCancelOperationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceSetStorageGroupResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceCancelOperationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "cancelOperation_result"); err != nil { +func (p *IClientRPCServiceSetStorageGroupResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "setStorageGroup_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -21423,7 +27158,7 @@ func (p *TSIServiceCancelOperationResult) Write(ctx context.Context, oprot thrif return nil } -func (p *TSIServiceCancelOperationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceSetStorageGroupResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -21436,35 +27171,35 @@ func (p *TSIServiceCancelOperationResult) writeField0(ctx context.Context, oprot return err } -func (p *TSIServiceCancelOperationResult) String() string { +func (p *IClientRPCServiceSetStorageGroupResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCancelOperationResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceSetStorageGroupResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceCloseOperationArgs struct { - Req *TSCloseOperationReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceCreateTimeseriesArgs struct { + Req *TSCreateTimeseriesReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceCloseOperationArgs() *TSIServiceCloseOperationArgs { - return &TSIServiceCloseOperationArgs{} +func NewIClientRPCServiceCreateTimeseriesArgs() *IClientRPCServiceCreateTimeseriesArgs { + return &IClientRPCServiceCreateTimeseriesArgs{} } -var TSIServiceCloseOperationArgs_Req_DEFAULT *TSCloseOperationReq -func (p *TSIServiceCloseOperationArgs) GetReq() *TSCloseOperationReq { +var IClientRPCServiceCreateTimeseriesArgs_Req_DEFAULT *TSCreateTimeseriesReq +func (p *IClientRPCServiceCreateTimeseriesArgs) GetReq() *TSCreateTimeseriesReq { if !p.IsSetReq() { - return TSIServiceCloseOperationArgs_Req_DEFAULT + return IClientRPCServiceCreateTimeseriesArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceCloseOperationArgs) IsSetReq() bool { +func (p *IClientRPCServiceCreateTimeseriesArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceCloseOperationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCreateTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21502,16 +27237,16 @@ func (p *TSIServiceCloseOperationArgs) Read(ctx context.Context, iprot thrift.TP return nil } -func (p *TSIServiceCloseOperationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSCloseOperationReq{} +func (p *IClientRPCServiceCreateTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSCreateTimeseriesReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceCloseOperationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "closeOperation_args"); err != nil { +func (p *IClientRPCServiceCreateTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createTimeseries_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -21523,7 +27258,7 @@ func (p *TSIServiceCloseOperationArgs) Write(ctx context.Context, oprot thrift.T return nil } -func (p *TSIServiceCloseOperationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCreateTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -21534,35 +27269,35 @@ func (p *TSIServiceCloseOperationArgs) writeField1(ctx context.Context, oprot th return err } -func (p *TSIServiceCloseOperationArgs) String() string { +func (p *IClientRPCServiceCreateTimeseriesArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCloseOperationArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateTimeseriesArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceCloseOperationResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceCreateTimeseriesResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceCloseOperationResult() *TSIServiceCloseOperationResult { - return &TSIServiceCloseOperationResult{} +func NewIClientRPCServiceCreateTimeseriesResult() *IClientRPCServiceCreateTimeseriesResult { + return &IClientRPCServiceCreateTimeseriesResult{} } -var TSIServiceCloseOperationResult_Success_DEFAULT *TSStatus -func (p *TSIServiceCloseOperationResult) GetSuccess() *TSStatus { +var IClientRPCServiceCreateTimeseriesResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceCreateTimeseriesResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceCloseOperationResult_Success_DEFAULT + return IClientRPCServiceCreateTimeseriesResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceCloseOperationResult) IsSetSuccess() bool { +func (p *IClientRPCServiceCreateTimeseriesResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceCloseOperationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCreateTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21600,16 +27335,16 @@ func (p *TSIServiceCloseOperationResult) Read(ctx context.Context, iprot thrift. return nil } -func (p *TSIServiceCloseOperationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceCreateTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceCloseOperationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "closeOperation_result"); err != nil { +func (p *IClientRPCServiceCreateTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createTimeseries_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -21621,7 +27356,7 @@ func (p *TSIServiceCloseOperationResult) Write(ctx context.Context, oprot thrift return nil } -func (p *TSIServiceCloseOperationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCreateTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -21634,28 +27369,35 @@ func (p *TSIServiceCloseOperationResult) writeField0(ctx context.Context, oprot return err } -func (p *TSIServiceCloseOperationResult) String() string { +func (p *IClientRPCServiceCreateTimeseriesResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCloseOperationResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateTimeseriesResult(%+v)", *p) } // Attributes: -// - SessionId -type TSIServiceGetTimeZoneArgs struct { - SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` +// - Req +type IClientRPCServiceCreateAlignedTimeseriesArgs struct { + Req *TSCreateAlignedTimeseriesReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceGetTimeZoneArgs() *TSIServiceGetTimeZoneArgs { - return &TSIServiceGetTimeZoneArgs{} +func NewIClientRPCServiceCreateAlignedTimeseriesArgs() *IClientRPCServiceCreateAlignedTimeseriesArgs { + return &IClientRPCServiceCreateAlignedTimeseriesArgs{} } - -func (p *TSIServiceGetTimeZoneArgs) GetSessionId() int64 { - return p.SessionId +var IClientRPCServiceCreateAlignedTimeseriesArgs_Req_DEFAULT *TSCreateAlignedTimeseriesReq +func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) GetReq() *TSCreateAlignedTimeseriesReq { + if !p.IsSetReq() { + return IClientRPCServiceCreateAlignedTimeseriesArgs_Req_DEFAULT + } +return p.Req +} +func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) IsSetReq() bool { + return p.Req != nil } -func (p *TSIServiceGetTimeZoneArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21669,7 +27411,7 @@ func (p *TSIServiceGetTimeZoneArgs) Read(ctx context.Context, iprot thrift.TProt if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField1(ctx, iprot); err != nil { return err } @@ -21693,17 +27435,16 @@ func (p *TSIServiceGetTimeZoneArgs) Read(ctx context.Context, iprot thrift.TProt return nil } -func (p *TSIServiceGetTimeZoneArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) -} else { - p.SessionId = v -} +func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSCreateAlignedTimeseriesReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) + } return nil } -func (p *TSIServiceGetTimeZoneArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getTimeZone_args"); err != nil { +func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createAlignedTimeseries_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -21715,45 +27456,46 @@ func (p *TSIServiceGetTimeZoneArgs) Write(ctx context.Context, oprot thrift.TPro return nil } -func (p *TSIServiceGetTimeZoneArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } +func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } return err } -func (p *TSIServiceGetTimeZoneArgs) String() string { +func (p *IClientRPCServiceCreateAlignedTimeseriesArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceGetTimeZoneArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateAlignedTimeseriesArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceGetTimeZoneResult struct { - Success *TSGetTimeZoneResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceCreateAlignedTimeseriesResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceGetTimeZoneResult() *TSIServiceGetTimeZoneResult { - return &TSIServiceGetTimeZoneResult{} +func NewIClientRPCServiceCreateAlignedTimeseriesResult() *IClientRPCServiceCreateAlignedTimeseriesResult { + return &IClientRPCServiceCreateAlignedTimeseriesResult{} } -var TSIServiceGetTimeZoneResult_Success_DEFAULT *TSGetTimeZoneResp -func (p *TSIServiceGetTimeZoneResult) GetSuccess() *TSGetTimeZoneResp { +var IClientRPCServiceCreateAlignedTimeseriesResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceCreateAlignedTimeseriesResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceGetTimeZoneResult_Success_DEFAULT + return IClientRPCServiceCreateAlignedTimeseriesResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceGetTimeZoneResult) IsSetSuccess() bool { +func (p *IClientRPCServiceCreateAlignedTimeseriesResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceGetTimeZoneResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCreateAlignedTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21791,16 +27533,16 @@ func (p *TSIServiceGetTimeZoneResult) Read(ctx context.Context, iprot thrift.TPr return nil } -func (p *TSIServiceGetTimeZoneResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSGetTimeZoneResp{} +func (p *IClientRPCServiceCreateAlignedTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceGetTimeZoneResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getTimeZone_result"); err != nil { +func (p *IClientRPCServiceCreateAlignedTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createAlignedTimeseries_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -21812,7 +27554,7 @@ func (p *TSIServiceGetTimeZoneResult) Write(ctx context.Context, oprot thrift.TP return nil } -func (p *TSIServiceGetTimeZoneResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCreateAlignedTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -21825,35 +27567,35 @@ func (p *TSIServiceGetTimeZoneResult) writeField0(ctx context.Context, oprot thr return err } -func (p *TSIServiceGetTimeZoneResult) String() string { +func (p *IClientRPCServiceCreateAlignedTimeseriesResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceGetTimeZoneResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateAlignedTimeseriesResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceSetTimeZoneArgs struct { - Req *TSSetTimeZoneReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceCreateMultiTimeseriesArgs struct { + Req *TSCreateMultiTimeseriesReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceSetTimeZoneArgs() *TSIServiceSetTimeZoneArgs { - return &TSIServiceSetTimeZoneArgs{} +func NewIClientRPCServiceCreateMultiTimeseriesArgs() *IClientRPCServiceCreateMultiTimeseriesArgs { + return &IClientRPCServiceCreateMultiTimeseriesArgs{} } -var TSIServiceSetTimeZoneArgs_Req_DEFAULT *TSSetTimeZoneReq -func (p *TSIServiceSetTimeZoneArgs) GetReq() *TSSetTimeZoneReq { +var IClientRPCServiceCreateMultiTimeseriesArgs_Req_DEFAULT *TSCreateMultiTimeseriesReq +func (p *IClientRPCServiceCreateMultiTimeseriesArgs) GetReq() *TSCreateMultiTimeseriesReq { if !p.IsSetReq() { - return TSIServiceSetTimeZoneArgs_Req_DEFAULT + return IClientRPCServiceCreateMultiTimeseriesArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceSetTimeZoneArgs) IsSetReq() bool { +func (p *IClientRPCServiceCreateMultiTimeseriesArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceSetTimeZoneArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCreateMultiTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21891,16 +27633,16 @@ func (p *TSIServiceSetTimeZoneArgs) Read(ctx context.Context, iprot thrift.TProt return nil } -func (p *TSIServiceSetTimeZoneArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSSetTimeZoneReq{} +func (p *IClientRPCServiceCreateMultiTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSCreateMultiTimeseriesReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceSetTimeZoneArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setTimeZone_args"); err != nil { +func (p *IClientRPCServiceCreateMultiTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createMultiTimeseries_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -21912,7 +27654,7 @@ func (p *TSIServiceSetTimeZoneArgs) Write(ctx context.Context, oprot thrift.TPro return nil } -func (p *TSIServiceSetTimeZoneArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCreateMultiTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -21923,35 +27665,35 @@ func (p *TSIServiceSetTimeZoneArgs) writeField1(ctx context.Context, oprot thrif return err } -func (p *TSIServiceSetTimeZoneArgs) String() string { +func (p *IClientRPCServiceCreateMultiTimeseriesArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceSetTimeZoneArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateMultiTimeseriesArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceSetTimeZoneResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceCreateMultiTimeseriesResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceSetTimeZoneResult() *TSIServiceSetTimeZoneResult { - return &TSIServiceSetTimeZoneResult{} +func NewIClientRPCServiceCreateMultiTimeseriesResult() *IClientRPCServiceCreateMultiTimeseriesResult { + return &IClientRPCServiceCreateMultiTimeseriesResult{} } -var TSIServiceSetTimeZoneResult_Success_DEFAULT *TSStatus -func (p *TSIServiceSetTimeZoneResult) GetSuccess() *TSStatus { +var IClientRPCServiceCreateMultiTimeseriesResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceCreateMultiTimeseriesResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceSetTimeZoneResult_Success_DEFAULT + return IClientRPCServiceCreateMultiTimeseriesResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceSetTimeZoneResult) IsSetSuccess() bool { +func (p *IClientRPCServiceCreateMultiTimeseriesResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceSetTimeZoneResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCreateMultiTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -21989,16 +27731,16 @@ func (p *TSIServiceSetTimeZoneResult) Read(ctx context.Context, iprot thrift.TPr return nil } -func (p *TSIServiceSetTimeZoneResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceCreateMultiTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceSetTimeZoneResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setTimeZone_result"); err != nil { +func (p *IClientRPCServiceCreateMultiTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createMultiTimeseries_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -22010,7 +27752,7 @@ func (p *TSIServiceSetTimeZoneResult) Write(ctx context.Context, oprot thrift.TP return nil } -func (p *TSIServiceSetTimeZoneResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCreateMultiTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -22023,21 +27765,34 @@ func (p *TSIServiceSetTimeZoneResult) writeField0(ctx context.Context, oprot thr return err } -func (p *TSIServiceSetTimeZoneResult) String() string { +func (p *IClientRPCServiceCreateMultiTimeseriesResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceSetTimeZoneResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateMultiTimeseriesResult(%+v)", *p) +} + +// Attributes: +// - SessionId +// - Path +type IClientRPCServiceDeleteTimeseriesArgs struct { + SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` + Path []string `thrift:"path,2" db:"path" json:"path"` } -type TSIServiceGetPropertiesArgs struct { +func NewIClientRPCServiceDeleteTimeseriesArgs() *IClientRPCServiceDeleteTimeseriesArgs { + return &IClientRPCServiceDeleteTimeseriesArgs{} } -func NewTSIServiceGetPropertiesArgs() *TSIServiceGetPropertiesArgs { - return &TSIServiceGetPropertiesArgs{} + +func (p *IClientRPCServiceDeleteTimeseriesArgs) GetSessionId() int64 { + return p.SessionId } -func (p *TSIServiceGetPropertiesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceDeleteTimeseriesArgs) GetPath() []string { + return p.Path +} +func (p *IClientRPCServiceDeleteTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22049,23 +27804,79 @@ func (p *TSIServiceGetPropertiesArgs) Read(ctx context.Context, iprot thrift.TPr return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } } if err := iprot.ReadFieldEnd(ctx); err != nil { return err } } - if err := iprot.ReadStructEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *IClientRPCServiceDeleteTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.SessionId = v +} + return nil +} + +func (p *IClientRPCServiceDeleteTimeseriesArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Path = tSlice + for i := 0; i < size; i ++ { +var _elem371 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem371 = v +} + p.Path = append(p.Path, _elem371) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *TSIServiceGetPropertiesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getProperties_args"); err != nil { +func (p *IClientRPCServiceDeleteTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteTimeseries_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -22074,35 +27885,63 @@ func (p *TSIServiceGetPropertiesArgs) Write(ctx context.Context, oprot thrift.TP return nil } -func (p *TSIServiceGetPropertiesArgs) String() string { +func (p *IClientRPCServiceDeleteTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } + return err +} + +func (p *IClientRPCServiceDeleteTimeseriesArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "path", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:path: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Path)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Path { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:path: ", p), err) } + return err +} + +func (p *IClientRPCServiceDeleteTimeseriesArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceGetPropertiesArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceDeleteTimeseriesArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceGetPropertiesResult struct { - Success *ServerProperties `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceDeleteTimeseriesResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceGetPropertiesResult() *TSIServiceGetPropertiesResult { - return &TSIServiceGetPropertiesResult{} +func NewIClientRPCServiceDeleteTimeseriesResult() *IClientRPCServiceDeleteTimeseriesResult { + return &IClientRPCServiceDeleteTimeseriesResult{} } -var TSIServiceGetPropertiesResult_Success_DEFAULT *ServerProperties -func (p *TSIServiceGetPropertiesResult) GetSuccess() *ServerProperties { +var IClientRPCServiceDeleteTimeseriesResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceDeleteTimeseriesResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceGetPropertiesResult_Success_DEFAULT + return IClientRPCServiceDeleteTimeseriesResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceGetPropertiesResult) IsSetSuccess() bool { +func (p *IClientRPCServiceDeleteTimeseriesResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceGetPropertiesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceDeleteTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22140,16 +27979,16 @@ func (p *TSIServiceGetPropertiesResult) Read(ctx context.Context, iprot thrift.T return nil } -func (p *TSIServiceGetPropertiesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &ServerProperties{} +func (p *IClientRPCServiceDeleteTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceGetPropertiesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getProperties_result"); err != nil { +func (p *IClientRPCServiceDeleteTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteTimeseries_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -22161,7 +28000,7 @@ func (p *TSIServiceGetPropertiesResult) Write(ctx context.Context, oprot thrift. return nil } -func (p *TSIServiceGetPropertiesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceDeleteTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -22174,34 +28013,34 @@ func (p *TSIServiceGetPropertiesResult) writeField0(ctx context.Context, oprot t return err } -func (p *TSIServiceGetPropertiesResult) String() string { +func (p *IClientRPCServiceDeleteTimeseriesResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceGetPropertiesResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceDeleteTimeseriesResult(%+v)", *p) } // Attributes: // - SessionId // - StorageGroup -type TSIServiceSetStorageGroupArgs struct { +type IClientRPCServiceDeleteStorageGroupsArgs struct { SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` - StorageGroup string `thrift:"storageGroup,2" db:"storageGroup" json:"storageGroup"` + StorageGroup []string `thrift:"storageGroup,2" db:"storageGroup" json:"storageGroup"` } -func NewTSIServiceSetStorageGroupArgs() *TSIServiceSetStorageGroupArgs { - return &TSIServiceSetStorageGroupArgs{} +func NewIClientRPCServiceDeleteStorageGroupsArgs() *IClientRPCServiceDeleteStorageGroupsArgs { + return &IClientRPCServiceDeleteStorageGroupsArgs{} } -func (p *TSIServiceSetStorageGroupArgs) GetSessionId() int64 { +func (p *IClientRPCServiceDeleteStorageGroupsArgs) GetSessionId() int64 { return p.SessionId } -func (p *TSIServiceSetStorageGroupArgs) GetStorageGroup() string { +func (p *IClientRPCServiceDeleteStorageGroupsArgs) GetStorageGroup() []string { return p.StorageGroup } -func (p *TSIServiceSetStorageGroupArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceDeleteStorageGroupsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22225,7 +28064,7 @@ func (p *TSIServiceSetStorageGroupArgs) Read(ctx context.Context, iprot thrift.T } } case 2: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.LIST { if err := p.ReadField2(ctx, iprot); err != nil { return err } @@ -22249,7 +28088,7 @@ func (p *TSIServiceSetStorageGroupArgs) Read(ctx context.Context, iprot thrift.T return nil } -func (p *TSIServiceSetStorageGroupArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceDeleteStorageGroupsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 1: ", err) } else { @@ -22258,17 +28097,30 @@ func (p *TSIServiceSetStorageGroupArgs) ReadField1(ctx context.Context, iprot t return nil } -func (p *TSIServiceSetStorageGroupArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 2: ", err) +func (p *IClientRPCServiceDeleteStorageGroupsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.StorageGroup = tSlice + for i := 0; i < size; i ++ { +var _elem372 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.StorageGroup = v + _elem372 = v } + p.StorageGroup = append(p.StorageGroup, _elem372) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSIServiceSetStorageGroupArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setStorageGroup_args"); err != nil { +func (p *IClientRPCServiceDeleteStorageGroupsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteStorageGroups_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -22281,7 +28133,7 @@ func (p *TSIServiceSetStorageGroupArgs) Write(ctx context.Context, oprot thrift. return nil } -func (p *TSIServiceSetStorageGroupArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceDeleteStorageGroupsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { @@ -22291,45 +28143,53 @@ func (p *TSIServiceSetStorageGroupArgs) writeField1(ctx context.Context, oprot t return err } -func (p *TSIServiceSetStorageGroupArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "storageGroup", thrift.STRING, 2); err != nil { +func (p *IClientRPCServiceDeleteStorageGroupsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "storageGroup", thrift.LIST, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:storageGroup: ", p), err) } - if err := oprot.WriteString(ctx, string(p.StorageGroup)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.storageGroup (2) field write error: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.StorageGroup)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.StorageGroup { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 2:storageGroup: ", p), err) } return err } -func (p *TSIServiceSetStorageGroupArgs) String() string { +func (p *IClientRPCServiceDeleteStorageGroupsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceSetStorageGroupArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceDeleteStorageGroupsArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceSetStorageGroupResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceDeleteStorageGroupsResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceSetStorageGroupResult() *TSIServiceSetStorageGroupResult { - return &TSIServiceSetStorageGroupResult{} +func NewIClientRPCServiceDeleteStorageGroupsResult() *IClientRPCServiceDeleteStorageGroupsResult { + return &IClientRPCServiceDeleteStorageGroupsResult{} } -var TSIServiceSetStorageGroupResult_Success_DEFAULT *TSStatus -func (p *TSIServiceSetStorageGroupResult) GetSuccess() *TSStatus { +var IClientRPCServiceDeleteStorageGroupsResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceDeleteStorageGroupsResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceSetStorageGroupResult_Success_DEFAULT + return IClientRPCServiceDeleteStorageGroupsResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceSetStorageGroupResult) IsSetSuccess() bool { +func (p *IClientRPCServiceDeleteStorageGroupsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceSetStorageGroupResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceDeleteStorageGroupsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22367,16 +28227,16 @@ func (p *TSIServiceSetStorageGroupResult) Read(ctx context.Context, iprot thrift return nil } -func (p *TSIServiceSetStorageGroupResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceDeleteStorageGroupsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceSetStorageGroupResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setStorageGroup_result"); err != nil { +func (p *IClientRPCServiceDeleteStorageGroupsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteStorageGroups_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -22388,7 +28248,7 @@ func (p *TSIServiceSetStorageGroupResult) Write(ctx context.Context, oprot thrif return nil } -func (p *TSIServiceSetStorageGroupResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceDeleteStorageGroupsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -22401,35 +28261,35 @@ func (p *TSIServiceSetStorageGroupResult) writeField0(ctx context.Context, oprot return err } -func (p *TSIServiceSetStorageGroupResult) String() string { +func (p *IClientRPCServiceDeleteStorageGroupsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceSetStorageGroupResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceDeleteStorageGroupsResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceCreateTimeseriesArgs struct { - Req *TSCreateTimeseriesReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceInsertRecordArgs struct { + Req *TSInsertRecordReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceCreateTimeseriesArgs() *TSIServiceCreateTimeseriesArgs { - return &TSIServiceCreateTimeseriesArgs{} +func NewIClientRPCServiceInsertRecordArgs() *IClientRPCServiceInsertRecordArgs { + return &IClientRPCServiceInsertRecordArgs{} } -var TSIServiceCreateTimeseriesArgs_Req_DEFAULT *TSCreateTimeseriesReq -func (p *TSIServiceCreateTimeseriesArgs) GetReq() *TSCreateTimeseriesReq { +var IClientRPCServiceInsertRecordArgs_Req_DEFAULT *TSInsertRecordReq +func (p *IClientRPCServiceInsertRecordArgs) GetReq() *TSInsertRecordReq { if !p.IsSetReq() { - return TSIServiceCreateTimeseriesArgs_Req_DEFAULT + return IClientRPCServiceInsertRecordArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceCreateTimeseriesArgs) IsSetReq() bool { +func (p *IClientRPCServiceInsertRecordArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceCreateTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22467,16 +28327,16 @@ func (p *TSIServiceCreateTimeseriesArgs) Read(ctx context.Context, iprot thrift. return nil } -func (p *TSIServiceCreateTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSCreateTimeseriesReq{} +func (p *IClientRPCServiceInsertRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertRecordReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceCreateTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createTimeseries_args"); err != nil { +func (p *IClientRPCServiceInsertRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertRecord_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -22488,7 +28348,7 @@ func (p *TSIServiceCreateTimeseriesArgs) Write(ctx context.Context, oprot thrift return nil } -func (p *TSIServiceCreateTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -22499,35 +28359,35 @@ func (p *TSIServiceCreateTimeseriesArgs) writeField1(ctx context.Context, oprot return err } -func (p *TSIServiceCreateTimeseriesArgs) String() string { +func (p *IClientRPCServiceInsertRecordArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCreateTimeseriesArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertRecordArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceCreateTimeseriesResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceInsertRecordResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceCreateTimeseriesResult() *TSIServiceCreateTimeseriesResult { - return &TSIServiceCreateTimeseriesResult{} +func NewIClientRPCServiceInsertRecordResult() *IClientRPCServiceInsertRecordResult { + return &IClientRPCServiceInsertRecordResult{} } -var TSIServiceCreateTimeseriesResult_Success_DEFAULT *TSStatus -func (p *TSIServiceCreateTimeseriesResult) GetSuccess() *TSStatus { +var IClientRPCServiceInsertRecordResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceInsertRecordResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceCreateTimeseriesResult_Success_DEFAULT + return IClientRPCServiceInsertRecordResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceCreateTimeseriesResult) IsSetSuccess() bool { +func (p *IClientRPCServiceInsertRecordResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceCreateTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22565,16 +28425,16 @@ func (p *TSIServiceCreateTimeseriesResult) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceCreateTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceInsertRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceCreateTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createTimeseries_result"); err != nil { +func (p *IClientRPCServiceInsertRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertRecord_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -22586,7 +28446,7 @@ func (p *TSIServiceCreateTimeseriesResult) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceCreateTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -22599,35 +28459,35 @@ func (p *TSIServiceCreateTimeseriesResult) writeField0(ctx context.Context, opro return err } -func (p *TSIServiceCreateTimeseriesResult) String() string { +func (p *IClientRPCServiceInsertRecordResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCreateTimeseriesResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertRecordResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceCreateAlignedTimeseriesArgs struct { - Req *TSCreateAlignedTimeseriesReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceInsertStringRecordArgs struct { + Req *TSInsertStringRecordReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceCreateAlignedTimeseriesArgs() *TSIServiceCreateAlignedTimeseriesArgs { - return &TSIServiceCreateAlignedTimeseriesArgs{} +func NewIClientRPCServiceInsertStringRecordArgs() *IClientRPCServiceInsertStringRecordArgs { + return &IClientRPCServiceInsertStringRecordArgs{} } -var TSIServiceCreateAlignedTimeseriesArgs_Req_DEFAULT *TSCreateAlignedTimeseriesReq -func (p *TSIServiceCreateAlignedTimeseriesArgs) GetReq() *TSCreateAlignedTimeseriesReq { +var IClientRPCServiceInsertStringRecordArgs_Req_DEFAULT *TSInsertStringRecordReq +func (p *IClientRPCServiceInsertStringRecordArgs) GetReq() *TSInsertStringRecordReq { if !p.IsSetReq() { - return TSIServiceCreateAlignedTimeseriesArgs_Req_DEFAULT + return IClientRPCServiceInsertStringRecordArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceCreateAlignedTimeseriesArgs) IsSetReq() bool { +func (p *IClientRPCServiceInsertStringRecordArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceCreateAlignedTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertStringRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22665,16 +28525,16 @@ func (p *TSIServiceCreateAlignedTimeseriesArgs) Read(ctx context.Context, iprot return nil } -func (p *TSIServiceCreateAlignedTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSCreateAlignedTimeseriesReq{} +func (p *IClientRPCServiceInsertStringRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertStringRecordReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceCreateAlignedTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createAlignedTimeseries_args"); err != nil { +func (p *IClientRPCServiceInsertStringRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertStringRecord_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -22686,7 +28546,7 @@ func (p *TSIServiceCreateAlignedTimeseriesArgs) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceCreateAlignedTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertStringRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -22697,35 +28557,35 @@ func (p *TSIServiceCreateAlignedTimeseriesArgs) writeField1(ctx context.Context, return err } -func (p *TSIServiceCreateAlignedTimeseriesArgs) String() string { +func (p *IClientRPCServiceInsertStringRecordArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCreateAlignedTimeseriesArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertStringRecordArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceCreateAlignedTimeseriesResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceInsertStringRecordResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceCreateAlignedTimeseriesResult() *TSIServiceCreateAlignedTimeseriesResult { - return &TSIServiceCreateAlignedTimeseriesResult{} +func NewIClientRPCServiceInsertStringRecordResult() *IClientRPCServiceInsertStringRecordResult { + return &IClientRPCServiceInsertStringRecordResult{} } -var TSIServiceCreateAlignedTimeseriesResult_Success_DEFAULT *TSStatus -func (p *TSIServiceCreateAlignedTimeseriesResult) GetSuccess() *TSStatus { +var IClientRPCServiceInsertStringRecordResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceInsertStringRecordResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceCreateAlignedTimeseriesResult_Success_DEFAULT + return IClientRPCServiceInsertStringRecordResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceCreateAlignedTimeseriesResult) IsSetSuccess() bool { +func (p *IClientRPCServiceInsertStringRecordResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceCreateAlignedTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertStringRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22763,16 +28623,16 @@ func (p *TSIServiceCreateAlignedTimeseriesResult) Read(ctx context.Context, ipro return nil } -func (p *TSIServiceCreateAlignedTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceInsertStringRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceCreateAlignedTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createAlignedTimeseries_result"); err != nil { +func (p *IClientRPCServiceInsertStringRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertStringRecord_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -22784,7 +28644,7 @@ func (p *TSIServiceCreateAlignedTimeseriesResult) Write(ctx context.Context, opr return nil } -func (p *TSIServiceCreateAlignedTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertStringRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -22797,35 +28657,35 @@ func (p *TSIServiceCreateAlignedTimeseriesResult) writeField0(ctx context.Contex return err } -func (p *TSIServiceCreateAlignedTimeseriesResult) String() string { +func (p *IClientRPCServiceInsertStringRecordResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCreateAlignedTimeseriesResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertStringRecordResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceCreateMultiTimeseriesArgs struct { - Req *TSCreateMultiTimeseriesReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceInsertTabletArgs struct { + Req *TSInsertTabletReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceCreateMultiTimeseriesArgs() *TSIServiceCreateMultiTimeseriesArgs { - return &TSIServiceCreateMultiTimeseriesArgs{} +func NewIClientRPCServiceInsertTabletArgs() *IClientRPCServiceInsertTabletArgs { + return &IClientRPCServiceInsertTabletArgs{} } -var TSIServiceCreateMultiTimeseriesArgs_Req_DEFAULT *TSCreateMultiTimeseriesReq -func (p *TSIServiceCreateMultiTimeseriesArgs) GetReq() *TSCreateMultiTimeseriesReq { +var IClientRPCServiceInsertTabletArgs_Req_DEFAULT *TSInsertTabletReq +func (p *IClientRPCServiceInsertTabletArgs) GetReq() *TSInsertTabletReq { if !p.IsSetReq() { - return TSIServiceCreateMultiTimeseriesArgs_Req_DEFAULT + return IClientRPCServiceInsertTabletArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceCreateMultiTimeseriesArgs) IsSetReq() bool { +func (p *IClientRPCServiceInsertTabletArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceCreateMultiTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertTabletArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22863,16 +28723,16 @@ func (p *TSIServiceCreateMultiTimeseriesArgs) Read(ctx context.Context, iprot th return nil } -func (p *TSIServiceCreateMultiTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSCreateMultiTimeseriesReq{} +func (p *IClientRPCServiceInsertTabletArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertTabletReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceCreateMultiTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createMultiTimeseries_args"); err != nil { +func (p *IClientRPCServiceInsertTabletArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertTablet_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -22884,7 +28744,7 @@ func (p *TSIServiceCreateMultiTimeseriesArgs) Write(ctx context.Context, oprot t return nil } -func (p *TSIServiceCreateMultiTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertTabletArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -22895,35 +28755,35 @@ func (p *TSIServiceCreateMultiTimeseriesArgs) writeField1(ctx context.Context, o return err } -func (p *TSIServiceCreateMultiTimeseriesArgs) String() string { +func (p *IClientRPCServiceInsertTabletArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCreateMultiTimeseriesArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertTabletArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceCreateMultiTimeseriesResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceInsertTabletResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceCreateMultiTimeseriesResult() *TSIServiceCreateMultiTimeseriesResult { - return &TSIServiceCreateMultiTimeseriesResult{} +func NewIClientRPCServiceInsertTabletResult() *IClientRPCServiceInsertTabletResult { + return &IClientRPCServiceInsertTabletResult{} } -var TSIServiceCreateMultiTimeseriesResult_Success_DEFAULT *TSStatus -func (p *TSIServiceCreateMultiTimeseriesResult) GetSuccess() *TSStatus { +var IClientRPCServiceInsertTabletResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceInsertTabletResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceCreateMultiTimeseriesResult_Success_DEFAULT + return IClientRPCServiceInsertTabletResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceCreateMultiTimeseriesResult) IsSetSuccess() bool { +func (p *IClientRPCServiceInsertTabletResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceCreateMultiTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertTabletResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -22961,16 +28821,16 @@ func (p *TSIServiceCreateMultiTimeseriesResult) Read(ctx context.Context, iprot return nil } -func (p *TSIServiceCreateMultiTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceInsertTabletResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceCreateMultiTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createMultiTimeseries_result"); err != nil { +func (p *IClientRPCServiceInsertTabletResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertTablet_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -22982,7 +28842,7 @@ func (p *TSIServiceCreateMultiTimeseriesResult) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceCreateMultiTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertTabletResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -22995,34 +28855,35 @@ func (p *TSIServiceCreateMultiTimeseriesResult) writeField0(ctx context.Context, return err } -func (p *TSIServiceCreateMultiTimeseriesResult) String() string { +func (p *IClientRPCServiceInsertTabletResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCreateMultiTimeseriesResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertTabletResult(%+v)", *p) } // Attributes: -// - SessionId -// - Path -type TSIServiceDeleteTimeseriesArgs struct { - SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` - Path []string `thrift:"path,2" db:"path" json:"path"` +// - Req +type IClientRPCServiceInsertTabletsArgs struct { + Req *TSInsertTabletsReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceDeleteTimeseriesArgs() *TSIServiceDeleteTimeseriesArgs { - return &TSIServiceDeleteTimeseriesArgs{} +func NewIClientRPCServiceInsertTabletsArgs() *IClientRPCServiceInsertTabletsArgs { + return &IClientRPCServiceInsertTabletsArgs{} } - -func (p *TSIServiceDeleteTimeseriesArgs) GetSessionId() int64 { - return p.SessionId +var IClientRPCServiceInsertTabletsArgs_Req_DEFAULT *TSInsertTabletsReq +func (p *IClientRPCServiceInsertTabletsArgs) GetReq() *TSInsertTabletsReq { + if !p.IsSetReq() { + return IClientRPCServiceInsertTabletsArgs_Req_DEFAULT + } +return p.Req } - -func (p *TSIServiceDeleteTimeseriesArgs) GetPath() []string { - return p.Path +func (p *IClientRPCServiceInsertTabletsArgs) IsSetReq() bool { + return p.Req != nil } -func (p *TSIServiceDeleteTimeseriesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *IClientRPCServiceInsertTabletsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -23036,7 +28897,7 @@ func (p *TSIServiceDeleteTimeseriesArgs) Read(ctx context.Context, iprot thrift. if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField1(ctx, iprot); err != nil { return err } @@ -23045,16 +28906,6 @@ func (p *TSIServiceDeleteTimeseriesArgs) Read(ctx context.Context, iprot thrift. return err } } - case 2: - if fieldTypeId == thrift.LIST { - if err := p.ReadField2(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -23070,43 +28921,19 @@ func (p *TSIServiceDeleteTimeseriesArgs) Read(ctx context.Context, iprot thrift. return nil } -func (p *TSIServiceDeleteTimeseriesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) -} else { - p.SessionId = v -} - return nil -} - -func (p *TSIServiceDeleteTimeseriesArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.Path = tSlice - for i := 0; i < size; i ++ { -var _elem309 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _elem309 = v -} - p.Path = append(p.Path, _elem309) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) +func (p *IClientRPCServiceInsertTabletsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertTabletsReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceDeleteTimeseriesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "deleteTimeseries_args"); err != nil { +func (p *IClientRPCServiceInsertTabletsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertTablets_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -23115,63 +28942,46 @@ func (p *TSIServiceDeleteTimeseriesArgs) Write(ctx context.Context, oprot thrift return nil } -func (p *TSIServiceDeleteTimeseriesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } - return err -} - -func (p *TSIServiceDeleteTimeseriesArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "path", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:path: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Path)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Path { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) +func (p *IClientRPCServiceInsertTabletsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:path: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } return err } -func (p *TSIServiceDeleteTimeseriesArgs) String() string { +func (p *IClientRPCServiceInsertTabletsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceDeleteTimeseriesArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertTabletsArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceDeleteTimeseriesResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceInsertTabletsResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceDeleteTimeseriesResult() *TSIServiceDeleteTimeseriesResult { - return &TSIServiceDeleteTimeseriesResult{} +func NewIClientRPCServiceInsertTabletsResult() *IClientRPCServiceInsertTabletsResult { + return &IClientRPCServiceInsertTabletsResult{} } -var TSIServiceDeleteTimeseriesResult_Success_DEFAULT *TSStatus -func (p *TSIServiceDeleteTimeseriesResult) GetSuccess() *TSStatus { +var IClientRPCServiceInsertTabletsResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceInsertTabletsResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceDeleteTimeseriesResult_Success_DEFAULT + return IClientRPCServiceInsertTabletsResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceDeleteTimeseriesResult) IsSetSuccess() bool { +func (p *IClientRPCServiceInsertTabletsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceDeleteTimeseriesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertTabletsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -23209,16 +29019,16 @@ func (p *TSIServiceDeleteTimeseriesResult) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceDeleteTimeseriesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceInsertTabletsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceDeleteTimeseriesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "deleteTimeseries_result"); err != nil { +func (p *IClientRPCServiceInsertTabletsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertTablets_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -23230,7 +29040,7 @@ func (p *TSIServiceDeleteTimeseriesResult) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceDeleteTimeseriesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertTabletsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -23243,34 +29053,35 @@ func (p *TSIServiceDeleteTimeseriesResult) writeField0(ctx context.Context, opro return err } -func (p *TSIServiceDeleteTimeseriesResult) String() string { +func (p *IClientRPCServiceInsertTabletsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceDeleteTimeseriesResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertTabletsResult(%+v)", *p) } // Attributes: -// - SessionId -// - StorageGroup -type TSIServiceDeleteStorageGroupsArgs struct { - SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` - StorageGroup []string `thrift:"storageGroup,2" db:"storageGroup" json:"storageGroup"` +// - Req +type IClientRPCServiceInsertRecordsArgs struct { + Req *TSInsertRecordsReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceDeleteStorageGroupsArgs() *TSIServiceDeleteStorageGroupsArgs { - return &TSIServiceDeleteStorageGroupsArgs{} +func NewIClientRPCServiceInsertRecordsArgs() *IClientRPCServiceInsertRecordsArgs { + return &IClientRPCServiceInsertRecordsArgs{} } - -func (p *TSIServiceDeleteStorageGroupsArgs) GetSessionId() int64 { - return p.SessionId +var IClientRPCServiceInsertRecordsArgs_Req_DEFAULT *TSInsertRecordsReq +func (p *IClientRPCServiceInsertRecordsArgs) GetReq() *TSInsertRecordsReq { + if !p.IsSetReq() { + return IClientRPCServiceInsertRecordsArgs_Req_DEFAULT + } +return p.Req } - -func (p *TSIServiceDeleteStorageGroupsArgs) GetStorageGroup() []string { - return p.StorageGroup +func (p *IClientRPCServiceInsertRecordsArgs) IsSetReq() bool { + return p.Req != nil } -func (p *TSIServiceDeleteStorageGroupsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *IClientRPCServiceInsertRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -23284,7 +29095,7 @@ func (p *TSIServiceDeleteStorageGroupsArgs) Read(ctx context.Context, iprot thri if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField1(ctx, iprot); err != nil { return err } @@ -23293,16 +29104,6 @@ func (p *TSIServiceDeleteStorageGroupsArgs) Read(ctx context.Context, iprot thri return err } } - case 2: - if fieldTypeId == thrift.LIST { - if err := p.ReadField2(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -23318,108 +29119,67 @@ func (p *TSIServiceDeleteStorageGroupsArgs) Read(ctx context.Context, iprot thri return nil } -func (p *TSIServiceDeleteStorageGroupsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) -} else { - p.SessionId = v -} - return nil -} - -func (p *TSIServiceDeleteStorageGroupsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.StorageGroup = tSlice - for i := 0; i < size; i ++ { -var _elem310 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _elem310 = v -} - p.StorageGroup = append(p.StorageGroup, _elem310) - } - if err := iprot.ReadListEnd(ctx); err != nil { - return thrift.PrependError("error reading list end: ", err) +func (p *IClientRPCServiceInsertRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertRecordsReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceDeleteStorageGroupsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "deleteStorageGroups_args"); err != nil { +func (p *IClientRPCServiceInsertRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertRecords_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } - if err := p.writeField2(ctx, oprot); err != nil { return err } - } - if err := oprot.WriteFieldStop(ctx); err != nil { - return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(ctx); err != nil { - return thrift.PrependError("write struct stop error: ", err) } - return nil -} - -func (p *TSIServiceDeleteStorageGroupsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } - return err + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil } -func (p *TSIServiceDeleteStorageGroupsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "storageGroup", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:storageGroup: ", p), err) } - if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.StorageGroup)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.StorageGroup { - if err := oprot.WriteString(ctx, string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(ctx); err != nil { - return thrift.PrependError("error writing list end: ", err) +func (p *IClientRPCServiceInsertRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:storageGroup: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } return err } -func (p *TSIServiceDeleteStorageGroupsArgs) String() string { +func (p *IClientRPCServiceInsertRecordsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceDeleteStorageGroupsArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertRecordsArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceDeleteStorageGroupsResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceInsertRecordsResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceDeleteStorageGroupsResult() *TSIServiceDeleteStorageGroupsResult { - return &TSIServiceDeleteStorageGroupsResult{} +func NewIClientRPCServiceInsertRecordsResult() *IClientRPCServiceInsertRecordsResult { + return &IClientRPCServiceInsertRecordsResult{} } -var TSIServiceDeleteStorageGroupsResult_Success_DEFAULT *TSStatus -func (p *TSIServiceDeleteStorageGroupsResult) GetSuccess() *TSStatus { +var IClientRPCServiceInsertRecordsResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceInsertRecordsResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceDeleteStorageGroupsResult_Success_DEFAULT + return IClientRPCServiceInsertRecordsResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceDeleteStorageGroupsResult) IsSetSuccess() bool { +func (p *IClientRPCServiceInsertRecordsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceDeleteStorageGroupsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -23457,16 +29217,16 @@ func (p *TSIServiceDeleteStorageGroupsResult) Read(ctx context.Context, iprot th return nil } -func (p *TSIServiceDeleteStorageGroupsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceInsertRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceDeleteStorageGroupsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "deleteStorageGroups_result"); err != nil { +func (p *IClientRPCServiceInsertRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertRecords_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -23478,7 +29238,7 @@ func (p *TSIServiceDeleteStorageGroupsResult) Write(ctx context.Context, oprot t return nil } -func (p *TSIServiceDeleteStorageGroupsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -23491,35 +29251,35 @@ func (p *TSIServiceDeleteStorageGroupsResult) writeField0(ctx context.Context, o return err } -func (p *TSIServiceDeleteStorageGroupsResult) String() string { +func (p *IClientRPCServiceInsertRecordsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceDeleteStorageGroupsResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertRecordsResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceInsertRecordArgs struct { - Req *TSInsertRecordReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceFastInsertRecordsArgs struct { + Req *TSFastInsertRecordsReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceInsertRecordArgs() *TSIServiceInsertRecordArgs { - return &TSIServiceInsertRecordArgs{} +func NewIClientRPCServiceFastInsertRecordsArgs() *IClientRPCServiceFastInsertRecordsArgs { + return &IClientRPCServiceFastInsertRecordsArgs{} } -var TSIServiceInsertRecordArgs_Req_DEFAULT *TSInsertRecordReq -func (p *TSIServiceInsertRecordArgs) GetReq() *TSInsertRecordReq { +var IClientRPCServiceFastInsertRecordsArgs_Req_DEFAULT *TSFastInsertRecordsReq +func (p *IClientRPCServiceFastInsertRecordsArgs) GetReq() *TSFastInsertRecordsReq { if !p.IsSetReq() { - return TSIServiceInsertRecordArgs_Req_DEFAULT + return IClientRPCServiceFastInsertRecordsArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceInsertRecordArgs) IsSetReq() bool { +func (p *IClientRPCServiceFastInsertRecordsArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceInsertRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceFastInsertRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -23557,16 +29317,16 @@ func (p *TSIServiceInsertRecordArgs) Read(ctx context.Context, iprot thrift.TPro return nil } -func (p *TSIServiceInsertRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertRecordReq{} +func (p *IClientRPCServiceFastInsertRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSFastInsertRecordsReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceInsertRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertRecord_args"); err != nil { +func (p *IClientRPCServiceFastInsertRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fastInsertRecords_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -23578,7 +29338,7 @@ func (p *TSIServiceInsertRecordArgs) Write(ctx context.Context, oprot thrift.TPr return nil } -func (p *TSIServiceInsertRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceFastInsertRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -23589,35 +29349,35 @@ func (p *TSIServiceInsertRecordArgs) writeField1(ctx context.Context, oprot thri return err } -func (p *TSIServiceInsertRecordArgs) String() string { +func (p *IClientRPCServiceFastInsertRecordsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertRecordArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFastInsertRecordsArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceInsertRecordResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceFastInsertRecordsResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceInsertRecordResult() *TSIServiceInsertRecordResult { - return &TSIServiceInsertRecordResult{} +func NewIClientRPCServiceFastInsertRecordsResult() *IClientRPCServiceFastInsertRecordsResult { + return &IClientRPCServiceFastInsertRecordsResult{} } -var TSIServiceInsertRecordResult_Success_DEFAULT *TSStatus -func (p *TSIServiceInsertRecordResult) GetSuccess() *TSStatus { +var IClientRPCServiceFastInsertRecordsResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceFastInsertRecordsResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceInsertRecordResult_Success_DEFAULT + return IClientRPCServiceFastInsertRecordsResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceInsertRecordResult) IsSetSuccess() bool { +func (p *IClientRPCServiceFastInsertRecordsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceInsertRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceFastInsertRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -23655,16 +29415,16 @@ func (p *TSIServiceInsertRecordResult) Read(ctx context.Context, iprot thrift.TP return nil } -func (p *TSIServiceInsertRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceFastInsertRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceInsertRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertRecord_result"); err != nil { +func (p *IClientRPCServiceFastInsertRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fastInsertRecords_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -23676,7 +29436,7 @@ func (p *TSIServiceInsertRecordResult) Write(ctx context.Context, oprot thrift.T return nil } -func (p *TSIServiceInsertRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceFastInsertRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -23689,35 +29449,35 @@ func (p *TSIServiceInsertRecordResult) writeField0(ctx context.Context, oprot th return err } -func (p *TSIServiceInsertRecordResult) String() string { +func (p *IClientRPCServiceFastInsertRecordsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertRecordResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFastInsertRecordsResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceInsertStringRecordArgs struct { - Req *TSInsertStringRecordReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceInsertRecordsOfOneDeviceArgs struct { + Req *TSInsertRecordsOfOneDeviceReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceInsertStringRecordArgs() *TSIServiceInsertStringRecordArgs { - return &TSIServiceInsertStringRecordArgs{} +func NewIClientRPCServiceInsertRecordsOfOneDeviceArgs() *IClientRPCServiceInsertRecordsOfOneDeviceArgs { + return &IClientRPCServiceInsertRecordsOfOneDeviceArgs{} } -var TSIServiceInsertStringRecordArgs_Req_DEFAULT *TSInsertStringRecordReq -func (p *TSIServiceInsertStringRecordArgs) GetReq() *TSInsertStringRecordReq { +var IClientRPCServiceInsertRecordsOfOneDeviceArgs_Req_DEFAULT *TSInsertRecordsOfOneDeviceReq +func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) GetReq() *TSInsertRecordsOfOneDeviceReq { if !p.IsSetReq() { - return TSIServiceInsertStringRecordArgs_Req_DEFAULT + return IClientRPCServiceInsertRecordsOfOneDeviceArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceInsertStringRecordArgs) IsSetReq() bool { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceInsertStringRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -23755,16 +29515,16 @@ func (p *TSIServiceInsertStringRecordArgs) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceInsertStringRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertStringRecordReq{} +func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertRecordsOfOneDeviceReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceInsertStringRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertStringRecord_args"); err != nil { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertRecordsOfOneDevice_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -23776,7 +29536,7 @@ func (p *TSIServiceInsertStringRecordArgs) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceInsertStringRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -23787,35 +29547,35 @@ func (p *TSIServiceInsertStringRecordArgs) writeField1(ctx context.Context, opro return err } -func (p *TSIServiceInsertStringRecordArgs) String() string { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertStringRecordArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertRecordsOfOneDeviceArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceInsertStringRecordResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceInsertRecordsOfOneDeviceResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceInsertStringRecordResult() *TSIServiceInsertStringRecordResult { - return &TSIServiceInsertStringRecordResult{} +func NewIClientRPCServiceInsertRecordsOfOneDeviceResult() *IClientRPCServiceInsertRecordsOfOneDeviceResult { + return &IClientRPCServiceInsertRecordsOfOneDeviceResult{} } -var TSIServiceInsertStringRecordResult_Success_DEFAULT *TSStatus -func (p *TSIServiceInsertStringRecordResult) GetSuccess() *TSStatus { +var IClientRPCServiceInsertRecordsOfOneDeviceResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceInsertStringRecordResult_Success_DEFAULT + return IClientRPCServiceInsertRecordsOfOneDeviceResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceInsertStringRecordResult) IsSetSuccess() bool { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceInsertStringRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -23853,16 +29613,16 @@ func (p *TSIServiceInsertStringRecordResult) Read(ctx context.Context, iprot thr return nil } -func (p *TSIServiceInsertStringRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceInsertStringRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertStringRecord_result"); err != nil { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertRecordsOfOneDevice_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -23874,7 +29634,7 @@ func (p *TSIServiceInsertStringRecordResult) Write(ctx context.Context, oprot th return nil } -func (p *TSIServiceInsertStringRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -23887,35 +29647,35 @@ func (p *TSIServiceInsertStringRecordResult) writeField0(ctx context.Context, op return err } -func (p *TSIServiceInsertStringRecordResult) String() string { +func (p *IClientRPCServiceInsertRecordsOfOneDeviceResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertStringRecordResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertRecordsOfOneDeviceResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceInsertTabletArgs struct { - Req *TSInsertTabletReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceInsertStringRecordsOfOneDeviceArgs struct { + Req *TSInsertStringRecordsOfOneDeviceReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceInsertTabletArgs() *TSIServiceInsertTabletArgs { - return &TSIServiceInsertTabletArgs{} +func NewIClientRPCServiceInsertStringRecordsOfOneDeviceArgs() *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs { + return &IClientRPCServiceInsertStringRecordsOfOneDeviceArgs{} } -var TSIServiceInsertTabletArgs_Req_DEFAULT *TSInsertTabletReq -func (p *TSIServiceInsertTabletArgs) GetReq() *TSInsertTabletReq { +var IClientRPCServiceInsertStringRecordsOfOneDeviceArgs_Req_DEFAULT *TSInsertStringRecordsOfOneDeviceReq +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) GetReq() *TSInsertStringRecordsOfOneDeviceReq { if !p.IsSetReq() { - return TSIServiceInsertTabletArgs_Req_DEFAULT + return IClientRPCServiceInsertStringRecordsOfOneDeviceArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceInsertTabletArgs) IsSetReq() bool { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceInsertTabletArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -23953,16 +29713,16 @@ func (p *TSIServiceInsertTabletArgs) Read(ctx context.Context, iprot thrift.TPro return nil } -func (p *TSIServiceInsertTabletArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertTabletReq{} +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertStringRecordsOfOneDeviceReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceInsertTabletArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertTablet_args"); err != nil { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertStringRecordsOfOneDevice_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -23974,7 +29734,7 @@ func (p *TSIServiceInsertTabletArgs) Write(ctx context.Context, oprot thrift.TPr return nil } -func (p *TSIServiceInsertTabletArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -23985,35 +29745,35 @@ func (p *TSIServiceInsertTabletArgs) writeField1(ctx context.Context, oprot thri return err } -func (p *TSIServiceInsertTabletArgs) String() string { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertTabletArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertStringRecordsOfOneDeviceArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceInsertTabletResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceInsertStringRecordsOfOneDeviceResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceInsertTabletResult() *TSIServiceInsertTabletResult { - return &TSIServiceInsertTabletResult{} +func NewIClientRPCServiceInsertStringRecordsOfOneDeviceResult() *IClientRPCServiceInsertStringRecordsOfOneDeviceResult { + return &IClientRPCServiceInsertStringRecordsOfOneDeviceResult{} } -var TSIServiceInsertTabletResult_Success_DEFAULT *TSStatus -func (p *TSIServiceInsertTabletResult) GetSuccess() *TSStatus { +var IClientRPCServiceInsertStringRecordsOfOneDeviceResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceInsertTabletResult_Success_DEFAULT + return IClientRPCServiceInsertStringRecordsOfOneDeviceResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceInsertTabletResult) IsSetSuccess() bool { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceInsertTabletResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24051,16 +29811,16 @@ func (p *TSIServiceInsertTabletResult) Read(ctx context.Context, iprot thrift.TP return nil } -func (p *TSIServiceInsertTabletResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceInsertTabletResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertTablet_result"); err != nil { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertStringRecordsOfOneDevice_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -24072,7 +29832,7 @@ func (p *TSIServiceInsertTabletResult) Write(ctx context.Context, oprot thrift.T return nil } -func (p *TSIServiceInsertTabletResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -24085,35 +29845,35 @@ func (p *TSIServiceInsertTabletResult) writeField0(ctx context.Context, oprot th return err } -func (p *TSIServiceInsertTabletResult) String() string { +func (p *IClientRPCServiceInsertStringRecordsOfOneDeviceResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertTabletResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertStringRecordsOfOneDeviceResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceInsertTabletsArgs struct { - Req *TSInsertTabletsReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceInsertStringRecordsArgs struct { + Req *TSInsertStringRecordsReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceInsertTabletsArgs() *TSIServiceInsertTabletsArgs { - return &TSIServiceInsertTabletsArgs{} +func NewIClientRPCServiceInsertStringRecordsArgs() *IClientRPCServiceInsertStringRecordsArgs { + return &IClientRPCServiceInsertStringRecordsArgs{} } -var TSIServiceInsertTabletsArgs_Req_DEFAULT *TSInsertTabletsReq -func (p *TSIServiceInsertTabletsArgs) GetReq() *TSInsertTabletsReq { +var IClientRPCServiceInsertStringRecordsArgs_Req_DEFAULT *TSInsertStringRecordsReq +func (p *IClientRPCServiceInsertStringRecordsArgs) GetReq() *TSInsertStringRecordsReq { if !p.IsSetReq() { - return TSIServiceInsertTabletsArgs_Req_DEFAULT + return IClientRPCServiceInsertStringRecordsArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceInsertTabletsArgs) IsSetReq() bool { +func (p *IClientRPCServiceInsertStringRecordsArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceInsertTabletsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertStringRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24151,16 +29911,16 @@ func (p *TSIServiceInsertTabletsArgs) Read(ctx context.Context, iprot thrift.TPr return nil } -func (p *TSIServiceInsertTabletsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertTabletsReq{} +func (p *IClientRPCServiceInsertStringRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertStringRecordsReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceInsertTabletsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertTablets_args"); err != nil { +func (p *IClientRPCServiceInsertStringRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertStringRecords_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -24172,7 +29932,7 @@ func (p *TSIServiceInsertTabletsArgs) Write(ctx context.Context, oprot thrift.TP return nil } -func (p *TSIServiceInsertTabletsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertStringRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -24183,35 +29943,35 @@ func (p *TSIServiceInsertTabletsArgs) writeField1(ctx context.Context, oprot thr return err } -func (p *TSIServiceInsertTabletsArgs) String() string { +func (p *IClientRPCServiceInsertStringRecordsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertTabletsArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertStringRecordsArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceInsertTabletsResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceInsertStringRecordsResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceInsertTabletsResult() *TSIServiceInsertTabletsResult { - return &TSIServiceInsertTabletsResult{} +func NewIClientRPCServiceInsertStringRecordsResult() *IClientRPCServiceInsertStringRecordsResult { + return &IClientRPCServiceInsertStringRecordsResult{} } -var TSIServiceInsertTabletsResult_Success_DEFAULT *TSStatus -func (p *TSIServiceInsertTabletsResult) GetSuccess() *TSStatus { +var IClientRPCServiceInsertStringRecordsResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceInsertStringRecordsResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceInsertTabletsResult_Success_DEFAULT + return IClientRPCServiceInsertStringRecordsResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceInsertTabletsResult) IsSetSuccess() bool { +func (p *IClientRPCServiceInsertStringRecordsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceInsertTabletsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceInsertStringRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24249,16 +30009,16 @@ func (p *TSIServiceInsertTabletsResult) Read(ctx context.Context, iprot thrift.T return nil } -func (p *TSIServiceInsertTabletsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceInsertStringRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceInsertTabletsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertTablets_result"); err != nil { +func (p *IClientRPCServiceInsertStringRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "insertStringRecords_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -24270,7 +30030,7 @@ func (p *TSIServiceInsertTabletsResult) Write(ctx context.Context, oprot thrift. return nil } -func (p *TSIServiceInsertTabletsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceInsertStringRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -24283,35 +30043,35 @@ func (p *TSIServiceInsertTabletsResult) writeField0(ctx context.Context, oprot t return err } -func (p *TSIServiceInsertTabletsResult) String() string { +func (p *IClientRPCServiceInsertStringRecordsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertTabletsResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceInsertStringRecordsResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceInsertRecordsArgs struct { - Req *TSInsertRecordsReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceTestInsertTabletArgs struct { + Req *TSInsertTabletReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceInsertRecordsArgs() *TSIServiceInsertRecordsArgs { - return &TSIServiceInsertRecordsArgs{} +func NewIClientRPCServiceTestInsertTabletArgs() *IClientRPCServiceTestInsertTabletArgs { + return &IClientRPCServiceTestInsertTabletArgs{} } -var TSIServiceInsertRecordsArgs_Req_DEFAULT *TSInsertRecordsReq -func (p *TSIServiceInsertRecordsArgs) GetReq() *TSInsertRecordsReq { +var IClientRPCServiceTestInsertTabletArgs_Req_DEFAULT *TSInsertTabletReq +func (p *IClientRPCServiceTestInsertTabletArgs) GetReq() *TSInsertTabletReq { if !p.IsSetReq() { - return TSIServiceInsertRecordsArgs_Req_DEFAULT + return IClientRPCServiceTestInsertTabletArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceInsertRecordsArgs) IsSetReq() bool { +func (p *IClientRPCServiceTestInsertTabletArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceInsertRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertTabletArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24349,16 +30109,16 @@ func (p *TSIServiceInsertRecordsArgs) Read(ctx context.Context, iprot thrift.TPr return nil } -func (p *TSIServiceInsertRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertRecordsReq{} +func (p *IClientRPCServiceTestInsertTabletArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertTabletReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceInsertRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertRecords_args"); err != nil { +func (p *IClientRPCServiceTestInsertTabletArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertTablet_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -24370,7 +30130,7 @@ func (p *TSIServiceInsertRecordsArgs) Write(ctx context.Context, oprot thrift.TP return nil } -func (p *TSIServiceInsertRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertTabletArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -24381,35 +30141,35 @@ func (p *TSIServiceInsertRecordsArgs) writeField1(ctx context.Context, oprot thr return err } -func (p *TSIServiceInsertRecordsArgs) String() string { +func (p *IClientRPCServiceTestInsertTabletArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertRecordsArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertTabletArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceInsertRecordsResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceTestInsertTabletResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceInsertRecordsResult() *TSIServiceInsertRecordsResult { - return &TSIServiceInsertRecordsResult{} +func NewIClientRPCServiceTestInsertTabletResult() *IClientRPCServiceTestInsertTabletResult { + return &IClientRPCServiceTestInsertTabletResult{} } -var TSIServiceInsertRecordsResult_Success_DEFAULT *TSStatus -func (p *TSIServiceInsertRecordsResult) GetSuccess() *TSStatus { +var IClientRPCServiceTestInsertTabletResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceTestInsertTabletResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceInsertRecordsResult_Success_DEFAULT + return IClientRPCServiceTestInsertTabletResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceInsertRecordsResult) IsSetSuccess() bool { +func (p *IClientRPCServiceTestInsertTabletResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceInsertRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertTabletResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24447,16 +30207,16 @@ func (p *TSIServiceInsertRecordsResult) Read(ctx context.Context, iprot thrift.T return nil } -func (p *TSIServiceInsertRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceTestInsertTabletResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceInsertRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertRecords_result"); err != nil { +func (p *IClientRPCServiceTestInsertTabletResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertTablet_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -24468,7 +30228,7 @@ func (p *TSIServiceInsertRecordsResult) Write(ctx context.Context, oprot thrift. return nil } -func (p *TSIServiceInsertRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertTabletResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -24481,35 +30241,35 @@ func (p *TSIServiceInsertRecordsResult) writeField0(ctx context.Context, oprot t return err } -func (p *TSIServiceInsertRecordsResult) String() string { +func (p *IClientRPCServiceTestInsertTabletResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertRecordsResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertTabletResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceInsertRecordsOfOneDeviceArgs struct { - Req *TSInsertRecordsOfOneDeviceReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceTestInsertTabletsArgs struct { + Req *TSInsertTabletsReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceInsertRecordsOfOneDeviceArgs() *TSIServiceInsertRecordsOfOneDeviceArgs { - return &TSIServiceInsertRecordsOfOneDeviceArgs{} +func NewIClientRPCServiceTestInsertTabletsArgs() *IClientRPCServiceTestInsertTabletsArgs { + return &IClientRPCServiceTestInsertTabletsArgs{} } -var TSIServiceInsertRecordsOfOneDeviceArgs_Req_DEFAULT *TSInsertRecordsOfOneDeviceReq -func (p *TSIServiceInsertRecordsOfOneDeviceArgs) GetReq() *TSInsertRecordsOfOneDeviceReq { +var IClientRPCServiceTestInsertTabletsArgs_Req_DEFAULT *TSInsertTabletsReq +func (p *IClientRPCServiceTestInsertTabletsArgs) GetReq() *TSInsertTabletsReq { if !p.IsSetReq() { - return TSIServiceInsertRecordsOfOneDeviceArgs_Req_DEFAULT + return IClientRPCServiceTestInsertTabletsArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceInsertRecordsOfOneDeviceArgs) IsSetReq() bool { +func (p *IClientRPCServiceTestInsertTabletsArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceInsertRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertTabletsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24547,16 +30307,16 @@ func (p *TSIServiceInsertRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot return nil } -func (p *TSIServiceInsertRecordsOfOneDeviceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertRecordsOfOneDeviceReq{} +func (p *IClientRPCServiceTestInsertTabletsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertTabletsReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceInsertRecordsOfOneDeviceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertRecordsOfOneDevice_args"); err != nil { +func (p *IClientRPCServiceTestInsertTabletsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertTablets_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -24568,7 +30328,7 @@ func (p *TSIServiceInsertRecordsOfOneDeviceArgs) Write(ctx context.Context, opro return nil } -func (p *TSIServiceInsertRecordsOfOneDeviceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertTabletsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -24579,35 +30339,35 @@ func (p *TSIServiceInsertRecordsOfOneDeviceArgs) writeField1(ctx context.Context return err } -func (p *TSIServiceInsertRecordsOfOneDeviceArgs) String() string { +func (p *IClientRPCServiceTestInsertTabletsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertRecordsOfOneDeviceArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertTabletsArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceInsertRecordsOfOneDeviceResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceTestInsertTabletsResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceInsertRecordsOfOneDeviceResult() *TSIServiceInsertRecordsOfOneDeviceResult { - return &TSIServiceInsertRecordsOfOneDeviceResult{} +func NewIClientRPCServiceTestInsertTabletsResult() *IClientRPCServiceTestInsertTabletsResult { + return &IClientRPCServiceTestInsertTabletsResult{} } -var TSIServiceInsertRecordsOfOneDeviceResult_Success_DEFAULT *TSStatus -func (p *TSIServiceInsertRecordsOfOneDeviceResult) GetSuccess() *TSStatus { +var IClientRPCServiceTestInsertTabletsResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceTestInsertTabletsResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceInsertRecordsOfOneDeviceResult_Success_DEFAULT + return IClientRPCServiceTestInsertTabletsResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceInsertRecordsOfOneDeviceResult) IsSetSuccess() bool { +func (p *IClientRPCServiceTestInsertTabletsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceInsertRecordsOfOneDeviceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertTabletsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24645,16 +30405,16 @@ func (p *TSIServiceInsertRecordsOfOneDeviceResult) Read(ctx context.Context, ipr return nil } -func (p *TSIServiceInsertRecordsOfOneDeviceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceTestInsertTabletsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceInsertRecordsOfOneDeviceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertRecordsOfOneDevice_result"); err != nil { +func (p *IClientRPCServiceTestInsertTabletsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertTablets_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -24666,7 +30426,7 @@ func (p *TSIServiceInsertRecordsOfOneDeviceResult) Write(ctx context.Context, op return nil } -func (p *TSIServiceInsertRecordsOfOneDeviceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertTabletsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -24679,35 +30439,35 @@ func (p *TSIServiceInsertRecordsOfOneDeviceResult) writeField0(ctx context.Conte return err } -func (p *TSIServiceInsertRecordsOfOneDeviceResult) String() string { +func (p *IClientRPCServiceTestInsertTabletsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertRecordsOfOneDeviceResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertTabletsResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceInsertStringRecordsOfOneDeviceArgs struct { - Req *TSInsertStringRecordsOfOneDeviceReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceTestInsertRecordArgs struct { + Req *TSInsertRecordReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceInsertStringRecordsOfOneDeviceArgs() *TSIServiceInsertStringRecordsOfOneDeviceArgs { - return &TSIServiceInsertStringRecordsOfOneDeviceArgs{} +func NewIClientRPCServiceTestInsertRecordArgs() *IClientRPCServiceTestInsertRecordArgs { + return &IClientRPCServiceTestInsertRecordArgs{} } -var TSIServiceInsertStringRecordsOfOneDeviceArgs_Req_DEFAULT *TSInsertStringRecordsOfOneDeviceReq -func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) GetReq() *TSInsertStringRecordsOfOneDeviceReq { +var IClientRPCServiceTestInsertRecordArgs_Req_DEFAULT *TSInsertRecordReq +func (p *IClientRPCServiceTestInsertRecordArgs) GetReq() *TSInsertRecordReq { if !p.IsSetReq() { - return TSIServiceInsertStringRecordsOfOneDeviceArgs_Req_DEFAULT + return IClientRPCServiceTestInsertRecordArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) IsSetReq() bool { +func (p *IClientRPCServiceTestInsertRecordArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24745,16 +30505,16 @@ func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) Read(ctx context.Context, return nil } -func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertStringRecordsOfOneDeviceReq{} +func (p *IClientRPCServiceTestInsertRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertRecordReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertStringRecordsOfOneDevice_args"); err != nil { +func (p *IClientRPCServiceTestInsertRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertRecord_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -24766,7 +30526,7 @@ func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) Write(ctx context.Context return nil } -func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -24777,35 +30537,35 @@ func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) writeField1(ctx context.C return err } -func (p *TSIServiceInsertStringRecordsOfOneDeviceArgs) String() string { +func (p *IClientRPCServiceTestInsertRecordArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertStringRecordsOfOneDeviceArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertRecordArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceInsertStringRecordsOfOneDeviceResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceTestInsertRecordResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceInsertStringRecordsOfOneDeviceResult() *TSIServiceInsertStringRecordsOfOneDeviceResult { - return &TSIServiceInsertStringRecordsOfOneDeviceResult{} +func NewIClientRPCServiceTestInsertRecordResult() *IClientRPCServiceTestInsertRecordResult { + return &IClientRPCServiceTestInsertRecordResult{} } -var TSIServiceInsertStringRecordsOfOneDeviceResult_Success_DEFAULT *TSStatus -func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) GetSuccess() *TSStatus { +var IClientRPCServiceTestInsertRecordResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceTestInsertRecordResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceInsertStringRecordsOfOneDeviceResult_Success_DEFAULT + return IClientRPCServiceTestInsertRecordResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) IsSetSuccess() bool { +func (p *IClientRPCServiceTestInsertRecordResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24843,16 +30603,16 @@ func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) Read(ctx context.Contex return nil } -func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceTestInsertRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertStringRecordsOfOneDevice_result"); err != nil { +func (p *IClientRPCServiceTestInsertRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertRecord_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -24864,7 +30624,7 @@ func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) Write(ctx context.Conte return nil } -func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -24877,35 +30637,35 @@ func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) writeField0(ctx context return err } -func (p *TSIServiceInsertStringRecordsOfOneDeviceResult) String() string { +func (p *IClientRPCServiceTestInsertRecordResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertStringRecordsOfOneDeviceResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertRecordResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceInsertStringRecordsArgs struct { - Req *TSInsertStringRecordsReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceTestInsertStringRecordArgs struct { + Req *TSInsertStringRecordReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceInsertStringRecordsArgs() *TSIServiceInsertStringRecordsArgs { - return &TSIServiceInsertStringRecordsArgs{} +func NewIClientRPCServiceTestInsertStringRecordArgs() *IClientRPCServiceTestInsertStringRecordArgs { + return &IClientRPCServiceTestInsertStringRecordArgs{} } -var TSIServiceInsertStringRecordsArgs_Req_DEFAULT *TSInsertStringRecordsReq -func (p *TSIServiceInsertStringRecordsArgs) GetReq() *TSInsertStringRecordsReq { +var IClientRPCServiceTestInsertStringRecordArgs_Req_DEFAULT *TSInsertStringRecordReq +func (p *IClientRPCServiceTestInsertStringRecordArgs) GetReq() *TSInsertStringRecordReq { if !p.IsSetReq() { - return TSIServiceInsertStringRecordsArgs_Req_DEFAULT + return IClientRPCServiceTestInsertStringRecordArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceInsertStringRecordsArgs) IsSetReq() bool { +func (p *IClientRPCServiceTestInsertStringRecordArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceInsertStringRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertStringRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -24943,16 +30703,16 @@ func (p *TSIServiceInsertStringRecordsArgs) Read(ctx context.Context, iprot thri return nil } -func (p *TSIServiceInsertStringRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertStringRecordsReq{} +func (p *IClientRPCServiceTestInsertStringRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertStringRecordReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceInsertStringRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertStringRecords_args"); err != nil { +func (p *IClientRPCServiceTestInsertStringRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertStringRecord_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -24964,7 +30724,7 @@ func (p *TSIServiceInsertStringRecordsArgs) Write(ctx context.Context, oprot thr return nil } -func (p *TSIServiceInsertStringRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertStringRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -24975,35 +30735,35 @@ func (p *TSIServiceInsertStringRecordsArgs) writeField1(ctx context.Context, opr return err } -func (p *TSIServiceInsertStringRecordsArgs) String() string { +func (p *IClientRPCServiceTestInsertStringRecordArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertStringRecordsArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertStringRecordArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceInsertStringRecordsResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceTestInsertStringRecordResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceInsertStringRecordsResult() *TSIServiceInsertStringRecordsResult { - return &TSIServiceInsertStringRecordsResult{} +func NewIClientRPCServiceTestInsertStringRecordResult() *IClientRPCServiceTestInsertStringRecordResult { + return &IClientRPCServiceTestInsertStringRecordResult{} } -var TSIServiceInsertStringRecordsResult_Success_DEFAULT *TSStatus -func (p *TSIServiceInsertStringRecordsResult) GetSuccess() *TSStatus { +var IClientRPCServiceTestInsertStringRecordResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceTestInsertStringRecordResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceInsertStringRecordsResult_Success_DEFAULT + return IClientRPCServiceTestInsertStringRecordResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceInsertStringRecordsResult) IsSetSuccess() bool { +func (p *IClientRPCServiceTestInsertStringRecordResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceInsertStringRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertStringRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25041,16 +30801,16 @@ func (p *TSIServiceInsertStringRecordsResult) Read(ctx context.Context, iprot th return nil } -func (p *TSIServiceInsertStringRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceTestInsertStringRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceInsertStringRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "insertStringRecords_result"); err != nil { +func (p *IClientRPCServiceTestInsertStringRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertStringRecord_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -25062,7 +30822,7 @@ func (p *TSIServiceInsertStringRecordsResult) Write(ctx context.Context, oprot t return nil } -func (p *TSIServiceInsertStringRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertStringRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -25075,35 +30835,35 @@ func (p *TSIServiceInsertStringRecordsResult) writeField0(ctx context.Context, o return err } -func (p *TSIServiceInsertStringRecordsResult) String() string { +func (p *IClientRPCServiceTestInsertStringRecordResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceInsertStringRecordsResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertStringRecordResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceTestInsertTabletArgs struct { - Req *TSInsertTabletReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceTestInsertRecordsArgs struct { + Req *TSInsertRecordsReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceTestInsertTabletArgs() *TSIServiceTestInsertTabletArgs { - return &TSIServiceTestInsertTabletArgs{} +func NewIClientRPCServiceTestInsertRecordsArgs() *IClientRPCServiceTestInsertRecordsArgs { + return &IClientRPCServiceTestInsertRecordsArgs{} } -var TSIServiceTestInsertTabletArgs_Req_DEFAULT *TSInsertTabletReq -func (p *TSIServiceTestInsertTabletArgs) GetReq() *TSInsertTabletReq { +var IClientRPCServiceTestInsertRecordsArgs_Req_DEFAULT *TSInsertRecordsReq +func (p *IClientRPCServiceTestInsertRecordsArgs) GetReq() *TSInsertRecordsReq { if !p.IsSetReq() { - return TSIServiceTestInsertTabletArgs_Req_DEFAULT + return IClientRPCServiceTestInsertRecordsArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceTestInsertTabletArgs) IsSetReq() bool { +func (p *IClientRPCServiceTestInsertRecordsArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceTestInsertTabletArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25141,16 +30901,16 @@ func (p *TSIServiceTestInsertTabletArgs) Read(ctx context.Context, iprot thrift. return nil } -func (p *TSIServiceTestInsertTabletArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertTabletReq{} +func (p *IClientRPCServiceTestInsertRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertRecordsReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceTestInsertTabletArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertTablet_args"); err != nil { +func (p *IClientRPCServiceTestInsertRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertRecords_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -25162,7 +30922,7 @@ func (p *TSIServiceTestInsertTabletArgs) Write(ctx context.Context, oprot thrift return nil } -func (p *TSIServiceTestInsertTabletArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -25173,35 +30933,35 @@ func (p *TSIServiceTestInsertTabletArgs) writeField1(ctx context.Context, oprot return err } -func (p *TSIServiceTestInsertTabletArgs) String() string { +func (p *IClientRPCServiceTestInsertRecordsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertTabletArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertRecordsArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceTestInsertTabletResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceTestInsertRecordsResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceTestInsertTabletResult() *TSIServiceTestInsertTabletResult { - return &TSIServiceTestInsertTabletResult{} +func NewIClientRPCServiceTestInsertRecordsResult() *IClientRPCServiceTestInsertRecordsResult { + return &IClientRPCServiceTestInsertRecordsResult{} } -var TSIServiceTestInsertTabletResult_Success_DEFAULT *TSStatus -func (p *TSIServiceTestInsertTabletResult) GetSuccess() *TSStatus { +var IClientRPCServiceTestInsertRecordsResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceTestInsertRecordsResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceTestInsertTabletResult_Success_DEFAULT + return IClientRPCServiceTestInsertRecordsResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceTestInsertTabletResult) IsSetSuccess() bool { +func (p *IClientRPCServiceTestInsertRecordsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceTestInsertTabletResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25239,16 +30999,16 @@ func (p *TSIServiceTestInsertTabletResult) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceTestInsertTabletResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceTestInsertRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceTestInsertTabletResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertTablet_result"); err != nil { +func (p *IClientRPCServiceTestInsertRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertRecords_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -25260,7 +31020,7 @@ func (p *TSIServiceTestInsertTabletResult) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceTestInsertTabletResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -25273,35 +31033,35 @@ func (p *TSIServiceTestInsertTabletResult) writeField0(ctx context.Context, opro return err } -func (p *TSIServiceTestInsertTabletResult) String() string { +func (p *IClientRPCServiceTestInsertRecordsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertTabletResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertRecordsResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceTestInsertTabletsArgs struct { - Req *TSInsertTabletsReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceTestInsertRecordsOfOneDeviceArgs struct { + Req *TSInsertRecordsOfOneDeviceReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceTestInsertTabletsArgs() *TSIServiceTestInsertTabletsArgs { - return &TSIServiceTestInsertTabletsArgs{} +func NewIClientRPCServiceTestInsertRecordsOfOneDeviceArgs() *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs { + return &IClientRPCServiceTestInsertRecordsOfOneDeviceArgs{} } -var TSIServiceTestInsertTabletsArgs_Req_DEFAULT *TSInsertTabletsReq -func (p *TSIServiceTestInsertTabletsArgs) GetReq() *TSInsertTabletsReq { +var IClientRPCServiceTestInsertRecordsOfOneDeviceArgs_Req_DEFAULT *TSInsertRecordsOfOneDeviceReq +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) GetReq() *TSInsertRecordsOfOneDeviceReq { if !p.IsSetReq() { - return TSIServiceTestInsertTabletsArgs_Req_DEFAULT + return IClientRPCServiceTestInsertRecordsOfOneDeviceArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceTestInsertTabletsArgs) IsSetReq() bool { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceTestInsertTabletsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25339,16 +31099,16 @@ func (p *TSIServiceTestInsertTabletsArgs) Read(ctx context.Context, iprot thrift return nil } -func (p *TSIServiceTestInsertTabletsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertTabletsReq{} +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertRecordsOfOneDeviceReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceTestInsertTabletsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertTablets_args"); err != nil { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertRecordsOfOneDevice_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -25360,7 +31120,7 @@ func (p *TSIServiceTestInsertTabletsArgs) Write(ctx context.Context, oprot thrif return nil } -func (p *TSIServiceTestInsertTabletsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -25371,35 +31131,35 @@ func (p *TSIServiceTestInsertTabletsArgs) writeField1(ctx context.Context, oprot return err } -func (p *TSIServiceTestInsertTabletsArgs) String() string { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertTabletsArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertRecordsOfOneDeviceArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceTestInsertTabletsResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceTestInsertRecordsOfOneDeviceResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceTestInsertTabletsResult() *TSIServiceTestInsertTabletsResult { - return &TSIServiceTestInsertTabletsResult{} +func NewIClientRPCServiceTestInsertRecordsOfOneDeviceResult() *IClientRPCServiceTestInsertRecordsOfOneDeviceResult { + return &IClientRPCServiceTestInsertRecordsOfOneDeviceResult{} } -var TSIServiceTestInsertTabletsResult_Success_DEFAULT *TSStatus -func (p *TSIServiceTestInsertTabletsResult) GetSuccess() *TSStatus { +var IClientRPCServiceTestInsertRecordsOfOneDeviceResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceTestInsertTabletsResult_Success_DEFAULT + return IClientRPCServiceTestInsertRecordsOfOneDeviceResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceTestInsertTabletsResult) IsSetSuccess() bool { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceTestInsertTabletsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25437,16 +31197,16 @@ func (p *TSIServiceTestInsertTabletsResult) Read(ctx context.Context, iprot thri return nil } -func (p *TSIServiceTestInsertTabletsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceTestInsertTabletsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertTablets_result"); err != nil { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertRecordsOfOneDevice_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -25458,7 +31218,7 @@ func (p *TSIServiceTestInsertTabletsResult) Write(ctx context.Context, oprot thr return nil } -func (p *TSIServiceTestInsertTabletsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -25471,35 +31231,35 @@ func (p *TSIServiceTestInsertTabletsResult) writeField0(ctx context.Context, opr return err } -func (p *TSIServiceTestInsertTabletsResult) String() string { +func (p *IClientRPCServiceTestInsertRecordsOfOneDeviceResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertTabletsResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertRecordsOfOneDeviceResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceTestInsertRecordArgs struct { - Req *TSInsertRecordReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceTestInsertStringRecordsArgs struct { + Req *TSInsertStringRecordsReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceTestInsertRecordArgs() *TSIServiceTestInsertRecordArgs { - return &TSIServiceTestInsertRecordArgs{} +func NewIClientRPCServiceTestInsertStringRecordsArgs() *IClientRPCServiceTestInsertStringRecordsArgs { + return &IClientRPCServiceTestInsertStringRecordsArgs{} } -var TSIServiceTestInsertRecordArgs_Req_DEFAULT *TSInsertRecordReq -func (p *TSIServiceTestInsertRecordArgs) GetReq() *TSInsertRecordReq { +var IClientRPCServiceTestInsertStringRecordsArgs_Req_DEFAULT *TSInsertStringRecordsReq +func (p *IClientRPCServiceTestInsertStringRecordsArgs) GetReq() *TSInsertStringRecordsReq { if !p.IsSetReq() { - return TSIServiceTestInsertRecordArgs_Req_DEFAULT + return IClientRPCServiceTestInsertStringRecordsArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceTestInsertRecordArgs) IsSetReq() bool { +func (p *IClientRPCServiceTestInsertStringRecordsArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceTestInsertRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertStringRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25537,16 +31297,16 @@ func (p *TSIServiceTestInsertRecordArgs) Read(ctx context.Context, iprot thrift. return nil } -func (p *TSIServiceTestInsertRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertRecordReq{} +func (p *IClientRPCServiceTestInsertStringRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSInsertStringRecordsReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceTestInsertRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertRecord_args"); err != nil { +func (p *IClientRPCServiceTestInsertStringRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertStringRecords_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -25558,7 +31318,7 @@ func (p *TSIServiceTestInsertRecordArgs) Write(ctx context.Context, oprot thrift return nil } -func (p *TSIServiceTestInsertRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertStringRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -25569,35 +31329,35 @@ func (p *TSIServiceTestInsertRecordArgs) writeField1(ctx context.Context, oprot return err } -func (p *TSIServiceTestInsertRecordArgs) String() string { +func (p *IClientRPCServiceTestInsertStringRecordsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertRecordArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertStringRecordsArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceTestInsertRecordResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceTestInsertStringRecordsResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceTestInsertRecordResult() *TSIServiceTestInsertRecordResult { - return &TSIServiceTestInsertRecordResult{} +func NewIClientRPCServiceTestInsertStringRecordsResult() *IClientRPCServiceTestInsertStringRecordsResult { + return &IClientRPCServiceTestInsertStringRecordsResult{} } -var TSIServiceTestInsertRecordResult_Success_DEFAULT *TSStatus -func (p *TSIServiceTestInsertRecordResult) GetSuccess() *TSStatus { +var IClientRPCServiceTestInsertStringRecordsResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceTestInsertStringRecordsResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceTestInsertRecordResult_Success_DEFAULT + return IClientRPCServiceTestInsertStringRecordsResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceTestInsertRecordResult) IsSetSuccess() bool { +func (p *IClientRPCServiceTestInsertStringRecordsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceTestInsertRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestInsertStringRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25635,16 +31395,16 @@ func (p *TSIServiceTestInsertRecordResult) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceTestInsertRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceTestInsertStringRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceTestInsertRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertRecord_result"); err != nil { +func (p *IClientRPCServiceTestInsertStringRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testInsertStringRecords_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -25656,7 +31416,7 @@ func (p *TSIServiceTestInsertRecordResult) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceTestInsertRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestInsertStringRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -25669,35 +31429,35 @@ func (p *TSIServiceTestInsertRecordResult) writeField0(ctx context.Context, opro return err } -func (p *TSIServiceTestInsertRecordResult) String() string { +func (p *IClientRPCServiceTestInsertStringRecordsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertRecordResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestInsertStringRecordsResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceTestInsertStringRecordArgs struct { - Req *TSInsertStringRecordReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceDeleteDataArgs struct { + Req *TSDeleteDataReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceTestInsertStringRecordArgs() *TSIServiceTestInsertStringRecordArgs { - return &TSIServiceTestInsertStringRecordArgs{} +func NewIClientRPCServiceDeleteDataArgs() *IClientRPCServiceDeleteDataArgs { + return &IClientRPCServiceDeleteDataArgs{} } -var TSIServiceTestInsertStringRecordArgs_Req_DEFAULT *TSInsertStringRecordReq -func (p *TSIServiceTestInsertStringRecordArgs) GetReq() *TSInsertStringRecordReq { +var IClientRPCServiceDeleteDataArgs_Req_DEFAULT *TSDeleteDataReq +func (p *IClientRPCServiceDeleteDataArgs) GetReq() *TSDeleteDataReq { if !p.IsSetReq() { - return TSIServiceTestInsertStringRecordArgs_Req_DEFAULT + return IClientRPCServiceDeleteDataArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceTestInsertStringRecordArgs) IsSetReq() bool { +func (p *IClientRPCServiceDeleteDataArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceTestInsertStringRecordArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceDeleteDataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25735,16 +31495,16 @@ func (p *TSIServiceTestInsertStringRecordArgs) Read(ctx context.Context, iprot t return nil } -func (p *TSIServiceTestInsertStringRecordArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertStringRecordReq{} +func (p *IClientRPCServiceDeleteDataArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSDeleteDataReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceTestInsertStringRecordArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertStringRecord_args"); err != nil { +func (p *IClientRPCServiceDeleteDataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteData_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -25756,7 +31516,7 @@ func (p *TSIServiceTestInsertStringRecordArgs) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceTestInsertStringRecordArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceDeleteDataArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -25767,35 +31527,35 @@ func (p *TSIServiceTestInsertStringRecordArgs) writeField1(ctx context.Context, return err } -func (p *TSIServiceTestInsertStringRecordArgs) String() string { +func (p *IClientRPCServiceDeleteDataArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertStringRecordArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceDeleteDataArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceTestInsertStringRecordResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceDeleteDataResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceTestInsertStringRecordResult() *TSIServiceTestInsertStringRecordResult { - return &TSIServiceTestInsertStringRecordResult{} +func NewIClientRPCServiceDeleteDataResult() *IClientRPCServiceDeleteDataResult { + return &IClientRPCServiceDeleteDataResult{} } -var TSIServiceTestInsertStringRecordResult_Success_DEFAULT *TSStatus -func (p *TSIServiceTestInsertStringRecordResult) GetSuccess() *TSStatus { +var IClientRPCServiceDeleteDataResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceDeleteDataResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceTestInsertStringRecordResult_Success_DEFAULT + return IClientRPCServiceDeleteDataResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceTestInsertStringRecordResult) IsSetSuccess() bool { +func (p *IClientRPCServiceDeleteDataResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceTestInsertStringRecordResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceDeleteDataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25833,16 +31593,16 @@ func (p *TSIServiceTestInsertStringRecordResult) Read(ctx context.Context, iprot return nil } -func (p *TSIServiceTestInsertStringRecordResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceDeleteDataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceTestInsertStringRecordResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertStringRecord_result"); err != nil { +func (p *IClientRPCServiceDeleteDataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteData_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -25854,7 +31614,7 @@ func (p *TSIServiceTestInsertStringRecordResult) Write(ctx context.Context, opro return nil } -func (p *TSIServiceTestInsertStringRecordResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceDeleteDataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -25867,35 +31627,35 @@ func (p *TSIServiceTestInsertStringRecordResult) writeField0(ctx context.Context return err } -func (p *TSIServiceTestInsertStringRecordResult) String() string { +func (p *IClientRPCServiceDeleteDataResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertStringRecordResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceDeleteDataResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceTestInsertRecordsArgs struct { - Req *TSInsertRecordsReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceExecuteRawDataQueryArgs struct { + Req *TSRawDataQueryReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceTestInsertRecordsArgs() *TSIServiceTestInsertRecordsArgs { - return &TSIServiceTestInsertRecordsArgs{} +func NewIClientRPCServiceExecuteRawDataQueryArgs() *IClientRPCServiceExecuteRawDataQueryArgs { + return &IClientRPCServiceExecuteRawDataQueryArgs{} } -var TSIServiceTestInsertRecordsArgs_Req_DEFAULT *TSInsertRecordsReq -func (p *TSIServiceTestInsertRecordsArgs) GetReq() *TSInsertRecordsReq { +var IClientRPCServiceExecuteRawDataQueryArgs_Req_DEFAULT *TSRawDataQueryReq +func (p *IClientRPCServiceExecuteRawDataQueryArgs) GetReq() *TSRawDataQueryReq { if !p.IsSetReq() { - return TSIServiceTestInsertRecordsArgs_Req_DEFAULT + return IClientRPCServiceExecuteRawDataQueryArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceTestInsertRecordsArgs) IsSetReq() bool { +func (p *IClientRPCServiceExecuteRawDataQueryArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceTestInsertRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteRawDataQueryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -25933,16 +31693,16 @@ func (p *TSIServiceTestInsertRecordsArgs) Read(ctx context.Context, iprot thrift return nil } -func (p *TSIServiceTestInsertRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertRecordsReq{} +func (p *IClientRPCServiceExecuteRawDataQueryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSRawDataQueryReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceTestInsertRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertRecords_args"); err != nil { +func (p *IClientRPCServiceExecuteRawDataQueryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeRawDataQuery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -25954,7 +31714,7 @@ func (p *TSIServiceTestInsertRecordsArgs) Write(ctx context.Context, oprot thrif return nil } -func (p *TSIServiceTestInsertRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteRawDataQueryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -25965,35 +31725,35 @@ func (p *TSIServiceTestInsertRecordsArgs) writeField1(ctx context.Context, oprot return err } -func (p *TSIServiceTestInsertRecordsArgs) String() string { +func (p *IClientRPCServiceExecuteRawDataQueryArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertRecordsArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceTestInsertRecordsResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceExecuteRawDataQueryResult struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceTestInsertRecordsResult() *TSIServiceTestInsertRecordsResult { - return &TSIServiceTestInsertRecordsResult{} +func NewIClientRPCServiceExecuteRawDataQueryResult() *IClientRPCServiceExecuteRawDataQueryResult { + return &IClientRPCServiceExecuteRawDataQueryResult{} } -var TSIServiceTestInsertRecordsResult_Success_DEFAULT *TSStatus -func (p *TSIServiceTestInsertRecordsResult) GetSuccess() *TSStatus { +var IClientRPCServiceExecuteRawDataQueryResult_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteRawDataQueryResult) GetSuccess() *TSExecuteStatementResp { if !p.IsSetSuccess() { - return TSIServiceTestInsertRecordsResult_Success_DEFAULT + return IClientRPCServiceExecuteRawDataQueryResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceTestInsertRecordsResult) IsSetSuccess() bool { +func (p *IClientRPCServiceExecuteRawDataQueryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceTestInsertRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteRawDataQueryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26031,16 +31791,16 @@ func (p *TSIServiceTestInsertRecordsResult) Read(ctx context.Context, iprot thri return nil } -func (p *TSIServiceTestInsertRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceExecuteRawDataQueryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceTestInsertRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertRecords_result"); err != nil { +func (p *IClientRPCServiceExecuteRawDataQueryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeRawDataQuery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -26052,7 +31812,7 @@ func (p *TSIServiceTestInsertRecordsResult) Write(ctx context.Context, oprot thr return nil } -func (p *TSIServiceTestInsertRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteRawDataQueryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -26065,35 +31825,35 @@ func (p *TSIServiceTestInsertRecordsResult) writeField0(ctx context.Context, opr return err } -func (p *TSIServiceTestInsertRecordsResult) String() string { +func (p *IClientRPCServiceExecuteRawDataQueryResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertRecordsResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceTestInsertRecordsOfOneDeviceArgs struct { - Req *TSInsertRecordsOfOneDeviceReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceExecuteLastDataQueryArgs struct { + Req *TSLastDataQueryReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceTestInsertRecordsOfOneDeviceArgs() *TSIServiceTestInsertRecordsOfOneDeviceArgs { - return &TSIServiceTestInsertRecordsOfOneDeviceArgs{} +func NewIClientRPCServiceExecuteLastDataQueryArgs() *IClientRPCServiceExecuteLastDataQueryArgs { + return &IClientRPCServiceExecuteLastDataQueryArgs{} } -var TSIServiceTestInsertRecordsOfOneDeviceArgs_Req_DEFAULT *TSInsertRecordsOfOneDeviceReq -func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) GetReq() *TSInsertRecordsOfOneDeviceReq { +var IClientRPCServiceExecuteLastDataQueryArgs_Req_DEFAULT *TSLastDataQueryReq +func (p *IClientRPCServiceExecuteLastDataQueryArgs) GetReq() *TSLastDataQueryReq { if !p.IsSetReq() { - return TSIServiceTestInsertRecordsOfOneDeviceArgs_Req_DEFAULT + return IClientRPCServiceExecuteLastDataQueryArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) IsSetReq() bool { +func (p *IClientRPCServiceExecuteLastDataQueryArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteLastDataQueryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26131,16 +31891,16 @@ func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) Read(ctx context.Context, i return nil } -func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertRecordsOfOneDeviceReq{} +func (p *IClientRPCServiceExecuteLastDataQueryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSLastDataQueryReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertRecordsOfOneDevice_args"); err != nil { +func (p *IClientRPCServiceExecuteLastDataQueryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeLastDataQuery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -26152,7 +31912,7 @@ func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) Write(ctx context.Context, return nil } -func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteLastDataQueryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -26163,35 +31923,35 @@ func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) writeField1(ctx context.Con return err } -func (p *TSIServiceTestInsertRecordsOfOneDeviceArgs) String() string { +func (p *IClientRPCServiceExecuteLastDataQueryArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertRecordsOfOneDeviceArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceTestInsertRecordsOfOneDeviceResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceExecuteLastDataQueryResult struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceTestInsertRecordsOfOneDeviceResult() *TSIServiceTestInsertRecordsOfOneDeviceResult { - return &TSIServiceTestInsertRecordsOfOneDeviceResult{} +func NewIClientRPCServiceExecuteLastDataQueryResult() *IClientRPCServiceExecuteLastDataQueryResult { + return &IClientRPCServiceExecuteLastDataQueryResult{} } -var TSIServiceTestInsertRecordsOfOneDeviceResult_Success_DEFAULT *TSStatus -func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) GetSuccess() *TSStatus { +var IClientRPCServiceExecuteLastDataQueryResult_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteLastDataQueryResult) GetSuccess() *TSExecuteStatementResp { if !p.IsSetSuccess() { - return TSIServiceTestInsertRecordsOfOneDeviceResult_Success_DEFAULT + return IClientRPCServiceExecuteLastDataQueryResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) IsSetSuccess() bool { +func (p *IClientRPCServiceExecuteLastDataQueryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteLastDataQueryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26229,16 +31989,16 @@ func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) Read(ctx context.Context, return nil } -func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceExecuteLastDataQueryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertRecordsOfOneDevice_result"); err != nil { +func (p *IClientRPCServiceExecuteLastDataQueryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeLastDataQuery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -26250,7 +32010,7 @@ func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) Write(ctx context.Context return nil } -func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteLastDataQueryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -26263,35 +32023,35 @@ func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) writeField0(ctx context.C return err } -func (p *TSIServiceTestInsertRecordsOfOneDeviceResult) String() string { +func (p *IClientRPCServiceExecuteLastDataQueryResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertRecordsOfOneDeviceResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceTestInsertStringRecordsArgs struct { - Req *TSInsertStringRecordsReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceExecuteAggregationQueryArgs struct { + Req *TSAggregationQueryReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceTestInsertStringRecordsArgs() *TSIServiceTestInsertStringRecordsArgs { - return &TSIServiceTestInsertStringRecordsArgs{} +func NewIClientRPCServiceExecuteAggregationQueryArgs() *IClientRPCServiceExecuteAggregationQueryArgs { + return &IClientRPCServiceExecuteAggregationQueryArgs{} } -var TSIServiceTestInsertStringRecordsArgs_Req_DEFAULT *TSInsertStringRecordsReq -func (p *TSIServiceTestInsertStringRecordsArgs) GetReq() *TSInsertStringRecordsReq { +var IClientRPCServiceExecuteAggregationQueryArgs_Req_DEFAULT *TSAggregationQueryReq +func (p *IClientRPCServiceExecuteAggregationQueryArgs) GetReq() *TSAggregationQueryReq { if !p.IsSetReq() { - return TSIServiceTestInsertStringRecordsArgs_Req_DEFAULT + return IClientRPCServiceExecuteAggregationQueryArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceTestInsertStringRecordsArgs) IsSetReq() bool { +func (p *IClientRPCServiceExecuteAggregationQueryArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceTestInsertStringRecordsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteAggregationQueryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26329,16 +32089,16 @@ func (p *TSIServiceTestInsertStringRecordsArgs) Read(ctx context.Context, iprot return nil } -func (p *TSIServiceTestInsertStringRecordsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSInsertStringRecordsReq{} +func (p *IClientRPCServiceExecuteAggregationQueryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSAggregationQueryReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceTestInsertStringRecordsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertStringRecords_args"); err != nil { +func (p *IClientRPCServiceExecuteAggregationQueryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeAggregationQuery_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -26350,7 +32110,7 @@ func (p *TSIServiceTestInsertStringRecordsArgs) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceTestInsertStringRecordsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteAggregationQueryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -26361,35 +32121,35 @@ func (p *TSIServiceTestInsertStringRecordsArgs) writeField1(ctx context.Context, return err } -func (p *TSIServiceTestInsertStringRecordsArgs) String() string { +func (p *IClientRPCServiceExecuteAggregationQueryArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertStringRecordsArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceTestInsertStringRecordsResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceExecuteAggregationQueryResult struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceTestInsertStringRecordsResult() *TSIServiceTestInsertStringRecordsResult { - return &TSIServiceTestInsertStringRecordsResult{} +func NewIClientRPCServiceExecuteAggregationQueryResult() *IClientRPCServiceExecuteAggregationQueryResult { + return &IClientRPCServiceExecuteAggregationQueryResult{} } -var TSIServiceTestInsertStringRecordsResult_Success_DEFAULT *TSStatus -func (p *TSIServiceTestInsertStringRecordsResult) GetSuccess() *TSStatus { +var IClientRPCServiceExecuteAggregationQueryResult_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteAggregationQueryResult) GetSuccess() *TSExecuteStatementResp { if !p.IsSetSuccess() { - return TSIServiceTestInsertStringRecordsResult_Success_DEFAULT + return IClientRPCServiceExecuteAggregationQueryResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceTestInsertStringRecordsResult) IsSetSuccess() bool { +func (p *IClientRPCServiceExecuteAggregationQueryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceTestInsertStringRecordsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteAggregationQueryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26427,16 +32187,16 @@ func (p *TSIServiceTestInsertStringRecordsResult) Read(ctx context.Context, ipro return nil } -func (p *TSIServiceTestInsertStringRecordsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceExecuteAggregationQueryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSExecuteStatementResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceTestInsertStringRecordsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "testInsertStringRecords_result"); err != nil { +func (p *IClientRPCServiceExecuteAggregationQueryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeAggregationQuery_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -26448,7 +32208,7 @@ func (p *TSIServiceTestInsertStringRecordsResult) Write(ctx context.Context, opr return nil } -func (p *TSIServiceTestInsertStringRecordsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteAggregationQueryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -26461,35 +32221,28 @@ func (p *TSIServiceTestInsertStringRecordsResult) writeField0(ctx context.Contex return err } -func (p *TSIServiceTestInsertStringRecordsResult) String() string { +func (p *IClientRPCServiceExecuteAggregationQueryResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceTestInsertStringRecordsResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryResult(%+v)", *p) } // Attributes: -// - Req -type TSIServiceDeleteDataArgs struct { - Req *TSDeleteDataReq `thrift:"req,1" db:"req" json:"req"` +// - SessionId +type IClientRPCServiceRequestStatementIdArgs struct { + SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` } -func NewTSIServiceDeleteDataArgs() *TSIServiceDeleteDataArgs { - return &TSIServiceDeleteDataArgs{} +func NewIClientRPCServiceRequestStatementIdArgs() *IClientRPCServiceRequestStatementIdArgs { + return &IClientRPCServiceRequestStatementIdArgs{} } -var TSIServiceDeleteDataArgs_Req_DEFAULT *TSDeleteDataReq -func (p *TSIServiceDeleteDataArgs) GetReq() *TSDeleteDataReq { - if !p.IsSetReq() { - return TSIServiceDeleteDataArgs_Req_DEFAULT - } -return p.Req -} -func (p *TSIServiceDeleteDataArgs) IsSetReq() bool { - return p.Req != nil -} -func (p *TSIServiceDeleteDataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceRequestStatementIdArgs) GetSessionId() int64 { + return p.SessionId +} +func (p *IClientRPCServiceRequestStatementIdArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26503,7 +32256,7 @@ func (p *TSIServiceDeleteDataArgs) Read(ctx context.Context, iprot thrift.TProto if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.STRUCT { + if fieldTypeId == thrift.I64 { if err := p.ReadField1(ctx, iprot); err != nil { return err } @@ -26527,16 +32280,17 @@ func (p *TSIServiceDeleteDataArgs) Read(ctx context.Context, iprot thrift.TProto return nil } -func (p *TSIServiceDeleteDataArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSDeleteDataReq{} - if err := p.Req.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) - } +func (p *IClientRPCServiceRequestStatementIdArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.SessionId = v +} return nil } -func (p *TSIServiceDeleteDataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "deleteData_args"); err != nil { +func (p *IClientRPCServiceRequestStatementIdArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "requestStatementId_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -26548,46 +32302,45 @@ func (p *TSIServiceDeleteDataArgs) Write(ctx context.Context, oprot thrift.TProt return nil } -func (p *TSIServiceDeleteDataArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } - if err := p.Req.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) - } +func (p *IClientRPCServiceRequestStatementIdArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } return err } -func (p *TSIServiceDeleteDataArgs) String() string { +func (p *IClientRPCServiceRequestStatementIdArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceDeleteDataArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceRequestStatementIdArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceDeleteDataResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceRequestStatementIdResult struct { + Success *int64 `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceDeleteDataResult() *TSIServiceDeleteDataResult { - return &TSIServiceDeleteDataResult{} +func NewIClientRPCServiceRequestStatementIdResult() *IClientRPCServiceRequestStatementIdResult { + return &IClientRPCServiceRequestStatementIdResult{} } -var TSIServiceDeleteDataResult_Success_DEFAULT *TSStatus -func (p *TSIServiceDeleteDataResult) GetSuccess() *TSStatus { +var IClientRPCServiceRequestStatementIdResult_Success_DEFAULT int64 +func (p *IClientRPCServiceRequestStatementIdResult) GetSuccess() int64 { if !p.IsSetSuccess() { - return TSIServiceDeleteDataResult_Success_DEFAULT + return IClientRPCServiceRequestStatementIdResult_Success_DEFAULT } -return p.Success +return *p.Success } -func (p *TSIServiceDeleteDataResult) IsSetSuccess() bool { +func (p *IClientRPCServiceRequestStatementIdResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceDeleteDataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceRequestStatementIdResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26601,7 +32354,7 @@ func (p *TSIServiceDeleteDataResult) Read(ctx context.Context, iprot thrift.TPro if fieldTypeId == thrift.STOP { break; } switch fieldId { case 0: - if fieldTypeId == thrift.STRUCT { + if fieldTypeId == thrift.I64 { if err := p.ReadField0(ctx, iprot); err != nil { return err } @@ -26625,16 +32378,17 @@ func (p *TSIServiceDeleteDataResult) Read(ctx context.Context, iprot thrift.TPro return nil } -func (p *TSIServiceDeleteDataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} - if err := p.Success.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } +func (p *IClientRPCServiceRequestStatementIdResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} return nil } -func (p *TSIServiceDeleteDataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "deleteData_result"); err != nil { +func (p *IClientRPCServiceRequestStatementIdResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "requestStatementId_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -26646,48 +32400,47 @@ func (p *TSIServiceDeleteDataResult) Write(ctx context.Context, oprot thrift.TPr return nil } -func (p *TSIServiceDeleteDataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceRequestStatementIdResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.I64, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := p.Success.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } + if err := oprot.WriteI64(ctx, int64(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err } -func (p *TSIServiceDeleteDataResult) String() string { +func (p *IClientRPCServiceRequestStatementIdResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceDeleteDataResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceRequestStatementIdResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceExecuteRawDataQueryArgs struct { - Req *TSRawDataQueryReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceCreateSchemaTemplateArgs struct { + Req *TSCreateSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceExecuteRawDataQueryArgs() *TSIServiceExecuteRawDataQueryArgs { - return &TSIServiceExecuteRawDataQueryArgs{} +func NewIClientRPCServiceCreateSchemaTemplateArgs() *IClientRPCServiceCreateSchemaTemplateArgs { + return &IClientRPCServiceCreateSchemaTemplateArgs{} } -var TSIServiceExecuteRawDataQueryArgs_Req_DEFAULT *TSRawDataQueryReq -func (p *TSIServiceExecuteRawDataQueryArgs) GetReq() *TSRawDataQueryReq { +var IClientRPCServiceCreateSchemaTemplateArgs_Req_DEFAULT *TSCreateSchemaTemplateReq +func (p *IClientRPCServiceCreateSchemaTemplateArgs) GetReq() *TSCreateSchemaTemplateReq { if !p.IsSetReq() { - return TSIServiceExecuteRawDataQueryArgs_Req_DEFAULT + return IClientRPCServiceCreateSchemaTemplateArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceExecuteRawDataQueryArgs) IsSetReq() bool { +func (p *IClientRPCServiceCreateSchemaTemplateArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceExecuteRawDataQueryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCreateSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26725,16 +32478,16 @@ func (p *TSIServiceExecuteRawDataQueryArgs) Read(ctx context.Context, iprot thri return nil } -func (p *TSIServiceExecuteRawDataQueryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSRawDataQueryReq{} +func (p *IClientRPCServiceCreateSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSCreateSchemaTemplateReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceExecuteRawDataQueryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeRawDataQuery_args"); err != nil { +func (p *IClientRPCServiceCreateSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createSchemaTemplate_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -26746,7 +32499,7 @@ func (p *TSIServiceExecuteRawDataQueryArgs) Write(ctx context.Context, oprot thr return nil } -func (p *TSIServiceExecuteRawDataQueryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCreateSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -26757,35 +32510,35 @@ func (p *TSIServiceExecuteRawDataQueryArgs) writeField1(ctx context.Context, opr return err } -func (p *TSIServiceExecuteRawDataQueryArgs) String() string { +func (p *IClientRPCServiceCreateSchemaTemplateArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteRawDataQueryArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateSchemaTemplateArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceExecuteRawDataQueryResult struct { - Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceCreateSchemaTemplateResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceExecuteRawDataQueryResult() *TSIServiceExecuteRawDataQueryResult { - return &TSIServiceExecuteRawDataQueryResult{} +func NewIClientRPCServiceCreateSchemaTemplateResult() *IClientRPCServiceCreateSchemaTemplateResult { + return &IClientRPCServiceCreateSchemaTemplateResult{} } -var TSIServiceExecuteRawDataQueryResult_Success_DEFAULT *TSExecuteStatementResp -func (p *TSIServiceExecuteRawDataQueryResult) GetSuccess() *TSExecuteStatementResp { +var IClientRPCServiceCreateSchemaTemplateResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceCreateSchemaTemplateResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceExecuteRawDataQueryResult_Success_DEFAULT + return IClientRPCServiceCreateSchemaTemplateResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceExecuteRawDataQueryResult) IsSetSuccess() bool { +func (p *IClientRPCServiceCreateSchemaTemplateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceExecuteRawDataQueryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCreateSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26823,16 +32576,16 @@ func (p *TSIServiceExecuteRawDataQueryResult) Read(ctx context.Context, iprot th return nil } -func (p *TSIServiceExecuteRawDataQueryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSExecuteStatementResp{} +func (p *IClientRPCServiceCreateSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceExecuteRawDataQueryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeRawDataQuery_result"); err != nil { +func (p *IClientRPCServiceCreateSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createSchemaTemplate_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -26844,7 +32597,7 @@ func (p *TSIServiceExecuteRawDataQueryResult) Write(ctx context.Context, oprot t return nil } -func (p *TSIServiceExecuteRawDataQueryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCreateSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -26857,35 +32610,35 @@ func (p *TSIServiceExecuteRawDataQueryResult) writeField0(ctx context.Context, o return err } -func (p *TSIServiceExecuteRawDataQueryResult) String() string { +func (p *IClientRPCServiceCreateSchemaTemplateResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteRawDataQueryResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateSchemaTemplateResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceExecuteLastDataQueryArgs struct { - Req *TSLastDataQueryReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceAppendSchemaTemplateArgs struct { + Req *TSAppendSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceExecuteLastDataQueryArgs() *TSIServiceExecuteLastDataQueryArgs { - return &TSIServiceExecuteLastDataQueryArgs{} +func NewIClientRPCServiceAppendSchemaTemplateArgs() *IClientRPCServiceAppendSchemaTemplateArgs { + return &IClientRPCServiceAppendSchemaTemplateArgs{} } -var TSIServiceExecuteLastDataQueryArgs_Req_DEFAULT *TSLastDataQueryReq -func (p *TSIServiceExecuteLastDataQueryArgs) GetReq() *TSLastDataQueryReq { +var IClientRPCServiceAppendSchemaTemplateArgs_Req_DEFAULT *TSAppendSchemaTemplateReq +func (p *IClientRPCServiceAppendSchemaTemplateArgs) GetReq() *TSAppendSchemaTemplateReq { if !p.IsSetReq() { - return TSIServiceExecuteLastDataQueryArgs_Req_DEFAULT + return IClientRPCServiceAppendSchemaTemplateArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceExecuteLastDataQueryArgs) IsSetReq() bool { +func (p *IClientRPCServiceAppendSchemaTemplateArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceExecuteLastDataQueryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceAppendSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -26923,16 +32676,16 @@ func (p *TSIServiceExecuteLastDataQueryArgs) Read(ctx context.Context, iprot thr return nil } -func (p *TSIServiceExecuteLastDataQueryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSLastDataQueryReq{} +func (p *IClientRPCServiceAppendSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSAppendSchemaTemplateReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceExecuteLastDataQueryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeLastDataQuery_args"); err != nil { +func (p *IClientRPCServiceAppendSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "appendSchemaTemplate_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -26944,7 +32697,7 @@ func (p *TSIServiceExecuteLastDataQueryArgs) Write(ctx context.Context, oprot th return nil } -func (p *TSIServiceExecuteLastDataQueryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceAppendSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -26955,35 +32708,35 @@ func (p *TSIServiceExecuteLastDataQueryArgs) writeField1(ctx context.Context, op return err } -func (p *TSIServiceExecuteLastDataQueryArgs) String() string { +func (p *IClientRPCServiceAppendSchemaTemplateArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteLastDataQueryArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceAppendSchemaTemplateArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceExecuteLastDataQueryResult struct { - Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceAppendSchemaTemplateResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceExecuteLastDataQueryResult() *TSIServiceExecuteLastDataQueryResult { - return &TSIServiceExecuteLastDataQueryResult{} +func NewIClientRPCServiceAppendSchemaTemplateResult() *IClientRPCServiceAppendSchemaTemplateResult { + return &IClientRPCServiceAppendSchemaTemplateResult{} } -var TSIServiceExecuteLastDataQueryResult_Success_DEFAULT *TSExecuteStatementResp -func (p *TSIServiceExecuteLastDataQueryResult) GetSuccess() *TSExecuteStatementResp { +var IClientRPCServiceAppendSchemaTemplateResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceAppendSchemaTemplateResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceExecuteLastDataQueryResult_Success_DEFAULT + return IClientRPCServiceAppendSchemaTemplateResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceExecuteLastDataQueryResult) IsSetSuccess() bool { +func (p *IClientRPCServiceAppendSchemaTemplateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceExecuteLastDataQueryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceAppendSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27021,16 +32774,16 @@ func (p *TSIServiceExecuteLastDataQueryResult) Read(ctx context.Context, iprot t return nil } -func (p *TSIServiceExecuteLastDataQueryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSExecuteStatementResp{} +func (p *IClientRPCServiceAppendSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceExecuteLastDataQueryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeLastDataQuery_result"); err != nil { +func (p *IClientRPCServiceAppendSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "appendSchemaTemplate_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -27042,7 +32795,7 @@ func (p *TSIServiceExecuteLastDataQueryResult) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceExecuteLastDataQueryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceAppendSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -27055,28 +32808,35 @@ func (p *TSIServiceExecuteLastDataQueryResult) writeField0(ctx context.Context, return err } -func (p *TSIServiceExecuteLastDataQueryResult) String() string { +func (p *IClientRPCServiceAppendSchemaTemplateResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteLastDataQueryResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceAppendSchemaTemplateResult(%+v)", *p) } // Attributes: -// - SessionId -type TSIServiceRequestStatementIdArgs struct { - SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` +// - Req +type IClientRPCServicePruneSchemaTemplateArgs struct { + Req *TSPruneSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceRequestStatementIdArgs() *TSIServiceRequestStatementIdArgs { - return &TSIServiceRequestStatementIdArgs{} +func NewIClientRPCServicePruneSchemaTemplateArgs() *IClientRPCServicePruneSchemaTemplateArgs { + return &IClientRPCServicePruneSchemaTemplateArgs{} } - -func (p *TSIServiceRequestStatementIdArgs) GetSessionId() int64 { - return p.SessionId +var IClientRPCServicePruneSchemaTemplateArgs_Req_DEFAULT *TSPruneSchemaTemplateReq +func (p *IClientRPCServicePruneSchemaTemplateArgs) GetReq() *TSPruneSchemaTemplateReq { + if !p.IsSetReq() { + return IClientRPCServicePruneSchemaTemplateArgs_Req_DEFAULT + } +return p.Req +} +func (p *IClientRPCServicePruneSchemaTemplateArgs) IsSetReq() bool { + return p.Req != nil } -func (p *TSIServiceRequestStatementIdArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *IClientRPCServicePruneSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27090,7 +32850,7 @@ func (p *TSIServiceRequestStatementIdArgs) Read(ctx context.Context, iprot thrif if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField1(ctx, iprot); err != nil { return err } @@ -27114,17 +32874,16 @@ func (p *TSIServiceRequestStatementIdArgs) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceRequestStatementIdArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) -} else { - p.SessionId = v -} +func (p *IClientRPCServicePruneSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSPruneSchemaTemplateReq{} + if err := p.Req.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) + } return nil } -func (p *TSIServiceRequestStatementIdArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "requestStatementId_args"); err != nil { +func (p *IClientRPCServicePruneSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "pruneSchemaTemplate_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -27136,45 +32895,46 @@ func (p *TSIServiceRequestStatementIdArgs) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceRequestStatementIdArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } +func (p *IClientRPCServicePruneSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } + if err := p.Req.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } return err } -func (p *TSIServiceRequestStatementIdArgs) String() string { +func (p *IClientRPCServicePruneSchemaTemplateArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceRequestStatementIdArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServicePruneSchemaTemplateArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceRequestStatementIdResult struct { - Success *int64 `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServicePruneSchemaTemplateResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceRequestStatementIdResult() *TSIServiceRequestStatementIdResult { - return &TSIServiceRequestStatementIdResult{} +func NewIClientRPCServicePruneSchemaTemplateResult() *IClientRPCServicePruneSchemaTemplateResult { + return &IClientRPCServicePruneSchemaTemplateResult{} } -var TSIServiceRequestStatementIdResult_Success_DEFAULT int64 -func (p *TSIServiceRequestStatementIdResult) GetSuccess() int64 { +var IClientRPCServicePruneSchemaTemplateResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServicePruneSchemaTemplateResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceRequestStatementIdResult_Success_DEFAULT + return IClientRPCServicePruneSchemaTemplateResult_Success_DEFAULT } -return *p.Success +return p.Success } -func (p *TSIServiceRequestStatementIdResult) IsSetSuccess() bool { +func (p *IClientRPCServicePruneSchemaTemplateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceRequestStatementIdResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServicePruneSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27188,7 +32948,7 @@ func (p *TSIServiceRequestStatementIdResult) Read(ctx context.Context, iprot thr if fieldTypeId == thrift.STOP { break; } switch fieldId { case 0: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField0(ctx, iprot); err != nil { return err } @@ -27212,17 +32972,16 @@ func (p *TSIServiceRequestStatementIdResult) Read(ctx context.Context, iprot thr return nil } -func (p *TSIServiceRequestStatementIdResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - p.Success = &v -} +func (p *IClientRPCServicePruneSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } return nil } -func (p *TSIServiceRequestStatementIdResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "requestStatementId_result"); err != nil { +func (p *IClientRPCServicePruneSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "pruneSchemaTemplate_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -27234,47 +32993,48 @@ func (p *TSIServiceRequestStatementIdResult) Write(ctx context.Context, oprot th return nil } -func (p *TSIServiceRequestStatementIdResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServicePruneSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin(ctx, "success", thrift.I64, 0); err != nil { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } - if err := oprot.WriteI64(ctx, int64(*p.Success)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } } return err } -func (p *TSIServiceRequestStatementIdResult) String() string { +func (p *IClientRPCServicePruneSchemaTemplateResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceRequestStatementIdResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServicePruneSchemaTemplateResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceCreateSchemaTemplateArgs struct { - Req *TSCreateSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceQuerySchemaTemplateArgs struct { + Req *TSQueryTemplateReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceCreateSchemaTemplateArgs() *TSIServiceCreateSchemaTemplateArgs { - return &TSIServiceCreateSchemaTemplateArgs{} +func NewIClientRPCServiceQuerySchemaTemplateArgs() *IClientRPCServiceQuerySchemaTemplateArgs { + return &IClientRPCServiceQuerySchemaTemplateArgs{} } -var TSIServiceCreateSchemaTemplateArgs_Req_DEFAULT *TSCreateSchemaTemplateReq -func (p *TSIServiceCreateSchemaTemplateArgs) GetReq() *TSCreateSchemaTemplateReq { +var IClientRPCServiceQuerySchemaTemplateArgs_Req_DEFAULT *TSQueryTemplateReq +func (p *IClientRPCServiceQuerySchemaTemplateArgs) GetReq() *TSQueryTemplateReq { if !p.IsSetReq() { - return TSIServiceCreateSchemaTemplateArgs_Req_DEFAULT + return IClientRPCServiceQuerySchemaTemplateArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceCreateSchemaTemplateArgs) IsSetReq() bool { +func (p *IClientRPCServiceQuerySchemaTemplateArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceCreateSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceQuerySchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27312,16 +33072,16 @@ func (p *TSIServiceCreateSchemaTemplateArgs) Read(ctx context.Context, iprot thr return nil } -func (p *TSIServiceCreateSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSCreateSchemaTemplateReq{} +func (p *IClientRPCServiceQuerySchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSQueryTemplateReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceCreateSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createSchemaTemplate_args"); err != nil { +func (p *IClientRPCServiceQuerySchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "querySchemaTemplate_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -27333,7 +33093,7 @@ func (p *TSIServiceCreateSchemaTemplateArgs) Write(ctx context.Context, oprot th return nil } -func (p *TSIServiceCreateSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceQuerySchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -27344,35 +33104,35 @@ func (p *TSIServiceCreateSchemaTemplateArgs) writeField1(ctx context.Context, op return err } -func (p *TSIServiceCreateSchemaTemplateArgs) String() string { +func (p *IClientRPCServiceQuerySchemaTemplateArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCreateSchemaTemplateArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceQuerySchemaTemplateArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceCreateSchemaTemplateResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceQuerySchemaTemplateResult struct { + Success *TSQueryTemplateResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceCreateSchemaTemplateResult() *TSIServiceCreateSchemaTemplateResult { - return &TSIServiceCreateSchemaTemplateResult{} +func NewIClientRPCServiceQuerySchemaTemplateResult() *IClientRPCServiceQuerySchemaTemplateResult { + return &IClientRPCServiceQuerySchemaTemplateResult{} } -var TSIServiceCreateSchemaTemplateResult_Success_DEFAULT *TSStatus -func (p *TSIServiceCreateSchemaTemplateResult) GetSuccess() *TSStatus { +var IClientRPCServiceQuerySchemaTemplateResult_Success_DEFAULT *TSQueryTemplateResp +func (p *IClientRPCServiceQuerySchemaTemplateResult) GetSuccess() *TSQueryTemplateResp { if !p.IsSetSuccess() { - return TSIServiceCreateSchemaTemplateResult_Success_DEFAULT + return IClientRPCServiceQuerySchemaTemplateResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceCreateSchemaTemplateResult) IsSetSuccess() bool { +func (p *IClientRPCServiceQuerySchemaTemplateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceCreateSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceQuerySchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27410,16 +33170,16 @@ func (p *TSIServiceCreateSchemaTemplateResult) Read(ctx context.Context, iprot t return nil } -func (p *TSIServiceCreateSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceQuerySchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSQueryTemplateResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceCreateSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "createSchemaTemplate_result"); err != nil { +func (p *IClientRPCServiceQuerySchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "querySchemaTemplate_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -27431,7 +33191,7 @@ func (p *TSIServiceCreateSchemaTemplateResult) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceCreateSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceQuerySchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -27444,35 +33204,35 @@ func (p *TSIServiceCreateSchemaTemplateResult) writeField0(ctx context.Context, return err } -func (p *TSIServiceCreateSchemaTemplateResult) String() string { +func (p *IClientRPCServiceQuerySchemaTemplateResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceCreateSchemaTemplateResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceQuerySchemaTemplateResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceAppendSchemaTemplateArgs struct { - Req *TSAppendSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceSetSchemaTemplateArgs struct { + Req *TSSetSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceAppendSchemaTemplateArgs() *TSIServiceAppendSchemaTemplateArgs { - return &TSIServiceAppendSchemaTemplateArgs{} +func NewIClientRPCServiceSetSchemaTemplateArgs() *IClientRPCServiceSetSchemaTemplateArgs { + return &IClientRPCServiceSetSchemaTemplateArgs{} } -var TSIServiceAppendSchemaTemplateArgs_Req_DEFAULT *TSAppendSchemaTemplateReq -func (p *TSIServiceAppendSchemaTemplateArgs) GetReq() *TSAppendSchemaTemplateReq { +var IClientRPCServiceSetSchemaTemplateArgs_Req_DEFAULT *TSSetSchemaTemplateReq +func (p *IClientRPCServiceSetSchemaTemplateArgs) GetReq() *TSSetSchemaTemplateReq { if !p.IsSetReq() { - return TSIServiceAppendSchemaTemplateArgs_Req_DEFAULT + return IClientRPCServiceSetSchemaTemplateArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceAppendSchemaTemplateArgs) IsSetReq() bool { +func (p *IClientRPCServiceSetSchemaTemplateArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceAppendSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceSetSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27510,16 +33270,16 @@ func (p *TSIServiceAppendSchemaTemplateArgs) Read(ctx context.Context, iprot thr return nil } -func (p *TSIServiceAppendSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSAppendSchemaTemplateReq{} +func (p *IClientRPCServiceSetSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSSetSchemaTemplateReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceAppendSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "appendSchemaTemplate_args"); err != nil { +func (p *IClientRPCServiceSetSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "setSchemaTemplate_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -27531,7 +33291,7 @@ func (p *TSIServiceAppendSchemaTemplateArgs) Write(ctx context.Context, oprot th return nil } -func (p *TSIServiceAppendSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceSetSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -27542,35 +33302,35 @@ func (p *TSIServiceAppendSchemaTemplateArgs) writeField1(ctx context.Context, op return err } -func (p *TSIServiceAppendSchemaTemplateArgs) String() string { +func (p *IClientRPCServiceSetSchemaTemplateArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceAppendSchemaTemplateArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceSetSchemaTemplateArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceAppendSchemaTemplateResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceSetSchemaTemplateResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceAppendSchemaTemplateResult() *TSIServiceAppendSchemaTemplateResult { - return &TSIServiceAppendSchemaTemplateResult{} +func NewIClientRPCServiceSetSchemaTemplateResult() *IClientRPCServiceSetSchemaTemplateResult { + return &IClientRPCServiceSetSchemaTemplateResult{} } -var TSIServiceAppendSchemaTemplateResult_Success_DEFAULT *TSStatus -func (p *TSIServiceAppendSchemaTemplateResult) GetSuccess() *TSStatus { +var IClientRPCServiceSetSchemaTemplateResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceSetSchemaTemplateResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceAppendSchemaTemplateResult_Success_DEFAULT + return IClientRPCServiceSetSchemaTemplateResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceAppendSchemaTemplateResult) IsSetSuccess() bool { +func (p *IClientRPCServiceSetSchemaTemplateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceAppendSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceSetSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27608,16 +33368,16 @@ func (p *TSIServiceAppendSchemaTemplateResult) Read(ctx context.Context, iprot t return nil } -func (p *TSIServiceAppendSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceSetSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceAppendSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "appendSchemaTemplate_result"); err != nil { +func (p *IClientRPCServiceSetSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "setSchemaTemplate_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -27629,7 +33389,7 @@ func (p *TSIServiceAppendSchemaTemplateResult) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceAppendSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceSetSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -27642,35 +33402,35 @@ func (p *TSIServiceAppendSchemaTemplateResult) writeField0(ctx context.Context, return err } -func (p *TSIServiceAppendSchemaTemplateResult) String() string { +func (p *IClientRPCServiceSetSchemaTemplateResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceAppendSchemaTemplateResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceSetSchemaTemplateResult(%+v)", *p) } // Attributes: // - Req -type TSIServicePruneSchemaTemplateArgs struct { - Req *TSPruneSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceUnsetSchemaTemplateArgs struct { + Req *TSUnsetSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServicePruneSchemaTemplateArgs() *TSIServicePruneSchemaTemplateArgs { - return &TSIServicePruneSchemaTemplateArgs{} +func NewIClientRPCServiceUnsetSchemaTemplateArgs() *IClientRPCServiceUnsetSchemaTemplateArgs { + return &IClientRPCServiceUnsetSchemaTemplateArgs{} } -var TSIServicePruneSchemaTemplateArgs_Req_DEFAULT *TSPruneSchemaTemplateReq -func (p *TSIServicePruneSchemaTemplateArgs) GetReq() *TSPruneSchemaTemplateReq { +var IClientRPCServiceUnsetSchemaTemplateArgs_Req_DEFAULT *TSUnsetSchemaTemplateReq +func (p *IClientRPCServiceUnsetSchemaTemplateArgs) GetReq() *TSUnsetSchemaTemplateReq { if !p.IsSetReq() { - return TSIServicePruneSchemaTemplateArgs_Req_DEFAULT + return IClientRPCServiceUnsetSchemaTemplateArgs_Req_DEFAULT } return p.Req } -func (p *TSIServicePruneSchemaTemplateArgs) IsSetReq() bool { +func (p *IClientRPCServiceUnsetSchemaTemplateArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServicePruneSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceUnsetSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27708,16 +33468,16 @@ func (p *TSIServicePruneSchemaTemplateArgs) Read(ctx context.Context, iprot thri return nil } -func (p *TSIServicePruneSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSPruneSchemaTemplateReq{} +func (p *IClientRPCServiceUnsetSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSUnsetSchemaTemplateReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServicePruneSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "pruneSchemaTemplate_args"); err != nil { +func (p *IClientRPCServiceUnsetSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "unsetSchemaTemplate_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -27729,7 +33489,7 @@ func (p *TSIServicePruneSchemaTemplateArgs) Write(ctx context.Context, oprot thr return nil } -func (p *TSIServicePruneSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceUnsetSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -27740,35 +33500,35 @@ func (p *TSIServicePruneSchemaTemplateArgs) writeField1(ctx context.Context, opr return err } -func (p *TSIServicePruneSchemaTemplateArgs) String() string { +func (p *IClientRPCServiceUnsetSchemaTemplateArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServicePruneSchemaTemplateArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceUnsetSchemaTemplateArgs(%+v)", *p) } // Attributes: // - Success -type TSIServicePruneSchemaTemplateResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceUnsetSchemaTemplateResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServicePruneSchemaTemplateResult() *TSIServicePruneSchemaTemplateResult { - return &TSIServicePruneSchemaTemplateResult{} +func NewIClientRPCServiceUnsetSchemaTemplateResult() *IClientRPCServiceUnsetSchemaTemplateResult { + return &IClientRPCServiceUnsetSchemaTemplateResult{} } -var TSIServicePruneSchemaTemplateResult_Success_DEFAULT *TSStatus -func (p *TSIServicePruneSchemaTemplateResult) GetSuccess() *TSStatus { +var IClientRPCServiceUnsetSchemaTemplateResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceUnsetSchemaTemplateResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServicePruneSchemaTemplateResult_Success_DEFAULT + return IClientRPCServiceUnsetSchemaTemplateResult_Success_DEFAULT } return p.Success } -func (p *TSIServicePruneSchemaTemplateResult) IsSetSuccess() bool { +func (p *IClientRPCServiceUnsetSchemaTemplateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServicePruneSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceUnsetSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27806,16 +33566,16 @@ func (p *TSIServicePruneSchemaTemplateResult) Read(ctx context.Context, iprot th return nil } -func (p *TSIServicePruneSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceUnsetSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServicePruneSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "pruneSchemaTemplate_result"); err != nil { +func (p *IClientRPCServiceUnsetSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "unsetSchemaTemplate_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -27827,7 +33587,7 @@ func (p *TSIServicePruneSchemaTemplateResult) Write(ctx context.Context, oprot t return nil } -func (p *TSIServicePruneSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceUnsetSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -27840,35 +33600,35 @@ func (p *TSIServicePruneSchemaTemplateResult) writeField0(ctx context.Context, o return err } -func (p *TSIServicePruneSchemaTemplateResult) String() string { +func (p *IClientRPCServiceUnsetSchemaTemplateResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServicePruneSchemaTemplateResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceUnsetSchemaTemplateResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceQuerySchemaTemplateArgs struct { - Req *TSQueryTemplateReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceDropSchemaTemplateArgs struct { + Req *TSDropSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceQuerySchemaTemplateArgs() *TSIServiceQuerySchemaTemplateArgs { - return &TSIServiceQuerySchemaTemplateArgs{} +func NewIClientRPCServiceDropSchemaTemplateArgs() *IClientRPCServiceDropSchemaTemplateArgs { + return &IClientRPCServiceDropSchemaTemplateArgs{} } -var TSIServiceQuerySchemaTemplateArgs_Req_DEFAULT *TSQueryTemplateReq -func (p *TSIServiceQuerySchemaTemplateArgs) GetReq() *TSQueryTemplateReq { +var IClientRPCServiceDropSchemaTemplateArgs_Req_DEFAULT *TSDropSchemaTemplateReq +func (p *IClientRPCServiceDropSchemaTemplateArgs) GetReq() *TSDropSchemaTemplateReq { if !p.IsSetReq() { - return TSIServiceQuerySchemaTemplateArgs_Req_DEFAULT + return IClientRPCServiceDropSchemaTemplateArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceQuerySchemaTemplateArgs) IsSetReq() bool { +func (p *IClientRPCServiceDropSchemaTemplateArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceQuerySchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceDropSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -27906,16 +33666,16 @@ func (p *TSIServiceQuerySchemaTemplateArgs) Read(ctx context.Context, iprot thri return nil } -func (p *TSIServiceQuerySchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSQueryTemplateReq{} +func (p *IClientRPCServiceDropSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSDropSchemaTemplateReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceQuerySchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "querySchemaTemplate_args"); err != nil { +func (p *IClientRPCServiceDropSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "dropSchemaTemplate_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -27927,7 +33687,7 @@ func (p *TSIServiceQuerySchemaTemplateArgs) Write(ctx context.Context, oprot thr return nil } -func (p *TSIServiceQuerySchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceDropSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -27938,35 +33698,35 @@ func (p *TSIServiceQuerySchemaTemplateArgs) writeField1(ctx context.Context, opr return err } -func (p *TSIServiceQuerySchemaTemplateArgs) String() string { +func (p *IClientRPCServiceDropSchemaTemplateArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceQuerySchemaTemplateArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceDropSchemaTemplateArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceQuerySchemaTemplateResult struct { - Success *TSQueryTemplateResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceDropSchemaTemplateResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceQuerySchemaTemplateResult() *TSIServiceQuerySchemaTemplateResult { - return &TSIServiceQuerySchemaTemplateResult{} +func NewIClientRPCServiceDropSchemaTemplateResult() *IClientRPCServiceDropSchemaTemplateResult { + return &IClientRPCServiceDropSchemaTemplateResult{} } -var TSIServiceQuerySchemaTemplateResult_Success_DEFAULT *TSQueryTemplateResp -func (p *TSIServiceQuerySchemaTemplateResult) GetSuccess() *TSQueryTemplateResp { +var IClientRPCServiceDropSchemaTemplateResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceDropSchemaTemplateResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceQuerySchemaTemplateResult_Success_DEFAULT + return IClientRPCServiceDropSchemaTemplateResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceQuerySchemaTemplateResult) IsSetSuccess() bool { +func (p *IClientRPCServiceDropSchemaTemplateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceQuerySchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceDropSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28004,16 +33764,16 @@ func (p *TSIServiceQuerySchemaTemplateResult) Read(ctx context.Context, iprot th return nil } -func (p *TSIServiceQuerySchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSQueryTemplateResp{} +func (p *IClientRPCServiceDropSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceQuerySchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "querySchemaTemplate_result"); err != nil { +func (p *IClientRPCServiceDropSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "dropSchemaTemplate_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -28025,7 +33785,7 @@ func (p *TSIServiceQuerySchemaTemplateResult) Write(ctx context.Context, oprot t return nil } -func (p *TSIServiceQuerySchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceDropSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -28038,35 +33798,35 @@ func (p *TSIServiceQuerySchemaTemplateResult) writeField0(ctx context.Context, o return err } -func (p *TSIServiceQuerySchemaTemplateResult) String() string { +func (p *IClientRPCServiceDropSchemaTemplateResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceQuerySchemaTemplateResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceDropSchemaTemplateResult(%+v)", *p) } // Attributes: // - Req -type TSIServiceSetSchemaTemplateArgs struct { - Req *TSSetSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs struct { + Req *TCreateTimeseriesUsingSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` } -func NewTSIServiceSetSchemaTemplateArgs() *TSIServiceSetSchemaTemplateArgs { - return &TSIServiceSetSchemaTemplateArgs{} +func NewIClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs() *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs { + return &IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs{} } -var TSIServiceSetSchemaTemplateArgs_Req_DEFAULT *TSSetSchemaTemplateReq -func (p *TSIServiceSetSchemaTemplateArgs) GetReq() *TSSetSchemaTemplateReq { +var IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs_Req_DEFAULT *TCreateTimeseriesUsingSchemaTemplateReq +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) GetReq() *TCreateTimeseriesUsingSchemaTemplateReq { if !p.IsSetReq() { - return TSIServiceSetSchemaTemplateArgs_Req_DEFAULT + return IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs_Req_DEFAULT } return p.Req } -func (p *TSIServiceSetSchemaTemplateArgs) IsSetReq() bool { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) IsSetReq() bool { return p.Req != nil } -func (p *TSIServiceSetSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28104,16 +33864,16 @@ func (p *TSIServiceSetSchemaTemplateArgs) Read(ctx context.Context, iprot thrift return nil } -func (p *TSIServiceSetSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSSetSchemaTemplateReq{} +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TCreateTimeseriesUsingSchemaTemplateReq{} if err := p.Req.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) } return nil } -func (p *TSIServiceSetSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setSchemaTemplate_args"); err != nil { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createTimeseriesUsingSchemaTemplate_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -28125,7 +33885,7 @@ func (p *TSIServiceSetSchemaTemplateArgs) Write(ctx context.Context, oprot thrif return nil } -func (p *TSIServiceSetSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } if err := p.Req.Write(ctx, oprot); err != nil { @@ -28136,35 +33896,35 @@ func (p *TSIServiceSetSchemaTemplateArgs) writeField1(ctx context.Context, oprot return err } -func (p *TSIServiceSetSchemaTemplateArgs) String() string { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceSetSchemaTemplateArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceSetSchemaTemplateResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceSetSchemaTemplateResult() *TSIServiceSetSchemaTemplateResult { - return &TSIServiceSetSchemaTemplateResult{} +func NewIClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult() *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult { + return &IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult{} } -var TSIServiceSetSchemaTemplateResult_Success_DEFAULT *TSStatus -func (p *TSIServiceSetSchemaTemplateResult) GetSuccess() *TSStatus { +var IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceSetSchemaTemplateResult_Success_DEFAULT + return IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceSetSchemaTemplateResult) IsSetSuccess() bool { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceSetSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28202,16 +33962,16 @@ func (p *TSIServiceSetSchemaTemplateResult) Read(ctx context.Context, iprot thri return nil } -func (p *TSIServiceSetSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceSetSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setSchemaTemplate_result"); err != nil { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createTimeseriesUsingSchemaTemplate_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -28223,7 +33983,7 @@ func (p *TSIServiceSetSchemaTemplateResult) Write(ctx context.Context, oprot thr return nil } -func (p *TSIServiceSetSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -28236,35 +33996,35 @@ func (p *TSIServiceSetSchemaTemplateResult) writeField0(ctx context.Context, opr return err } -func (p *TSIServiceSetSchemaTemplateResult) String() string { +func (p *IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceSetSchemaTemplateResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult(%+v)", *p) } // Attributes: -// - Req -type TSIServiceUnsetSchemaTemplateArgs struct { - Req *TSUnsetSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` +// - Info +type IClientRPCServiceHandshakeArgs struct { + Info *TSyncIdentityInfo } -func NewTSIServiceUnsetSchemaTemplateArgs() *TSIServiceUnsetSchemaTemplateArgs { - return &TSIServiceUnsetSchemaTemplateArgs{} +func NewIClientRPCServiceHandshakeArgs() *IClientRPCServiceHandshakeArgs { + return &IClientRPCServiceHandshakeArgs{} } -var TSIServiceUnsetSchemaTemplateArgs_Req_DEFAULT *TSUnsetSchemaTemplateReq -func (p *TSIServiceUnsetSchemaTemplateArgs) GetReq() *TSUnsetSchemaTemplateReq { - if !p.IsSetReq() { - return TSIServiceUnsetSchemaTemplateArgs_Req_DEFAULT +var IClientRPCServiceHandshakeArgs_Info_DEFAULT *TSyncIdentityInfo +func (p *IClientRPCServiceHandshakeArgs) GetInfo() *TSyncIdentityInfo { + if !p.IsSetInfo() { + return IClientRPCServiceHandshakeArgs_Info_DEFAULT } -return p.Req +return p.Info } -func (p *TSIServiceUnsetSchemaTemplateArgs) IsSetReq() bool { - return p.Req != nil +func (p *IClientRPCServiceHandshakeArgs) IsSetInfo() bool { + return p.Info != nil } -func (p *TSIServiceUnsetSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceHandshakeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28277,9 +34037,9 @@ func (p *TSIServiceUnsetSchemaTemplateArgs) Read(ctx context.Context, iprot thri } if fieldTypeId == thrift.STOP { break; } switch fieldId { - case 1: + case -1: if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { + if err := p.ReadField_1(ctx, iprot); err != nil { return err } } else { @@ -28302,19 +34062,19 @@ func (p *TSIServiceUnsetSchemaTemplateArgs) Read(ctx context.Context, iprot thri return nil } -func (p *TSIServiceUnsetSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSUnsetSchemaTemplateReq{} - if err := p.Req.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) +func (p *IClientRPCServiceHandshakeArgs) ReadField_1(ctx context.Context, iprot thrift.TProtocol) error { + p.Info = &TSyncIdentityInfo{} + if err := p.Info.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Info), err) } return nil } -func (p *TSIServiceUnsetSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "unsetSchemaTemplate_args"); err != nil { +func (p *IClientRPCServiceHandshakeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "handshake_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField_1(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -28323,46 +34083,46 @@ func (p *TSIServiceUnsetSchemaTemplateArgs) Write(ctx context.Context, oprot thr return nil } -func (p *TSIServiceUnsetSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } - if err := p.Req.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) +func (p *IClientRPCServiceHandshakeArgs) writeField_1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "info", thrift.STRUCT, -1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -1:info: ", p), err) } + if err := p.Info.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Info), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error -1:info: ", p), err) } return err } -func (p *TSIServiceUnsetSchemaTemplateArgs) String() string { +func (p *IClientRPCServiceHandshakeArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceUnsetSchemaTemplateArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceHandshakeArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceUnsetSchemaTemplateResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceHandshakeResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceUnsetSchemaTemplateResult() *TSIServiceUnsetSchemaTemplateResult { - return &TSIServiceUnsetSchemaTemplateResult{} +func NewIClientRPCServiceHandshakeResult() *IClientRPCServiceHandshakeResult { + return &IClientRPCServiceHandshakeResult{} } -var TSIServiceUnsetSchemaTemplateResult_Success_DEFAULT *TSStatus -func (p *TSIServiceUnsetSchemaTemplateResult) GetSuccess() *TSStatus { +var IClientRPCServiceHandshakeResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceHandshakeResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceUnsetSchemaTemplateResult_Success_DEFAULT + return IClientRPCServiceHandshakeResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceUnsetSchemaTemplateResult) IsSetSuccess() bool { +func (p *IClientRPCServiceHandshakeResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceUnsetSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceHandshakeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28400,16 +34160,16 @@ func (p *TSIServiceUnsetSchemaTemplateResult) Read(ctx context.Context, iprot th return nil } -func (p *TSIServiceUnsetSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceHandshakeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceUnsetSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "unsetSchemaTemplate_result"); err != nil { +func (p *IClientRPCServiceHandshakeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "handshake_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -28421,7 +34181,7 @@ func (p *TSIServiceUnsetSchemaTemplateResult) Write(ctx context.Context, oprot t return nil } -func (p *TSIServiceUnsetSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceHandshakeResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -28434,35 +34194,28 @@ func (p *TSIServiceUnsetSchemaTemplateResult) writeField0(ctx context.Context, o return err } -func (p *TSIServiceUnsetSchemaTemplateResult) String() string { +func (p *IClientRPCServiceHandshakeResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceUnsetSchemaTemplateResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceHandshakeResult(%+v)", *p) } // Attributes: -// - Req -type TSIServiceSetUsingTemplateArgs struct { - Req *TSSetUsingTemplateReq `thrift:"req,1" db:"req" json:"req"` +// - Buff +type IClientRPCServiceSendPipeDataArgs struct { + Buff []byte `thrift:"buff,1" db:"buff" json:"buff"` } -func NewTSIServiceSetUsingTemplateArgs() *TSIServiceSetUsingTemplateArgs { - return &TSIServiceSetUsingTemplateArgs{} +func NewIClientRPCServiceSendPipeDataArgs() *IClientRPCServiceSendPipeDataArgs { + return &IClientRPCServiceSendPipeDataArgs{} } -var TSIServiceSetUsingTemplateArgs_Req_DEFAULT *TSSetUsingTemplateReq -func (p *TSIServiceSetUsingTemplateArgs) GetReq() *TSSetUsingTemplateReq { - if !p.IsSetReq() { - return TSIServiceSetUsingTemplateArgs_Req_DEFAULT - } -return p.Req -} -func (p *TSIServiceSetUsingTemplateArgs) IsSetReq() bool { - return p.Req != nil -} -func (p *TSIServiceSetUsingTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceSendPipeDataArgs) GetBuff() []byte { + return p.Buff +} +func (p *IClientRPCServiceSendPipeDataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28476,7 +34229,7 @@ func (p *TSIServiceSetUsingTemplateArgs) Read(ctx context.Context, iprot thrift. if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.STRUCT { + if fieldTypeId == thrift.STRING { if err := p.ReadField1(ctx, iprot); err != nil { return err } @@ -28500,16 +34253,17 @@ func (p *TSIServiceSetUsingTemplateArgs) Read(ctx context.Context, iprot thrift. return nil } -func (p *TSIServiceSetUsingTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSSetUsingTemplateReq{} - if err := p.Req.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) - } +func (p *IClientRPCServiceSendPipeDataArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Buff = v +} return nil } -func (p *TSIServiceSetUsingTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setUsingTemplate_args"); err != nil { +func (p *IClientRPCServiceSendPipeDataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "sendPipeData_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } @@ -28521,46 +34275,45 @@ func (p *TSIServiceSetUsingTemplateArgs) Write(ctx context.Context, oprot thrift return nil } -func (p *TSIServiceSetUsingTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } - if err := p.Req.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) - } +func (p *IClientRPCServiceSendPipeDataArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "buff", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:buff: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Buff); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.buff (1) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:buff: ", p), err) } return err } -func (p *TSIServiceSetUsingTemplateArgs) String() string { +func (p *IClientRPCServiceSendPipeDataArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceSetUsingTemplateArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceSendPipeDataArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceSetUsingTemplateResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceSendPipeDataResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceSetUsingTemplateResult() *TSIServiceSetUsingTemplateResult { - return &TSIServiceSetUsingTemplateResult{} +func NewIClientRPCServiceSendPipeDataResult() *IClientRPCServiceSendPipeDataResult { + return &IClientRPCServiceSendPipeDataResult{} } -var TSIServiceSetUsingTemplateResult_Success_DEFAULT *TSStatus -func (p *TSIServiceSetUsingTemplateResult) GetSuccess() *TSStatus { +var IClientRPCServiceSendPipeDataResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceSendPipeDataResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceSetUsingTemplateResult_Success_DEFAULT + return IClientRPCServiceSendPipeDataResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceSetUsingTemplateResult) IsSetSuccess() bool { +func (p *IClientRPCServiceSendPipeDataResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceSetUsingTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceSendPipeDataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28598,16 +34351,16 @@ func (p *TSIServiceSetUsingTemplateResult) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceSetUsingTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceSendPipeDataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceSetUsingTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "setUsingTemplate_result"); err != nil { +func (p *IClientRPCServiceSendPipeDataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "sendPipeData_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -28619,7 +34372,7 @@ func (p *TSIServiceSetUsingTemplateResult) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceSetUsingTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceSendPipeDataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -28632,40 +34385,41 @@ func (p *TSIServiceSetUsingTemplateResult) writeField0(ctx context.Context, opro return err } -func (p *TSIServiceSetUsingTemplateResult) String() string { +func (p *IClientRPCServiceSendPipeDataResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceSetUsingTemplateResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceSendPipeDataResult(%+v)", *p) } // Attributes: -// - SessionId -// - TemplateName -// - PrefixPath -type TSIServiceUnsetUsingTemplateArgs struct { - SessionId int64 `thrift:"sessionId,1" db:"sessionId" json:"sessionId"` - TemplateName string `thrift:"templateName,2" db:"templateName" json:"templateName"` - PrefixPath string `thrift:"prefixPath,3" db:"prefixPath" json:"prefixPath"` +// - MetaInfo +// - Buff +type IClientRPCServiceSendFileArgs struct { + MetaInfo *TSyncTransportMetaInfo `thrift:"metaInfo,1" db:"metaInfo" json:"metaInfo"` + Buff []byte `thrift:"buff,2" db:"buff" json:"buff"` } -func NewTSIServiceUnsetUsingTemplateArgs() *TSIServiceUnsetUsingTemplateArgs { - return &TSIServiceUnsetUsingTemplateArgs{} +func NewIClientRPCServiceSendFileArgs() *IClientRPCServiceSendFileArgs { + return &IClientRPCServiceSendFileArgs{} } - -func (p *TSIServiceUnsetUsingTemplateArgs) GetSessionId() int64 { - return p.SessionId +var IClientRPCServiceSendFileArgs_MetaInfo_DEFAULT *TSyncTransportMetaInfo +func (p *IClientRPCServiceSendFileArgs) GetMetaInfo() *TSyncTransportMetaInfo { + if !p.IsSetMetaInfo() { + return IClientRPCServiceSendFileArgs_MetaInfo_DEFAULT + } +return p.MetaInfo } -func (p *TSIServiceUnsetUsingTemplateArgs) GetTemplateName() string { - return p.TemplateName +func (p *IClientRPCServiceSendFileArgs) GetBuff() []byte { + return p.Buff } - -func (p *TSIServiceUnsetUsingTemplateArgs) GetPrefixPath() string { - return p.PrefixPath +func (p *IClientRPCServiceSendFileArgs) IsSetMetaInfo() bool { + return p.MetaInfo != nil } -func (p *TSIServiceUnsetUsingTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *IClientRPCServiceSendFileArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28679,7 +34433,7 @@ func (p *TSIServiceUnsetUsingTemplateArgs) Read(ctx context.Context, iprot thrif if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField1(ctx, iprot); err != nil { return err } @@ -28698,16 +34452,6 @@ func (p *TSIServiceUnsetUsingTemplateArgs) Read(ctx context.Context, iprot thrif return err } } - case 3: - if fieldTypeId == thrift.STRING { - if err := p.ReadField3(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -28723,40 +34467,29 @@ func (p *TSIServiceUnsetUsingTemplateArgs) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceUnsetUsingTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 1: ", err) -} else { - p.SessionId = v -} +func (p *IClientRPCServiceSendFileArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.MetaInfo = &TSyncTransportMetaInfo{} + if err := p.MetaInfo.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MetaInfo), err) + } return nil } -func (p *TSIServiceUnsetUsingTemplateArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { +func (p *IClientRPCServiceSendFileArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { - p.TemplateName = v -} - return nil -} - -func (p *TSIServiceUnsetUsingTemplateArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 3: ", err) -} else { - p.PrefixPath = v + p.Buff = v } return nil } -func (p *TSIServiceUnsetUsingTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "unsetUsingTemplate_args"); err != nil { +func (p *IClientRPCServiceSendFileArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "sendFile_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField1(ctx, oprot); err != nil { return err } if err := p.writeField2(ctx, oprot); err != nil { return err } - if err := p.writeField3(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -28765,65 +34498,56 @@ func (p *TSIServiceUnsetUsingTemplateArgs) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceUnsetUsingTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "sessionId", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sessionId: ", p), err) } - if err := oprot.WriteI64(ctx, int64(p.SessionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.sessionId (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sessionId: ", p), err) } - return err -} - -func (p *TSIServiceUnsetUsingTemplateArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "templateName", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:templateName: ", p), err) } - if err := oprot.WriteString(ctx, string(p.TemplateName)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.templateName (2) field write error: ", p), err) } +func (p *IClientRPCServiceSendFileArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "metaInfo", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:metaInfo: ", p), err) } + if err := p.MetaInfo.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MetaInfo), err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:templateName: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:metaInfo: ", p), err) } return err } -func (p *TSIServiceUnsetUsingTemplateArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "prefixPath", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:prefixPath: ", p), err) } - if err := oprot.WriteString(ctx, string(p.PrefixPath)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.prefixPath (3) field write error: ", p), err) } +func (p *IClientRPCServiceSendFileArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "buff", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:buff: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Buff); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.buff (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:prefixPath: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:buff: ", p), err) } return err } -func (p *TSIServiceUnsetUsingTemplateArgs) String() string { +func (p *IClientRPCServiceSendFileArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceUnsetUsingTemplateArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceSendFileArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceUnsetUsingTemplateResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceSendFileResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceUnsetUsingTemplateResult() *TSIServiceUnsetUsingTemplateResult { - return &TSIServiceUnsetUsingTemplateResult{} +func NewIClientRPCServiceSendFileResult() *IClientRPCServiceSendFileResult { + return &IClientRPCServiceSendFileResult{} } -var TSIServiceUnsetUsingTemplateResult_Success_DEFAULT *TSStatus -func (p *TSIServiceUnsetUsingTemplateResult) GetSuccess() *TSStatus { +var IClientRPCServiceSendFileResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceSendFileResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return TSIServiceUnsetUsingTemplateResult_Success_DEFAULT + return IClientRPCServiceSendFileResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceUnsetUsingTemplateResult) IsSetSuccess() bool { +func (p *IClientRPCServiceSendFileResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceUnsetUsingTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceSendFileResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28861,16 +34585,16 @@ func (p *TSIServiceUnsetUsingTemplateResult) Read(ctx context.Context, iprot thr return nil } -func (p *TSIServiceUnsetUsingTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceSendFileResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TSStatus{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceUnsetUsingTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "unsetUsingTemplate_result"); err != nil { +func (p *IClientRPCServiceSendFileResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "sendFile_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -28882,7 +34606,7 @@ func (p *TSIServiceUnsetUsingTemplateResult) Write(ctx context.Context, oprot th return nil } -func (p *TSIServiceUnsetUsingTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceSendFileResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -28895,35 +34619,21 @@ func (p *TSIServiceUnsetUsingTemplateResult) writeField0(ctx context.Context, op return err } -func (p *TSIServiceUnsetUsingTemplateResult) String() string { +func (p *IClientRPCServiceSendFileResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceUnsetUsingTemplateResult(%+v)", *p) -} - -// Attributes: -// - Req -type TSIServiceDropSchemaTemplateArgs struct { - Req *TSDropSchemaTemplateReq `thrift:"req,1" db:"req" json:"req"` + return fmt.Sprintf("IClientRPCServiceSendFileResult(%+v)", *p) } -func NewTSIServiceDropSchemaTemplateArgs() *TSIServiceDropSchemaTemplateArgs { - return &TSIServiceDropSchemaTemplateArgs{} +type IClientRPCServiceGetBackupConfigurationArgs struct { } -var TSIServiceDropSchemaTemplateArgs_Req_DEFAULT *TSDropSchemaTemplateReq -func (p *TSIServiceDropSchemaTemplateArgs) GetReq() *TSDropSchemaTemplateReq { - if !p.IsSetReq() { - return TSIServiceDropSchemaTemplateArgs_Req_DEFAULT - } -return p.Req -} -func (p *TSIServiceDropSchemaTemplateArgs) IsSetReq() bool { - return p.Req != nil +func NewIClientRPCServiceGetBackupConfigurationArgs() *IClientRPCServiceGetBackupConfigurationArgs { + return &IClientRPCServiceGetBackupConfigurationArgs{} } -func (p *TSIServiceDropSchemaTemplateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceGetBackupConfigurationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -28935,21 +34645,8 @@ func (p *TSIServiceDropSchemaTemplateArgs) Read(ctx context.Context, iprot thrif return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - switch fieldId { - case 1: - if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err } if err := iprot.ReadFieldEnd(ctx); err != nil { return err @@ -28961,19 +34658,10 @@ func (p *TSIServiceDropSchemaTemplateArgs) Read(ctx context.Context, iprot thrif return nil } -func (p *TSIServiceDropSchemaTemplateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSDropSchemaTemplateReq{} - if err := p.Req.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) - } - return nil -} - -func (p *TSIServiceDropSchemaTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "dropSchemaTemplate_args"); err != nil { +func (p *IClientRPCServiceGetBackupConfigurationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getBackupConfiguration_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -28982,46 +34670,35 @@ func (p *TSIServiceDropSchemaTemplateArgs) Write(ctx context.Context, oprot thri return nil } -func (p *TSIServiceDropSchemaTemplateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } - if err := p.Req.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } - return err -} - -func (p *TSIServiceDropSchemaTemplateArgs) String() string { +func (p *IClientRPCServiceGetBackupConfigurationArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceDropSchemaTemplateArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceGetBackupConfigurationArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceDropSchemaTemplateResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceGetBackupConfigurationResult struct { + Success *TSBackupConfigurationResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceDropSchemaTemplateResult() *TSIServiceDropSchemaTemplateResult { - return &TSIServiceDropSchemaTemplateResult{} +func NewIClientRPCServiceGetBackupConfigurationResult() *IClientRPCServiceGetBackupConfigurationResult { + return &IClientRPCServiceGetBackupConfigurationResult{} } -var TSIServiceDropSchemaTemplateResult_Success_DEFAULT *TSStatus -func (p *TSIServiceDropSchemaTemplateResult) GetSuccess() *TSStatus { +var IClientRPCServiceGetBackupConfigurationResult_Success_DEFAULT *TSBackupConfigurationResp +func (p *IClientRPCServiceGetBackupConfigurationResult) GetSuccess() *TSBackupConfigurationResp { if !p.IsSetSuccess() { - return TSIServiceDropSchemaTemplateResult_Success_DEFAULT + return IClientRPCServiceGetBackupConfigurationResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceDropSchemaTemplateResult) IsSetSuccess() bool { +func (p *IClientRPCServiceGetBackupConfigurationResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceDropSchemaTemplateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceGetBackupConfigurationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -29059,16 +34736,16 @@ func (p *TSIServiceDropSchemaTemplateResult) Read(ctx context.Context, iprot thr return nil } -func (p *TSIServiceDropSchemaTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceGetBackupConfigurationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSBackupConfigurationResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceDropSchemaTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "dropSchemaTemplate_result"); err != nil { +func (p *IClientRPCServiceGetBackupConfigurationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getBackupConfiguration_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -29080,7 +34757,7 @@ func (p *TSIServiceDropSchemaTemplateResult) Write(ctx context.Context, oprot th return nil } -func (p *TSIServiceDropSchemaTemplateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceGetBackupConfigurationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -29093,35 +34770,21 @@ func (p *TSIServiceDropSchemaTemplateResult) writeField0(ctx context.Context, op return err } -func (p *TSIServiceDropSchemaTemplateResult) String() string { +func (p *IClientRPCServiceGetBackupConfigurationResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceDropSchemaTemplateResult(%+v)", *p) -} - -// Attributes: -// - Req -type TSIServiceExecuteOperationSyncArgs struct { - Req *TSOperationSyncWriteReq `thrift:"req,1" db:"req" json:"req"` + return fmt.Sprintf("IClientRPCServiceGetBackupConfigurationResult(%+v)", *p) } -func NewTSIServiceExecuteOperationSyncArgs() *TSIServiceExecuteOperationSyncArgs { - return &TSIServiceExecuteOperationSyncArgs{} +type IClientRPCServiceFetchAllConnectionsInfoArgs struct { } -var TSIServiceExecuteOperationSyncArgs_Req_DEFAULT *TSOperationSyncWriteReq -func (p *TSIServiceExecuteOperationSyncArgs) GetReq() *TSOperationSyncWriteReq { - if !p.IsSetReq() { - return TSIServiceExecuteOperationSyncArgs_Req_DEFAULT - } -return p.Req -} -func (p *TSIServiceExecuteOperationSyncArgs) IsSetReq() bool { - return p.Req != nil +func NewIClientRPCServiceFetchAllConnectionsInfoArgs() *IClientRPCServiceFetchAllConnectionsInfoArgs { + return &IClientRPCServiceFetchAllConnectionsInfoArgs{} } -func (p *TSIServiceExecuteOperationSyncArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -29133,21 +34796,8 @@ func (p *TSIServiceExecuteOperationSyncArgs) Read(ctx context.Context, iprot thr return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) } if fieldTypeId == thrift.STOP { break; } - switch fieldId { - case 1: - if fieldTypeId == thrift.STRUCT { - if err := p.ReadField1(ctx, iprot); err != nil { - return err - } - } else { - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } - } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { - return err - } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err } if err := iprot.ReadFieldEnd(ctx); err != nil { return err @@ -29159,19 +34809,10 @@ func (p *TSIServiceExecuteOperationSyncArgs) Read(ctx context.Context, iprot thr return nil } -func (p *TSIServiceExecuteOperationSyncArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSOperationSyncWriteReq{} - if err := p.Req.Read(ctx, iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Req), err) - } - return nil -} - -func (p *TSIServiceExecuteOperationSyncArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeOperationSync_args"); err != nil { +func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fetchAllConnectionsInfo_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { - if err := p.writeField1(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -29180,46 +34821,35 @@ func (p *TSIServiceExecuteOperationSyncArgs) Write(ctx context.Context, oprot th return nil } -func (p *TSIServiceExecuteOperationSyncArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin(ctx, "req", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:req: ", p), err) } - if err := p.Req.Write(ctx, oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Req), err) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:req: ", p), err) } - return err -} - -func (p *TSIServiceExecuteOperationSyncArgs) String() string { +func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteOperationSyncArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFetchAllConnectionsInfoArgs(%+v)", *p) } // Attributes: // - Success -type TSIServiceExecuteOperationSyncResult struct { - Success *TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceFetchAllConnectionsInfoResult struct { + Success *TSConnectionInfoResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewTSIServiceExecuteOperationSyncResult() *TSIServiceExecuteOperationSyncResult { - return &TSIServiceExecuteOperationSyncResult{} +func NewIClientRPCServiceFetchAllConnectionsInfoResult() *IClientRPCServiceFetchAllConnectionsInfoResult { + return &IClientRPCServiceFetchAllConnectionsInfoResult{} } -var TSIServiceExecuteOperationSyncResult_Success_DEFAULT *TSStatus -func (p *TSIServiceExecuteOperationSyncResult) GetSuccess() *TSStatus { +var IClientRPCServiceFetchAllConnectionsInfoResult_Success_DEFAULT *TSConnectionInfoResp +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) GetSuccess() *TSConnectionInfoResp { if !p.IsSetSuccess() { - return TSIServiceExecuteOperationSyncResult_Success_DEFAULT + return IClientRPCServiceFetchAllConnectionsInfoResult_Success_DEFAULT } return p.Success } -func (p *TSIServiceExecuteOperationSyncResult) IsSetSuccess() bool { +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) IsSetSuccess() bool { return p.Success != nil } -func (p *TSIServiceExecuteOperationSyncResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) Read(ctx context.Context, iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(ctx); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -29257,16 +34887,16 @@ func (p *TSIServiceExecuteOperationSyncResult) Read(ctx context.Context, iprot t return nil } -func (p *TSIServiceExecuteOperationSyncResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSStatus{} +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TSConnectionInfoResp{} if err := p.Success.Read(ctx, iprot); err != nil { return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) } return nil } -func (p *TSIServiceExecuteOperationSyncResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeOperationSync_result"); err != nil { +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "fetchAllConnectionsInfo_result"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { if err := p.writeField0(ctx, oprot); err != nil { return err } @@ -29278,7 +34908,7 @@ func (p *TSIServiceExecuteOperationSyncResult) Write(ctx context.Context, oprot return nil } -func (p *TSIServiceExecuteOperationSyncResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } @@ -29291,11 +34921,11 @@ func (p *TSIServiceExecuteOperationSyncResult) writeField0(ctx context.Context, return err } -func (p *TSIServiceExecuteOperationSyncResult) String() string { +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) String() string { if p == nil { return "" } - return fmt.Sprintf("TSIServiceExecuteOperationSyncResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFetchAllConnectionsInfoResult(%+v)", *p) } diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 649455d..5509d40 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -21,13 +21,13 @@ package e2e import ( "fmt" + "github.com/apache/iotdb-client-go/common" "log" "math/rand" "testing" "time" "github.com/apache/iotdb-client-go/client" - "github.com/apache/iotdb-client-go/rpc" "github.com/stretchr/testify/suite" ) @@ -67,7 +67,7 @@ func (s *e2eTestSuite) TearDownTest() { s.checkError(r, err) } -func (s *e2eTestSuite) checkError(status *rpc.TSStatus, err error) { +func (s *e2eTestSuite) checkError(status *common.TSStatus, err error) { s.Require().NoError(err) if status != nil { s.Require().NoError(client.VerifySuccess(status))