From 6c93b2c82d52293cdbeeb00f508ad67b01d3b465 Mon Sep 17 00:00:00 2001 From: Haonan Date: Wed, 17 Jul 2024 06:41:06 +0800 Subject: [PATCH] Fix make generate and update thrift file (#101) --- .github/workflows/go.yml | 16 +- .gitignore | 1 + Makefile | 69 +- README.md | 2 +- README_ZH.md | 2 +- client/session.go | 48 - common/common.go | 3547 ++++++++++++---- example/session_example.go | 22 - rpc/client.go | 7961 +++++++++++++++++++++++++----------- 9 files changed, 8443 insertions(+), 3225 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e7af9fe..f9fd3d3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -43,8 +43,22 @@ jobs: run: | go get -v -t -d ./... + - name: Install curl on Ubuntu + if: matrix.os == 'ubuntu-latest' + run: sudo apt-get update && sudo apt-get install -y curl + + - name: Install curl on Windows + if: matrix.os == 'windows-latest' + run: choco install curl -y + + - name: Install curl on macOS + if: matrix.os == 'macos-latest' + run: brew install curl + - name: Build - run: go build -v ./... + run: | + make generate + go build -v ./... - name: Test run: make test diff --git a/.gitignore b/.gitignore index ed34fc7..59cebb9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ output/ *.dll *.so *.dylib +thrift/ # Test binary, built with `go test -c` *.test diff --git a/Makefile b/Makefile index a46bf79..59993e6 100644 --- a/Makefile +++ b/Makefile @@ -15,32 +15,61 @@ # specific language governing permissions and limitations # under the License. -all: generate -generate: - @if ! command -v curl &> /dev/null; then \ - echo "curl could not be found, please install curl."; \ - exit 1; \ - fi +UNAME_S := $(shell uname -s) +UNAME_P := $(shell uname -p) - @if ! command -v thrift &> /dev/null; then \ - echo "thrift could not be found, please install thrift 0.15.0"; \ - exit 1; \ - fi +ifeq ($(UNAME_S),Linux) + ifeq ($(UNAME_P),x86_64) + OS_CLASSIFIER := linux-x86_64 + THRIFT_EXEC := thrift/bin/thrift + endif + ifeq ($(UNAME_P),aarch64) + OS_CLASSIFIER := linux-aarch64 + THRIFT_EXEC := thrift/bin/thrift + endif +endif +ifeq ($(UNAME_S),Darwin) + ifeq ($(UNAME_P),x86_64) + OS_CLASSIFIER := mac-x86_64 + THRIFT_EXEC := thrift/bin/thrift + endif + ifeq ($(UNAME_P),arm) + OS_CLASSIFIER := mac-aarch64 + THRIFT_EXEC := thrift/bin/thrift + endif +endif +ifneq ($(UNAME_S),Linux) + ifneq ($(UNAME_S),Darwin) + OS_CLASSIFIER := windows-x86_64 + THRIFT_EXEC := thrift/bin/Release/thrift.exe + endif +endif - @if [[ "`thrift --version|grep -o '0.15.[0-9]'`" == "" ]]; then \ - echo "please install thrift 0.15.0"; \ - exit 1; \ - fi +all: generate + +generate: - @if [ -f "../../iotdb-protocol/thrift/src/main/thrift/rpc.thrift" ]; then \ - thrift -out . -gen go ../../iotdb-protocol/thrift/src/main/thrift/rpc.thrift; \ + @if [ -f "../../iotdb-protocol/thrift-commons/src/main/thrift/common.thrift" ]; then \ + cd ../..; \ + mvn clean package -pl iotdb-protocol/thrift-datanode -am; \ + cd iotdb-client/client-go; \ + cp -r ../../iotdb-protocol/thrift-commons/target/generated-sources-go/common common; \ + cp -r ../../iotdb-protocol/thrift-datanode/target/generated-sources-go/rpc rpc; \ else \ - curl -o rpc.thrift https://raw.githubusercontent.com/apache/iotdb/master/iotdb-protocol/thrift/src/main/thrift/rpc.thrift; \ - thrift -out . -gen go rpc.thrift; \ - rm -f rpc.thrift; \ + echo "Downloading and unpacking iotdb-tools-thrift-0.14.1.0-$(OS_CLASSIFIER).zip"; \ + rm -rf thrift; \ + mkdir -p thrift; \ + curl -L -o thrift/iotdb-tools-thrift.zip https://repo1.maven.org/maven2/org/apache/iotdb/tools/iotdb-tools-thrift/0.14.1.0/iotdb-tools-thrift-0.14.1.0-$(OS_CLASSIFIER).zip; \ + unzip -o thrift/iotdb-tools-thrift.zip -d thrift; \ + curl -o common.thrift https://raw.githubusercontent.com/apache/iotdb/master/iotdb-protocol/thrift-commons/src/main/thrift/common.thrift; \ + $(THRIFT_EXEC) -out . -gen go:package_prefix=github.com/apache/iotdb-client-go/ common.thrift; \ + curl -o client.thrift https://raw.githubusercontent.com/apache/iotdb/master/iotdb-protocol/thrift-datanode/src/main/thrift/client.thrift; \ + $(THRIFT_EXEC) -out . -gen go:package_prefix=github.com/apache/iotdb-client-go/ client.thrift; \ + rm -f common.thrift; \ + rm -f client.thrift; \ fi - @rm -rf rpc/t_s_i_service-remote + @rm -rf rpc/i_client_r_p_c_service-remote .PHONY: generate all test e2e_test e2e_test_clean diff --git a/README.md b/README.md index 5466cf0..271bc1d 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ high-speed data ingestion and complex data analysis in the IoT industrial fields [![GitHub release](https://img.shields.io/github/release/apache/iotdb-client-go.svg)](https://github.com/apache/iotdb-client-go/releases) [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) ![](https://github-size-badge.herokuapp.com/apache/iotdb-client-go.svg) -![](https://img.shields.io/badge/platform-win10%20%7C%20macos%20%7C%20linux-yellow.svg) +![](https://img.shields.io/badge/platform-win%20%7C%20macos%20%7C%20linux-yellow.svg) [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) ## Overview diff --git a/README_ZH.md b/README_ZH.md index 33bd0db..a2d0f44 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -32,7 +32,7 @@ Apache IoTDB可以满足物联网工业领域的海量数据存储、高速数 [![GitHub release](https://img.shields.io/github/release/apache/iotdb-client-go.svg)](https://github.com/apache/iotdb-client-go/releases) [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) ![](https://github-size-badge.herokuapp.com/apache/iotdb-client-go.svg) -![](https://img.shields.io/badge/platform-win10%20%7C%20macos%20%7C%20linux-yellow.svg) +![](https://img.shields.io/badge/platform-win%20%7C%20macos%20%7C%20linux-yellow.svg) [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) ## 概览 diff --git a/client/session.go b/client/session.go index cd6da9b..0b55866 100644 --- a/client/session.go +++ b/client/session.go @@ -590,54 +590,6 @@ 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 diff --git a/common/common.go b/common/common.go index 80de2d6..983a00d 100644 --- a/common/common.go +++ b/common/common.go @@ -82,6 +82,7 @@ const ( TRegionMigrateFailedType_RemoveConsensusGroupFailed TRegionMigrateFailedType = 2 TRegionMigrateFailedType_DeleteRegionFailed TRegionMigrateFailedType = 3 TRegionMigrateFailedType_CreateRegionFailed TRegionMigrateFailedType = 4 + TRegionMigrateFailedType_Disconnect TRegionMigrateFailedType = 5 ) func (p TRegionMigrateFailedType) String() string { @@ -91,6 +92,7 @@ func (p TRegionMigrateFailedType) String() string { case TRegionMigrateFailedType_RemoveConsensusGroupFailed: return "RemoveConsensusGroupFailed" case TRegionMigrateFailedType_DeleteRegionFailed: return "DeleteRegionFailed" case TRegionMigrateFailedType_CreateRegionFailed: return "CreateRegionFailed" + case TRegionMigrateFailedType_Disconnect: return "Disconnect" } return "" } @@ -102,6 +104,7 @@ func TRegionMigrateFailedTypeFromString(s string) (TRegionMigrateFailedType, err case "RemoveConsensusGroupFailed": return TRegionMigrateFailedType_RemoveConsensusGroupFailed, nil case "DeleteRegionFailed": return TRegionMigrateFailedType_DeleteRegionFailed, nil case "CreateRegionFailed": return TRegionMigrateFailedType_CreateRegionFailed, nil + case "Disconnect": return TRegionMigrateFailedType_Disconnect, nil } return TRegionMigrateFailedType(0), fmt.Errorf("not a valid TRegionMigrateFailedType string") } @@ -137,6 +140,65 @@ func (p * TRegionMigrateFailedType) Value() (driver.Value, error) { } return int64(*p), nil } +type TRegionMaintainTaskStatus int64 +const ( + TRegionMaintainTaskStatus_TASK_NOT_EXIST TRegionMaintainTaskStatus = 0 + TRegionMaintainTaskStatus_PROCESSING TRegionMaintainTaskStatus = 1 + TRegionMaintainTaskStatus_SUCCESS TRegionMaintainTaskStatus = 2 + TRegionMaintainTaskStatus_FAIL TRegionMaintainTaskStatus = 3 +) + +func (p TRegionMaintainTaskStatus) String() string { + switch p { + case TRegionMaintainTaskStatus_TASK_NOT_EXIST: return "TASK_NOT_EXIST" + case TRegionMaintainTaskStatus_PROCESSING: return "PROCESSING" + case TRegionMaintainTaskStatus_SUCCESS: return "SUCCESS" + case TRegionMaintainTaskStatus_FAIL: return "FAIL" + } + return "" +} + +func TRegionMaintainTaskStatusFromString(s string) (TRegionMaintainTaskStatus, error) { + switch s { + case "TASK_NOT_EXIST": return TRegionMaintainTaskStatus_TASK_NOT_EXIST, nil + case "PROCESSING": return TRegionMaintainTaskStatus_PROCESSING, nil + case "SUCCESS": return TRegionMaintainTaskStatus_SUCCESS, nil + case "FAIL": return TRegionMaintainTaskStatus_FAIL, nil + } + return TRegionMaintainTaskStatus(0), fmt.Errorf("not a valid TRegionMaintainTaskStatus string") +} + + +func TRegionMaintainTaskStatusPtr(v TRegionMaintainTaskStatus) *TRegionMaintainTaskStatus { return &v } + +func (p TRegionMaintainTaskStatus) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TRegionMaintainTaskStatus) UnmarshalText(text []byte) error { +q, err := TRegionMaintainTaskStatusFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TRegionMaintainTaskStatus) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TRegionMaintainTaskStatus(v) +return nil +} + +func (p * TRegionMaintainTaskStatus) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} type ThrottleType int64 const ( ThrottleType_REQUEST_NUMBER ThrottleType = 0 @@ -202,6 +264,65 @@ func (p * ThrottleType) Value() (driver.Value, error) { } return int64(*p), nil } +type TServiceType int64 +const ( + TServiceType_ConfigNodeInternalService TServiceType = 0 + TServiceType_DataNodeInternalService TServiceType = 1 + TServiceType_DataNodeMPPService TServiceType = 2 + TServiceType_DataNodeExternalService TServiceType = 3 +) + +func (p TServiceType) String() string { + switch p { + case TServiceType_ConfigNodeInternalService: return "ConfigNodeInternalService" + case TServiceType_DataNodeInternalService: return "DataNodeInternalService" + case TServiceType_DataNodeMPPService: return "DataNodeMPPService" + case TServiceType_DataNodeExternalService: return "DataNodeExternalService" + } + return "" +} + +func TServiceTypeFromString(s string) (TServiceType, error) { + switch s { + case "ConfigNodeInternalService": return TServiceType_ConfigNodeInternalService, nil + case "DataNodeInternalService": return TServiceType_DataNodeInternalService, nil + case "DataNodeMPPService": return TServiceType_DataNodeMPPService, nil + case "DataNodeExternalService": return TServiceType_DataNodeExternalService, nil + } + return TServiceType(0), fmt.Errorf("not a valid TServiceType string") +} + + +func TServiceTypePtr(v TServiceType) *TServiceType { return &v } + +func (p TServiceType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TServiceType) UnmarshalText(text []byte) error { +q, err := TServiceTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TServiceType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TServiceType(v) +return nil +} + +func (p * TServiceType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} type TAggregationType int64 const ( TAggregationType_COUNT TAggregationType = 0 @@ -217,6 +338,16 @@ const ( TAggregationType_COUNT_IF TAggregationType = 10 TAggregationType_TIME_DURATION TAggregationType = 11 TAggregationType_MODE TAggregationType = 12 + TAggregationType_COUNT_TIME TAggregationType = 13 + TAggregationType_STDDEV TAggregationType = 14 + TAggregationType_STDDEV_POP TAggregationType = 15 + TAggregationType_STDDEV_SAMP TAggregationType = 16 + TAggregationType_VARIANCE TAggregationType = 17 + TAggregationType_VAR_POP TAggregationType = 18 + TAggregationType_VAR_SAMP TAggregationType = 19 + TAggregationType_MAX_BY TAggregationType = 20 + TAggregationType_MIN_BY TAggregationType = 21 + TAggregationType_UDAF TAggregationType = 22 ) func (p TAggregationType) String() string { @@ -234,6 +365,16 @@ func (p TAggregationType) String() string { case TAggregationType_COUNT_IF: return "COUNT_IF" case TAggregationType_TIME_DURATION: return "TIME_DURATION" case TAggregationType_MODE: return "MODE" + case TAggregationType_COUNT_TIME: return "COUNT_TIME" + case TAggregationType_STDDEV: return "STDDEV" + case TAggregationType_STDDEV_POP: return "STDDEV_POP" + case TAggregationType_STDDEV_SAMP: return "STDDEV_SAMP" + case TAggregationType_VARIANCE: return "VARIANCE" + case TAggregationType_VAR_POP: return "VAR_POP" + case TAggregationType_VAR_SAMP: return "VAR_SAMP" + case TAggregationType_MAX_BY: return "MAX_BY" + case TAggregationType_MIN_BY: return "MIN_BY" + case TAggregationType_UDAF: return "UDAF" } return "" } @@ -253,6 +394,16 @@ func TAggregationTypeFromString(s string) (TAggregationType, error) { case "COUNT_IF": return TAggregationType_COUNT_IF, nil case "TIME_DURATION": return TAggregationType_TIME_DURATION, nil case "MODE": return TAggregationType_MODE, nil + case "COUNT_TIME": return TAggregationType_COUNT_TIME, nil + case "STDDEV": return TAggregationType_STDDEV, nil + case "STDDEV_POP": return TAggregationType_STDDEV_POP, nil + case "STDDEV_SAMP": return TAggregationType_STDDEV_SAMP, nil + case "VARIANCE": return TAggregationType_VARIANCE, nil + case "VAR_POP": return TAggregationType_VAR_POP, nil + case "VAR_SAMP": return TAggregationType_VAR_SAMP, nil + case "MAX_BY": return TAggregationType_MAX_BY, nil + case "MIN_BY": return TAggregationType_MIN_BY, nil + case "UDAF": return TAggregationType_UDAF, nil } return TAggregationType(0), fmt.Errorf("not a valid TAggregationType string") } @@ -288,118 +439,6 @@ func (p * TAggregationType) Value() (driver.Value, error) { } 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 @@ -553,11 +592,13 @@ func (p *TEndPoint) String() string { // - Message // - SubStatus // - RedirectNode +// - NeedRetry 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"` + NeedRetry *bool `thrift:"needRetry,5" db:"needRetry" json:"needRetry,omitempty"` } func NewTSStatus() *TSStatus { @@ -587,6 +628,13 @@ func (p *TSStatus) GetRedirectNode() *TEndPoint { } return p.RedirectNode } +var TSStatus_NeedRetry_DEFAULT bool +func (p *TSStatus) GetNeedRetry() bool { + if !p.IsSetNeedRetry() { + return TSStatus_NeedRetry_DEFAULT + } +return *p.NeedRetry +} func (p *TSStatus) IsSetMessage() bool { return p.Message != nil } @@ -599,6 +647,10 @@ func (p *TSStatus) IsSetRedirectNode() bool { return p.RedirectNode != nil } +func (p *TSStatus) IsSetNeedRetry() bool { + return p.NeedRetry != 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) @@ -654,6 +706,16 @@ func (p *TSStatus) Read(ctx context.Context, iprot thrift.TProtocol) error { 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 + } + } default: if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -718,6 +780,15 @@ func (p *TSStatus) ReadField4(ctx context.Context, iprot thrift.TProtocol) erro return nil } +func (p *TSStatus) 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.NeedRetry = &v +} + 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) } @@ -726,6 +797,7 @@ func (p *TSStatus) Write(ctx context.Context, oprot thrift.TProtocol) error { 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) } @@ -790,6 +862,18 @@ func (p *TSStatus) writeField4(ctx context.Context, oprot thrift.TProtocol) (err return err } +func (p *TSStatus) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetNeedRetry() { + if err := oprot.WriteFieldBegin(ctx, "needRetry", thrift.BOOL, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:needRetry: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.NeedRetry)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.needRetry (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:needRetry: ", p), err) } + } + return err +} + func (p *TSStatus) Equals(other *TSStatus) bool { if p == other { return true @@ -809,6 +893,12 @@ func (p *TSStatus) Equals(other *TSStatus) bool { if !_tgt.Equals(_src1) { return false } } if !p.RedirectNode.Equals(other.RedirectNode) { return false } + if p.NeedRetry != other.NeedRetry { + if p.NeedRetry == nil || other.NeedRetry == nil { + return false + } + if (*p.NeedRetry) != (*other.NeedRetry) { return false } + } return true } @@ -2689,32 +2779,32 @@ func (p *TSchemaNode) String() string { } // 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"` +// - Configs +// - NodeId +type TSetConfigurationReq struct { + Configs map[string]string `thrift:"configs,1,required" db:"configs" json:"configs"` + NodeId int32 `thrift:"nodeId,2,required" db:"nodeId" json:"nodeId"` } -func NewTSetTTLReq() *TSetTTLReq { - return &TSetTTLReq{} +func NewTSetConfigurationReq() *TSetConfigurationReq { + return &TSetConfigurationReq{} } -func (p *TSetTTLReq) GetStorageGroupPathPattern() []string { - return p.StorageGroupPathPattern +func (p *TSetConfigurationReq) GetConfigs() map[string]string { + return p.Configs } -func (p *TSetTTLReq) GetTTL() int64 { - return p.TTL +func (p *TSetConfigurationReq) GetNodeId() int32 { + return p.NodeId } -func (p *TSetTTLReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSetConfigurationReq) 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; + var issetConfigs bool = false; + var issetNodeId bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -2724,22 +2814,22 @@ func (p *TSetTTLReq) Read(ctx context.Context, iprot thrift.TProtocol) error { if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.LIST { + if fieldTypeId == thrift.MAP { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetStorageGroupPathPattern = true + issetConfigs = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.I32 { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetTTL = true + issetNodeId = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -2757,48 +2847,54 @@ func (p *TSetTTLReq) 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 !issetStorageGroupPathPattern{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StorageGroupPathPattern is not set")); + if !issetConfigs{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Configs is not set")); } - if !issetTTL{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TTL is not set")); + if !issetNodeId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field NodeId is not set")); } return nil } -func (p *TSetTTLReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin(ctx) +func (p *TSetConfigurationReq) ReadField1(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.StorageGroupPathPattern = tSlice + tMap := make(map[string]string, size) + p.Configs = tMap for i := 0; i < size; i ++ { -var _elem8 string +var _key8 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key8 = v +} +var _val9 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem8 = v + _val9 = v } - p.StorageGroupPathPattern = append(p.StorageGroupPathPattern, _elem8) + p.Configs[_key8] = _val9 } - 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 *TSetTTLReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(ctx); err != nil { +func (p *TSetConfigurationReq) 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.TTL = v + p.NodeId = v } return nil } -func (p *TSetTTLReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSetTTLReq"); err != nil { +func (p *TSetConfigurationReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSetConfigurationReq"); 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 } @@ -2811,83 +2907,92 @@ func (p *TSetTTLReq) Write(ctx context.Context, oprot thrift.TProtocol) error { 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) +func (p *TSetConfigurationReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "configs", thrift.MAP, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:configs: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configs)); err != nil { + return thrift.PrependError("error writing map begin: ", err) } - for _, v := range p.StorageGroupPathPattern { + for k, v := range p.Configs { + 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 1:storageGroupPathPattern: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:configs: ", 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) } +func (p *TSetConfigurationReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "nodeId", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:nodeId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.NodeId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.nodeId (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 thrift.PrependError(fmt.Sprintf("%T write field end error 2:nodeId: ", p), err) } return err } -func (p *TSetTTLReq) Equals(other *TSetTTLReq) bool { +func (p *TSetConfigurationReq) Equals(other *TSetConfigurationReq) 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 len(p.Configs) != len(other.Configs) { return false } + for k, _tgt := range p.Configs { + _src10 := other.Configs[k] + if _tgt != _src10 { return false } } - if p.TTL != other.TTL { return false } + if p.NodeId != other.NodeId { return false } return true } -func (p *TSetTTLReq) String() string { +func (p *TSetConfigurationReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSetTTLReq(%+v)", *p) + return fmt.Sprintf("TSetConfigurationReq(%+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"` +// - PathPattern +// - TTL +// - IsDataBase +type TSetTTLReq struct { + PathPattern []string `thrift:"pathPattern,1,required" db:"pathPattern" json:"pathPattern"` + TTL int64 `thrift:"TTL,2,required" db:"TTL" json:"TTL"` + IsDataBase bool `thrift:"isDataBase,3,required" db:"isDataBase" json:"isDataBase"` } -func NewTFile() *TFile { - return &TFile{} +func NewTSetTTLReq() *TSetTTLReq { + return &TSetTTLReq{} } -func (p *TFile) GetFileName() string { - return p.FileName +func (p *TSetTTLReq) GetPathPattern() []string { + return p.PathPattern } -func (p *TFile) GetFile() []byte { - return p.File +func (p *TSetTTLReq) GetTTL() int64 { + return p.TTL } -func (p *TFile) Read(ctx context.Context, iprot thrift.TProtocol) error { + +func (p *TSetTTLReq) GetIsDataBase() bool { + return p.IsDataBase +} +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 issetFileName bool = false; - var issetFile bool = false; + var issetPathPattern bool = false; + var issetTTL bool = false; + var issetIsDataBase bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -2897,29 +3002,2046 @@ func (p *TFile) 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 } - issetFileName = true + issetPathPattern = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.I64 { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetFile = true + issetTTL = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } - default: - if err := iprot.Skip(ctx, fieldTypeId); err != nil { + case 3: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetIsDataBase = 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 !issetPathPattern{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PathPattern is not set")); + } + if !issetTTL{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TTL is not set")); + } + if !issetIsDataBase{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IsDataBase 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.PathPattern = tSlice + for i := 0; i < size; i ++ { +var _elem11 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem11 = v +} + p.PathPattern = append(p.PathPattern, _elem11) + } + 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) 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.IsDataBase = 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 := 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 *TSetTTLReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pathPattern", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pathPattern: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PathPattern)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.PathPattern { + 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:pathPattern: ", 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) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "isDataBase", thrift.BOOL, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:isDataBase: ", p), err) } + if err := oprot.WriteBool(ctx, bool(p.IsDataBase)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.isDataBase (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:isDataBase: ", 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.PathPattern) != len(other.PathPattern) { return false } + for i, _tgt := range p.PathPattern { + _src12 := other.PathPattern[i] + if _tgt != _src12 { return false } + } + if p.TTL != other.TTL { return false } + if p.IsDataBase != other.IsDataBase { return false } + return true +} + +func (p *TSetTTLReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSetTTLReq(%+v)", *p) +} + +// Attributes: +// - PathPattern +type TShowTTLReq struct { + PathPattern []string `thrift:"pathPattern,1,required" db:"pathPattern" json:"pathPattern"` +} + +func NewTShowTTLReq() *TShowTTLReq { + return &TShowTTLReq{} +} + + +func (p *TShowTTLReq) GetPathPattern() []string { + return p.PathPattern +} +func (p *TShowTTLReq) 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 issetPathPattern 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 + } + issetPathPattern = 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 !issetPathPattern{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PathPattern is not set")); + } + return nil +} + +func (p *TShowTTLReq) 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.PathPattern = tSlice + for i := 0; i < size; i ++ { +var _elem13 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem13 = v +} + p.PathPattern = append(p.PathPattern, _elem13) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TShowTTLReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TShowTTLReq"); 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 *TShowTTLReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pathPattern", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pathPattern: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PathPattern)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.PathPattern { + 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:pathPattern: ", p), err) } + return err +} + +func (p *TShowTTLReq) Equals(other *TShowTTLReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.PathPattern) != len(other.PathPattern) { return false } + for i, _tgt := range p.PathPattern { + _src14 := other.PathPattern[i] + if _tgt != _src14 { return false } + } + return true +} + +func (p *TShowTTLReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TShowTTLReq(%+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 ++ { + _elem15 := &TFile{} + if err := _elem15.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem15), err) + } + p.Files = append(p.Files, _elem15) + } + 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 { + _src16 := other.Files[i] + if !_tgt.Equals(_src16) { 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 _key17 ThrottleType + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + temp := ThrottleType(v) + _key17 = temp +} + _val18 := &TTimedQuota{} + if err := _val18.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _val18), err) + } + p.ThrottleLimit[_key17] = _val18 + } + 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 { + _src19 := other.ThrottleLimit[k] + if !_tgt.Equals(_src19) { 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 _elem20 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem20 = v +} + p.Database = append(p.Database, _elem20) + } + 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 { + _src21 := other.Database[i] + if _tgt != _src21 { 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) +} + +// Attributes: +// - LicenseIssueTimestamp +// - ExpireTimestamp +// - DataNodeNumLimit +// - CpuCoreNumLimit +// - DeviceNumLimit +// - SensorNumLimit +// - DisconnectionFromActiveNodeTimeLimit +// - MlNodeNumLimit +type TLicense struct { + LicenseIssueTimestamp int64 `thrift:"licenseIssueTimestamp,1,required" db:"licenseIssueTimestamp" json:"licenseIssueTimestamp"` + ExpireTimestamp int64 `thrift:"expireTimestamp,2,required" db:"expireTimestamp" json:"expireTimestamp"` + // unused field # 3 + DataNodeNumLimit int16 `thrift:"dataNodeNumLimit,4,required" db:"dataNodeNumLimit" json:"dataNodeNumLimit"` + CpuCoreNumLimit int32 `thrift:"cpuCoreNumLimit,5,required" db:"cpuCoreNumLimit" json:"cpuCoreNumLimit"` + DeviceNumLimit int64 `thrift:"deviceNumLimit,6,required" db:"deviceNumLimit" json:"deviceNumLimit"` + SensorNumLimit int64 `thrift:"sensorNumLimit,7,required" db:"sensorNumLimit" json:"sensorNumLimit"` + DisconnectionFromActiveNodeTimeLimit int64 `thrift:"disconnectionFromActiveNodeTimeLimit,8,required" db:"disconnectionFromActiveNodeTimeLimit" json:"disconnectionFromActiveNodeTimeLimit"` + MlNodeNumLimit int16 `thrift:"mlNodeNumLimit,9,required" db:"mlNodeNumLimit" json:"mlNodeNumLimit"` +} + +func NewTLicense() *TLicense { + return &TLicense{} +} + + +func (p *TLicense) GetLicenseIssueTimestamp() int64 { + return p.LicenseIssueTimestamp +} + +func (p *TLicense) GetExpireTimestamp() int64 { + return p.ExpireTimestamp +} + +func (p *TLicense) GetDataNodeNumLimit() int16 { + return p.DataNodeNumLimit +} + +func (p *TLicense) GetCpuCoreNumLimit() int32 { + return p.CpuCoreNumLimit +} + +func (p *TLicense) GetDeviceNumLimit() int64 { + return p.DeviceNumLimit +} + +func (p *TLicense) GetSensorNumLimit() int64 { + return p.SensorNumLimit +} + +func (p *TLicense) GetDisconnectionFromActiveNodeTimeLimit() int64 { + return p.DisconnectionFromActiveNodeTimeLimit +} + +func (p *TLicense) GetMlNodeNumLimit() int16 { + return p.MlNodeNumLimit +} +func (p *TLicense) 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 issetLicenseIssueTimestamp bool = false; + var issetExpireTimestamp bool = false; + var issetDataNodeNumLimit bool = false; + var issetCpuCoreNumLimit bool = false; + var issetDeviceNumLimit bool = false; + var issetSensorNumLimit bool = false; + var issetDisconnectionFromActiveNodeTimeLimit bool = false; + var issetMlNodeNumLimit 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 + } + issetLicenseIssueTimestamp = 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 + } + issetExpireTimestamp = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I16 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetDataNodeNumLimit = 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 + } + issetCpuCoreNumLimit = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.I64 { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + issetDeviceNumLimit = true + } 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 + } + issetSensorNumLimit = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.I64 { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + issetDisconnectionFromActiveNodeTimeLimit = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.I16 { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + issetMlNodeNumLimit = 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 !issetLicenseIssueTimestamp{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field LicenseIssueTimestamp is not set")); + } + if !issetExpireTimestamp{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ExpireTimestamp is not set")); + } + if !issetDataNodeNumLimit{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataNodeNumLimit is not set")); + } + if !issetCpuCoreNumLimit{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field CpuCoreNumLimit is not set")); + } + if !issetDeviceNumLimit{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DeviceNumLimit is not set")); + } + if !issetSensorNumLimit{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SensorNumLimit is not set")); + } + if !issetDisconnectionFromActiveNodeTimeLimit{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DisconnectionFromActiveNodeTimeLimit is not set")); + } + if !issetMlNodeNumLimit{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MlNodeNumLimit is not set")); + } + return nil +} + +func (p *TLicense) 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.LicenseIssueTimestamp = v +} + return nil +} + +func (p *TLicense) 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.ExpireTimestamp = v +} + return nil +} + +func (p *TLicense) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.DataNodeNumLimit = v +} + return nil +} + +func (p *TLicense) 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.CpuCoreNumLimit = v +} + return nil +} + +func (p *TLicense) 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.DeviceNumLimit = v +} + return nil +} + +func (p *TLicense) 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.SensorNumLimit = v +} + return nil +} + +func (p *TLicense) 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.DisconnectionFromActiveNodeTimeLimit = v +} + return nil +} + +func (p *TLicense) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 9: ", err) +} else { + p.MlNodeNumLimit = v +} + return nil +} + +func (p *TLicense) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TLicense"); 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.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) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TLicense) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "licenseIssueTimestamp", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:licenseIssueTimestamp: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.LicenseIssueTimestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.licenseIssueTimestamp (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:licenseIssueTimestamp: ", p), err) } + return err +} + +func (p *TLicense) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "expireTimestamp", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:expireTimestamp: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.ExpireTimestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.expireTimestamp (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:expireTimestamp: ", p), err) } + return err +} + +func (p *TLicense) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "dataNodeNumLimit", thrift.I16, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:dataNodeNumLimit: ", p), err) } + if err := oprot.WriteI16(ctx, int16(p.DataNodeNumLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.dataNodeNumLimit (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:dataNodeNumLimit: ", p), err) } + return err +} + +func (p *TLicense) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "cpuCoreNumLimit", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:cpuCoreNumLimit: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.CpuCoreNumLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.cpuCoreNumLimit (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:cpuCoreNumLimit: ", p), err) } + return err +} + +func (p *TLicense) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "deviceNumLimit", thrift.I64, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:deviceNumLimit: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.DeviceNumLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.deviceNumLimit (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:deviceNumLimit: ", p), err) } + return err +} + +func (p *TLicense) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sensorNumLimit", thrift.I64, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:sensorNumLimit: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.SensorNumLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.sensorNumLimit (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:sensorNumLimit: ", p), err) } + return err +} + +func (p *TLicense) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "disconnectionFromActiveNodeTimeLimit", thrift.I64, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:disconnectionFromActiveNodeTimeLimit: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.DisconnectionFromActiveNodeTimeLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.disconnectionFromActiveNodeTimeLimit (8) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:disconnectionFromActiveNodeTimeLimit: ", p), err) } + return err +} + +func (p *TLicense) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mlNodeNumLimit", thrift.I16, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:mlNodeNumLimit: ", p), err) } + if err := oprot.WriteI16(ctx, int16(p.MlNodeNumLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.mlNodeNumLimit (9) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:mlNodeNumLimit: ", p), err) } + return err +} + +func (p *TLicense) Equals(other *TLicense) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.LicenseIssueTimestamp != other.LicenseIssueTimestamp { return false } + if p.ExpireTimestamp != other.ExpireTimestamp { return false } + if p.DataNodeNumLimit != other.DataNodeNumLimit { return false } + if p.CpuCoreNumLimit != other.CpuCoreNumLimit { return false } + if p.DeviceNumLimit != other.DeviceNumLimit { return false } + if p.SensorNumLimit != other.SensorNumLimit { return false } + if p.DisconnectionFromActiveNodeTimeLimit != other.DisconnectionFromActiveNodeTimeLimit { return false } + if p.MlNodeNumLimit != other.MlNodeNumLimit { return false } + return true +} + +func (p *TLicense) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TLicense(%+v)", *p) +} + +// Attributes: +// - EndPoint +// - ServiceType +type TServiceProvider struct { + EndPoint *TEndPoint `thrift:"endPoint,1,required" db:"endPoint" json:"endPoint"` + ServiceType TServiceType `thrift:"serviceType,2,required" db:"serviceType" json:"serviceType"` +} + +func NewTServiceProvider() *TServiceProvider { + return &TServiceProvider{} +} + +var TServiceProvider_EndPoint_DEFAULT *TEndPoint +func (p *TServiceProvider) GetEndPoint() *TEndPoint { + if !p.IsSetEndPoint() { + return TServiceProvider_EndPoint_DEFAULT + } +return p.EndPoint +} + +func (p *TServiceProvider) GetServiceType() TServiceType { + return p.ServiceType +} +func (p *TServiceProvider) IsSetEndPoint() bool { + return p.EndPoint != nil +} + +func (p *TServiceProvider) 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 issetEndPoint bool = false; + var issetServiceType 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 + } + issetEndPoint = 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 + } + issetServiceType = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } @@ -2930,35 +5052,35 @@ func (p *TFile) 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 !issetFileName{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field FileName is not set")); + if !issetEndPoint{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field EndPoint is not set")); } - if !issetFile{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field File is not set")); + if !issetServiceType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ServiceType 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 -} +func (p *TServiceProvider) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.EndPoint = &TEndPoint{} + if err := p.EndPoint.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.EndPoint), err) + } return nil } -func (p *TFile) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(ctx); err != nil { +func (p *TServiceProvider) 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.File = v + temp := TServiceType(v) + p.ServiceType = temp } return nil } -func (p *TFile) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TFile"); err != nil { +func (p *TServiceProvider) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TServiceProvider"); 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 } @@ -2971,78 +5093,84 @@ func (p *TFile) Write(ctx context.Context, oprot thrift.TProtocol) error { 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) } +func (p *TServiceProvider) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "endPoint", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:endPoint: ", p), err) } + if err := p.EndPoint.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.EndPoint), err) + } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fileName: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:endPoint: ", 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) } +func (p *TServiceProvider) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "serviceType", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:serviceType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.ServiceType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.serviceType (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 thrift.PrependError(fmt.Sprintf("%T write field end error 2:serviceType: ", p), err) } return err } -func (p *TFile) Equals(other *TFile) bool { +func (p *TServiceProvider) Equals(other *TServiceProvider) 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 } + if !p.EndPoint.Equals(other.EndPoint) { return false } + if p.ServiceType != other.ServiceType { return false } return true } -func (p *TFile) String() string { +func (p *TServiceProvider) String() string { if p == nil { return "" } - return fmt.Sprintf("TFile(%+v)", *p) + return fmt.Sprintf("TServiceProvider(%+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"` +// - DataNodeLocation +// - ConfigNodeLocation +type TSender struct { + DataNodeLocation *TDataNodeLocation `thrift:"dataNodeLocation,1" db:"dataNodeLocation" json:"dataNodeLocation,omitempty"` + ConfigNodeLocation *TConfigNodeLocation `thrift:"configNodeLocation,2" db:"configNodeLocation" json:"configNodeLocation,omitempty"` } -func NewTFilesResp() *TFilesResp { - return &TFilesResp{} +func NewTSender() *TSender { + return &TSender{} } -var TFilesResp_Status_DEFAULT *TSStatus -func (p *TFilesResp) GetStatus() *TSStatus { - if !p.IsSetStatus() { - return TFilesResp_Status_DEFAULT +var TSender_DataNodeLocation_DEFAULT *TDataNodeLocation +func (p *TSender) GetDataNodeLocation() *TDataNodeLocation { + if !p.IsSetDataNodeLocation() { + return TSender_DataNodeLocation_DEFAULT } -return p.Status +return p.DataNodeLocation } - -func (p *TFilesResp) GetFiles() []*TFile { - return p.Files +var TSender_ConfigNodeLocation_DEFAULT *TConfigNodeLocation +func (p *TSender) GetConfigNodeLocation() *TConfigNodeLocation { + if !p.IsSetConfigNodeLocation() { + return TSender_ConfigNodeLocation_DEFAULT + } +return p.ConfigNodeLocation } -func (p *TFilesResp) IsSetStatus() bool { - return p.Status != nil +func (p *TSender) IsSetDataNodeLocation() bool { + return p.DataNodeLocation != nil } -func (p *TFilesResp) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TSender) IsSetConfigNodeLocation() bool { + return p.ConfigNodeLocation != nil +} + +func (p *TSender) 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) @@ -3056,18 +5184,16 @@ func (p *TFilesResp) Read(ctx context.Context, iprot thrift.TProtocol) error { 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 fieldTypeId == thrift.STRUCT { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetFiles = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -3085,45 +5211,27 @@ func (p *TFilesResp) 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 !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) +func (p *TSender) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.DataNodeLocation = &TDataNodeLocation{} + if err := p.DataNodeLocation.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DataNodeLocation), 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) +func (p *TSender) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.ConfigNodeLocation = &TConfigNodeLocation{} + if err := p.ConfigNodeLocation.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ConfigNodeLocation), err) } return nil } -func (p *TFilesResp) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TFilesResp"); err != nil { +func (p *TSender) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSender"); 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 } @@ -3136,110 +5244,111 @@ func (p *TFilesResp) Write(ctx context.Context, oprot thrift.TProtocol) error { 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) +func (p *TSender) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDataNodeLocation() { + if err := oprot.WriteFieldBegin(ctx, "dataNodeLocation", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:dataNodeLocation: ", p), err) } + if err := p.DataNodeLocation.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DataNodeLocation), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:dataNodeLocation: ", p), 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) +func (p *TSender) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetConfigNodeLocation() { + if err := oprot.WriteFieldBegin(ctx, "configNodeLocation", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:configNodeLocation: ", p), err) } + if err := p.ConfigNodeLocation.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ConfigNodeLocation), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:configNodeLocation: ", 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:files: ", p), err) } return err } -func (p *TFilesResp) Equals(other *TFilesResp) bool { +func (p *TSender) Equals(other *TSender) 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 } - } + if !p.DataNodeLocation.Equals(other.DataNodeLocation) { return false } + if !p.ConfigNodeLocation.Equals(other.ConfigNodeLocation) { return false } return true } -func (p *TFilesResp) String() string { +func (p *TSender) String() string { if p == nil { return "" } - return fmt.Sprintf("TFilesResp(%+v)", *p) + return fmt.Sprintf("TSender(%+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"` +// - ServiceProvider +// - Sender +// - Success +// - Reason +type TTestConnectionResult_ struct { + ServiceProvider *TServiceProvider `thrift:"serviceProvider,1,required" db:"serviceProvider" json:"serviceProvider"` + Sender *TSender `thrift:"sender,2,required" db:"sender" json:"sender"` + Success bool `thrift:"success,3,required" db:"success" json:"success"` + Reason *string `thrift:"reason,4" db:"reason" json:"reason,omitempty"` } -func NewTSpaceQuota() *TSpaceQuota { - return &TSpaceQuota{} +func NewTTestConnectionResult_() *TTestConnectionResult_ { + return &TTestConnectionResult_{} } -var TSpaceQuota_DiskSize_DEFAULT int64 -func (p *TSpaceQuota) GetDiskSize() int64 { - if !p.IsSetDiskSize() { - return TSpaceQuota_DiskSize_DEFAULT +var TTestConnectionResult__ServiceProvider_DEFAULT *TServiceProvider +func (p *TTestConnectionResult_) GetServiceProvider() *TServiceProvider { + if !p.IsSetServiceProvider() { + return TTestConnectionResult__ServiceProvider_DEFAULT } -return *p.DiskSize +return p.ServiceProvider } -var TSpaceQuota_DeviceNum_DEFAULT int64 -func (p *TSpaceQuota) GetDeviceNum() int64 { - if !p.IsSetDeviceNum() { - return TSpaceQuota_DeviceNum_DEFAULT +var TTestConnectionResult__Sender_DEFAULT *TSender +func (p *TTestConnectionResult_) GetSender() *TSender { + if !p.IsSetSender() { + return TTestConnectionResult__Sender_DEFAULT } -return *p.DeviceNum +return p.Sender } -var TSpaceQuota_TimeserieNum_DEFAULT int64 -func (p *TSpaceQuota) GetTimeserieNum() int64 { - if !p.IsSetTimeserieNum() { - return TSpaceQuota_TimeserieNum_DEFAULT + +func (p *TTestConnectionResult_) GetSuccess() bool { + return p.Success +} +var TTestConnectionResult__Reason_DEFAULT string +func (p *TTestConnectionResult_) GetReason() string { + if !p.IsSetReason() { + return TTestConnectionResult__Reason_DEFAULT } -return *p.TimeserieNum +return *p.Reason } -func (p *TSpaceQuota) IsSetDiskSize() bool { - return p.DiskSize != nil +func (p *TTestConnectionResult_) IsSetServiceProvider() bool { + return p.ServiceProvider != nil } -func (p *TSpaceQuota) IsSetDeviceNum() bool { - return p.DeviceNum != nil +func (p *TTestConnectionResult_) IsSetSender() bool { + return p.Sender != nil } -func (p *TSpaceQuota) IsSetTimeserieNum() bool { - return p.TimeserieNum != nil +func (p *TTestConnectionResult_) IsSetReason() bool { + return p.Reason != nil } -func (p *TSpaceQuota) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TTestConnectionResult_) 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 issetServiceProvider bool = false; + var issetSender bool = false; + var issetSuccess bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -3249,30 +5358,43 @@ func (p *TSpaceQuota) Read(ctx context.Context, iprot thrift.TProtocol) error { 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 } + issetServiceProvider = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField2(ctx, iprot); err != nil { return err } + issetSender = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 3: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.BOOL { if err := p.ReadField3(ctx, iprot); err != nil { return err } + issetSuccess = 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 @@ -3290,43 +5412,60 @@ func (p *TSpaceQuota) 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 !issetServiceProvider{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ServiceProvider is not set")); + } + if !issetSender{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Sender is not set")); + } + if !issetSuccess{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Success is not set")); + } 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 +func (p *TTestConnectionResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.ServiceProvider = &TServiceProvider{} + if err := p.ServiceProvider.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ServiceProvider), err) + } + return nil } + +func (p *TTestConnectionResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Sender = &TSender{} + if err := p.Sender.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Sender), err) + } 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) +func (p *TTestConnectionResult_) 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.DeviceNum = &v + p.Success = 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) +func (p *TTestConnectionResult_) 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.TimeserieNum = &v + p.Reason = &v } return nil } -func (p *TSpaceQuota) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSpaceQuota"); err != nil { +func (p *TTestConnectionResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TTestConnectionResult"); 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) } @@ -3335,103 +5474,109 @@ func (p *TSpaceQuota) Write(ctx context.Context, oprot thrift.TProtocol) error { 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) } +func (p *TTestConnectionResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "serviceProvider", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:serviceProvider: ", p), err) } + if err := p.ServiceProvider.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ServiceProvider), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:serviceProvider: ", 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) } +func (p *TTestConnectionResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sender", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:sender: ", p), err) } + if err := p.Sender.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Sender), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:sender: ", 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) } +func (p *TTestConnectionResult_) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:success: ", p), err) } + return err +} + +func (p *TTestConnectionResult_) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReason() { + if err := oprot.WriteFieldBegin(ctx, "reason", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:reason: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Reason)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.reason (4) 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 thrift.PrependError(fmt.Sprintf("%T write field end error 4:reason: ", p), err) } } return err } -func (p *TSpaceQuota) Equals(other *TSpaceQuota) bool { +func (p *TTestConnectionResult_) Equals(other *TTestConnectionResult_) 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 { + if !p.ServiceProvider.Equals(other.ServiceProvider) { return false } + if !p.Sender.Equals(other.Sender) { return false } + if p.Success != other.Success { return false } + if p.Reason != other.Reason { + if p.Reason == nil || other.Reason == nil { return false } - if (*p.TimeserieNum) != (*other.TimeserieNum) { return false } + if (*p.Reason) != (*other.Reason) { return false } } return true } -func (p *TSpaceQuota) String() string { +func (p *TTestConnectionResult_) String() string { if p == nil { return "" } - return fmt.Sprintf("TSpaceQuota(%+v)", *p) + return fmt.Sprintf("TTestConnectionResult_(%+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"` +// - Status +// - ResultList +type TTestConnectionResp struct { + Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` + ResultList []*TTestConnectionResult_ `thrift:"resultList,2,required" db:"resultList" json:"resultList"` } -func NewTTimedQuota() *TTimedQuota { - return &TTimedQuota{} +func NewTTestConnectionResp() *TTestConnectionResp { + return &TTestConnectionResp{} } - -func (p *TTimedQuota) GetTimeUnit() int64 { - return p.TimeUnit +var TTestConnectionResp_Status_DEFAULT *TSStatus +func (p *TTestConnectionResp) GetStatus() *TSStatus { + if !p.IsSetStatus() { + return TTestConnectionResp_Status_DEFAULT + } +return p.Status } -func (p *TTimedQuota) GetSoftLimit() int64 { - return p.SoftLimit +func (p *TTestConnectionResp) GetResultList() []*TTestConnectionResult_ { + return p.ResultList } -func (p *TTimedQuota) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TTestConnectionResp) IsSetStatus() bool { + return p.Status != nil +} + +func (p *TTestConnectionResp) 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; + var issetStatus bool = false; + var issetResultList bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -3441,22 +5586,22 @@ func (p *TTimedQuota) Read(ctx context.Context, iprot thrift.TProtocol) error { 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 } - issetTimeUnit = true + issetStatus = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.LIST { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetSoftLimit = true + issetResultList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -3474,35 +5619,45 @@ func (p *TTimedQuota) 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 !issetTimeUnit{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TimeUnit is not set")); + if !issetStatus{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); } - if !issetSoftLimit{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SoftLimit is not set")); + if !issetResultList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ResultList 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 -} +func (p *TTestConnectionResp) 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 *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 -} +func (p *TTestConnectionResp) 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([]*TTestConnectionResult_, 0, size) + p.ResultList = tSlice + for i := 0; i < size; i ++ { + _elem22 := &TTestConnectionResult_{} + if err := _elem22.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem22), err) + } + p.ResultList = append(p.ResultList, _elem22) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TTimedQuota) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TTimedQuota"); err != nil { +func (p *TTestConnectionResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TTestConnectionResp"); 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 } @@ -3515,90 +5670,89 @@ func (p *TTimedQuota) Write(ctx context.Context, oprot thrift.TProtocol) error { 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) } +func (p *TTestConnectionResp) 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:timeUnit: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", 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) } +func (p *TTestConnectionResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "resultList", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:resultList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ResultList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ResultList { + 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:softLimit: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:resultList: ", p), err) } return err } -func (p *TTimedQuota) Equals(other *TTimedQuota) bool { +func (p *TTestConnectionResp) Equals(other *TTestConnectionResp) 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 } + if !p.Status.Equals(other.Status) { return false } + if len(p.ResultList) != len(other.ResultList) { return false } + for i, _tgt := range p.ResultList { + _src23 := other.ResultList[i] + if !_tgt.Equals(_src23) { return false } + } return true } -func (p *TTimedQuota) String() string { +func (p *TTestConnectionResp) String() string { if p == nil { return "" } - return fmt.Sprintf("TTimedQuota(%+v)", *p) + return fmt.Sprintf("TTestConnectionResp(%+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"` +// - ConfigNodeLocations +// - DataNodeLocations +type TNodeLocations struct { + ConfigNodeLocations []*TConfigNodeLocation `thrift:"configNodeLocations,1" db:"configNodeLocations" json:"configNodeLocations,omitempty"` + DataNodeLocations []*TDataNodeLocation `thrift:"dataNodeLocations,2" db:"dataNodeLocations" json:"dataNodeLocations,omitempty"` } -func NewTThrottleQuota() *TThrottleQuota { - return &TThrottleQuota{} +func NewTNodeLocations() *TNodeLocations { + return &TNodeLocations{} } -var TThrottleQuota_ThrottleLimit_DEFAULT map[ThrottleType]*TTimedQuota +var TNodeLocations_ConfigNodeLocations_DEFAULT []*TConfigNodeLocation -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 *TNodeLocations) GetConfigNodeLocations() []*TConfigNodeLocation { + return p.ConfigNodeLocations } +var TNodeLocations_DataNodeLocations_DEFAULT []*TDataNodeLocation -func (p *TThrottleQuota) IsSetMemLimit() bool { - return p.MemLimit != nil +func (p *TNodeLocations) GetDataNodeLocations() []*TDataNodeLocation { + return p.DataNodeLocations +} +func (p *TNodeLocations) IsSetConfigNodeLocations() bool { + return p.ConfigNodeLocations != nil } -func (p *TThrottleQuota) IsSetCpuLimit() bool { - return p.CpuLimit != nil +func (p *TNodeLocations) IsSetDataNodeLocations() bool { + return p.DataNodeLocations != nil } -func (p *TThrottleQuota) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TNodeLocations) 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) } @@ -3612,7 +5766,7 @@ func (p *TThrottleQuota) Read(ctx context.Context, iprot thrift.TProtocol) error if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.MAP { + if fieldTypeId == thrift.LIST { if err := p.ReadField1(ctx, iprot); err != nil { return err } @@ -3622,7 +5776,7 @@ func (p *TThrottleQuota) Read(ctx context.Context, iprot thrift.TProtocol) error } } case 2: - if fieldTypeId == thrift.I64 { + if fieldTypeId == thrift.LIST { if err := p.ReadField2(ctx, iprot); err != nil { return err } @@ -3631,16 +5785,6 @@ func (p *TThrottleQuota) Read(ctx context.Context, iprot thrift.TProtocol) error 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 @@ -3656,58 +5800,52 @@ func (p *TThrottleQuota) Read(ctx context.Context, iprot thrift.TProtocol) error return nil } -func (p *TThrottleQuota) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin(ctx) +func (p *TNodeLocations) ReadField1(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[ThrottleType]*TTimedQuota, size) - p.ThrottleLimit = tMap + tSlice := make([]*TConfigNodeLocation, 0, size) + p.ConfigNodeLocations = tSlice 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) + _elem24 := &TConfigNodeLocation{} + if err := _elem24.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem24), err) } - p.ThrottleLimit[_key12] = _val13 + p.ConfigNodeLocations = append(p.ConfigNodeLocations, _elem24) } - 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 *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 -} +func (p *TNodeLocations) 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 ++ { + _elem25 := &TDataNodeLocation{} + if err := _elem25.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem25), err) + } + p.DataNodeLocations = append(p.DataNodeLocations, _elem25) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TThrottleQuota) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TThrottleQuota"); err != nil { +func (p *TNodeLocations) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TNodeLocations"); 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) } @@ -3716,120 +5854,108 @@ func (p *TThrottleQuota) Write(ctx context.Context, oprot thrift.TProtocol) erro 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) +func (p *TNodeLocations) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetConfigNodeLocations() { + if err := oprot.WriteFieldBegin(ctx, "configNodeLocations", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:configNodeLocations: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ConfigNodeLocations)); err != nil { + return thrift.PrependError("error writing list 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) } + for _, v := range p.ConfigNodeLocations { 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.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: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 thrift.PrependError(fmt.Sprintf("%T write field end error 1:configNodeLocations: ", 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) } +func (p *TNodeLocations) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDataNodeLocations() { + 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 3:cpuLimit: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:dataNodeLocations: ", p), err) } } return err } -func (p *TThrottleQuota) Equals(other *TThrottleQuota) bool { +func (p *TNodeLocations) Equals(other *TNodeLocations) 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 len(p.ConfigNodeLocations) != len(other.ConfigNodeLocations) { return false } + for i, _tgt := range p.ConfigNodeLocations { + _src26 := other.ConfigNodeLocations[i] + if !_tgt.Equals(_src26) { return false } } - if p.CpuLimit != other.CpuLimit { - if p.CpuLimit == nil || other.CpuLimit == nil { - return false - } - if (*p.CpuLimit) != (*other.CpuLimit) { return false } + if len(p.DataNodeLocations) != len(other.DataNodeLocations) { return false } + for i, _tgt := range p.DataNodeLocations { + _src27 := other.DataNodeLocations[i] + if !_tgt.Equals(_src27) { return false } } return true } -func (p *TThrottleQuota) String() string { +func (p *TNodeLocations) String() string { if p == nil { return "" } - return fmt.Sprintf("TThrottleQuota(%+v)", *p) + return fmt.Sprintf("TNodeLocations(%+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"` +// - Status +// - Content +type TShowConfigurationTemplateResp struct { + Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` + Content string `thrift:"content,2,required" db:"content" json:"content"` } -func NewTSetSpaceQuotaReq() *TSetSpaceQuotaReq { - return &TSetSpaceQuotaReq{} +func NewTShowConfigurationTemplateResp() *TShowConfigurationTemplateResp { + return &TShowConfigurationTemplateResp{} } - -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 +var TShowConfigurationTemplateResp_Status_DEFAULT *TSStatus +func (p *TShowConfigurationTemplateResp) GetStatus() *TSStatus { + if !p.IsSetStatus() { + return TShowConfigurationTemplateResp_Status_DEFAULT } -return p.SpaceLimit +return p.Status } -func (p *TSetSpaceQuotaReq) IsSetSpaceLimit() bool { - return p.SpaceLimit != nil + +func (p *TShowConfigurationTemplateResp) GetContent() string { + return p.Content +} +func (p *TShowConfigurationTemplateResp) IsSetStatus() bool { + return p.Status != nil } -func (p *TSetSpaceQuotaReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TShowConfigurationTemplateResp) 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; + var issetStatus bool = false; + var issetContent bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -3839,22 +5965,22 @@ func (p *TSetSpaceQuotaReq) Read(ctx context.Context, iprot thrift.TProtocol) er 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 } - issetDatabase = true + issetStatus = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.STRUCT { + if fieldTypeId == thrift.STRING { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetSpaceLimit = true + issetContent = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -3872,47 +5998,34 @@ func (p *TSetSpaceQuotaReq) 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 !issetDatabase{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Database is not set")); + if !issetStatus{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); } - if !issetSpaceLimit{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field SpaceLimit is not set")); + if !issetContent{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Content 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) +func (p *TShowConfigurationTemplateResp) 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 *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) - } +func (p *TShowConfigurationTemplateResp) 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.Content = v +} return nil } -func (p *TSetSpaceQuotaReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSetSpaceQuotaReq"); err != nil { +func (p *TShowConfigurationTemplateResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TShowConfigurationTemplateResp"); 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 } @@ -3925,91 +6038,79 @@ func (p *TSetSpaceQuotaReq) Write(ctx context.Context, oprot thrift.TProtocol) e 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) +func (p *TShowConfigurationTemplateResp) 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:database: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", 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) - } +func (p *TShowConfigurationTemplateResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "content", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:content: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Content)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.content (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:spaceLimit: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:content: ", p), err) } return err } -func (p *TSetSpaceQuotaReq) Equals(other *TSetSpaceQuotaReq) bool { +func (p *TShowConfigurationTemplateResp) Equals(other *TShowConfigurationTemplateResp) 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 } + if !p.Status.Equals(other.Status) { return false } + if p.Content != other.Content { return false } return true } -func (p *TSetSpaceQuotaReq) String() string { +func (p *TShowConfigurationTemplateResp) String() string { if p == nil { return "" } - return fmt.Sprintf("TSetSpaceQuotaReq(%+v)", *p) + return fmt.Sprintf("TShowConfigurationTemplateResp(%+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"` +// - Status +// - Content +type TShowConfigurationResp struct { + Status *TSStatus `thrift:"status,1,required" db:"status" json:"status"` + Content string `thrift:"content,2,required" db:"content" json:"content"` } -func NewTSetThrottleQuotaReq() *TSetThrottleQuotaReq { - return &TSetThrottleQuotaReq{} +func NewTShowConfigurationResp() *TShowConfigurationResp { + return &TShowConfigurationResp{} } - -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 +var TShowConfigurationResp_Status_DEFAULT *TSStatus +func (p *TShowConfigurationResp) GetStatus() *TSStatus { + if !p.IsSetStatus() { + return TShowConfigurationResp_Status_DEFAULT } -return p.ThrottleQuota +return p.Status } -func (p *TSetThrottleQuotaReq) IsSetThrottleQuota() bool { - return p.ThrottleQuota != nil + +func (p *TShowConfigurationResp) GetContent() string { + return p.Content +} +func (p *TShowConfigurationResp) IsSetStatus() bool { + return p.Status != nil } -func (p *TSetThrottleQuotaReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TShowConfigurationResp) 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; + var issetStatus bool = false; + var issetContent bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -4019,22 +6120,22 @@ func (p *TSetThrottleQuotaReq) Read(ctx context.Context, iprot thrift.TProtocol) if fieldTypeId == thrift.STOP { break; } switch fieldId { case 1: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.STRUCT { if err := p.ReadField1(ctx, iprot); err != nil { return err } - issetUserName = true + issetStatus = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err } } case 2: - if fieldTypeId == thrift.STRUCT { + if fieldTypeId == thrift.STRING { if err := p.ReadField2(ctx, iprot); err != nil { return err } - issetThrottleQuota = true + issetContent = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -4052,34 +6153,34 @@ func (p *TSetThrottleQuotaReq) 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 !issetUserName{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field UserName is not set")); + if !issetStatus{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Status is not set")); } - if !issetThrottleQuota{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThrottleQuota is not set")); + if !issetContent{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Content 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 -} +func (p *TShowConfigurationResp) 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 *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) - } +func (p *TShowConfigurationResp) 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.Content = v +} return nil } -func (p *TSetThrottleQuotaReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSetThrottleQuotaReq"); err != nil { +func (p *TShowConfigurationResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TShowConfigurationResp"); 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 } @@ -4092,42 +6193,42 @@ func (p *TSetThrottleQuotaReq) Write(ctx context.Context, oprot thrift.TProtocol 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) } +func (p *TShowConfigurationResp) 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:userName: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:status: ", 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) - } +func (p *TShowConfigurationResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "content", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:content: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Content)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.content (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:throttleQuota: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:content: ", p), err) } return err } -func (p *TSetThrottleQuotaReq) Equals(other *TSetThrottleQuotaReq) bool { +func (p *TShowConfigurationResp) Equals(other *TShowConfigurationResp) 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 } + if !p.Status.Equals(other.Status) { return false } + if p.Content != other.Content { return false } return true } -func (p *TSetThrottleQuotaReq) String() string { +func (p *TShowConfigurationResp) String() string { if p == nil { return "" } - return fmt.Sprintf("TSetThrottleQuotaReq(%+v)", *p) + return fmt.Sprintf("TShowConfigurationResp(%+v)", *p) } diff --git a/example/session_example.go b/example/session_example.go index bb85240..b370435 100644 --- a/example/session_example.go +++ b/example/session_example.go @@ -57,8 +57,6 @@ func main() { } defer session.Close() - fastInsertRecords() - setStorageGroup("root.ln1") deleteStorageGroup("root.ln1") @@ -383,26 +381,6 @@ 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"} diff --git a/rpc/client.go b/rpc/client.go index b3668b8..f9d6ca6 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -83,6 +83,7 @@ const ( TSConnectionType_THRIFT_BASED TSConnectionType = 0 TSConnectionType_MQTT_BASED TSConnectionType = 1 TSConnectionType_INTERNAL TSConnectionType = 2 + TSConnectionType_REST_BASED TSConnectionType = 3 ) func (p TSConnectionType) String() string { @@ -90,6 +91,7 @@ func (p TSConnectionType) String() string { case TSConnectionType_THRIFT_BASED: return "THRIFT_BASED" case TSConnectionType_MQTT_BASED: return "MQTT_BASED" case TSConnectionType_INTERNAL: return "INTERNAL" + case TSConnectionType_REST_BASED: return "REST_BASED" } return "" } @@ -99,6 +101,7 @@ func TSConnectionTypeFromString(s string) (TSConnectionType, error) { case "THRIFT_BASED": return TSConnectionType_THRIFT_BASED, nil case "MQTT_BASED": return TSConnectionType_MQTT_BASED, nil case "INTERNAL": return TSConnectionType_INTERNAL, nil + case "REST_BASED": return TSConnectionType_REST_BASED, nil } return TSConnectionType(0), fmt.Errorf("not a valid TSConnectionType string") } @@ -7256,45 +7259,64 @@ func (p *TSInsertTabletsReq) String() string { // Attributes: // - SessionId // - PrefixPaths -// - Timestamps +// - MeasurementsList // - ValuesList -type TSFastInsertRecordsReq struct { +// - Timestamps +// - IsAligned +type TSInsertRecordsReq struct { SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` PrefixPaths []string `thrift:"prefixPaths,2,required" db:"prefixPaths" json:"prefixPaths"` - // unused field # 3 + 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 NewTSFastInsertRecordsReq() *TSFastInsertRecordsReq { - return &TSFastInsertRecordsReq{} +func NewTSInsertRecordsReq() *TSInsertRecordsReq { + return &TSInsertRecordsReq{} } -func (p *TSFastInsertRecordsReq) GetSessionId() int64 { +func (p *TSInsertRecordsReq) GetSessionId() int64 { return p.SessionId } -func (p *TSFastInsertRecordsReq) GetPrefixPaths() []string { +func (p *TSInsertRecordsReq) GetPrefixPaths() []string { return p.PrefixPaths } -func (p *TSFastInsertRecordsReq) GetTimestamps() []int64 { - return p.Timestamps +func (p *TSInsertRecordsReq) GetMeasurementsList() [][]string { + return p.MeasurementsList } -func (p *TSFastInsertRecordsReq) GetValuesList() [][]byte { +func (p *TSInsertRecordsReq) GetValuesList() [][]byte { return p.ValuesList } -func (p *TSFastInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { + +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 { 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 issetTimestamps bool = false; + var issetMeasurementsList bool = false; var issetValuesList bool = false; + var issetTimestamps bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -7325,12 +7347,12 @@ func (p *TSFastInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtoco return err } } - case 5: + case 3: if fieldTypeId == thrift.LIST { - if err := p.ReadField5(ctx, iprot); err != nil { + if err := p.ReadField3(ctx, iprot); err != nil { return err } - issetTimestamps = true + issetMeasurementsList = true } else { if err := iprot.Skip(ctx, fieldTypeId); err != nil { return err @@ -7347,6 +7369,27 @@ func (p *TSFastInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtoco 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 @@ -7365,16 +7408,19 @@ func (p *TSFastInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtoco if !issetPrefixPaths{ return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PrefixPaths is not set")); } - if !issetTimestamps{ - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Timestamps is not set")); + if !issetMeasurementsList{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MeasurementsList 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 *TSFastInsertRecordsReq) 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 { @@ -7383,7 +7429,7 @@ func (p *TSFastInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.T return nil } -func (p *TSFastInsertRecordsReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +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) @@ -7405,21 +7451,33 @@ var _elem63 string return nil } -func (p *TSFastInsertRecordsReq) ReadField5(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) } - tSlice := make([]int64, 0, size) - p.Timestamps = tSlice + tSlice := make([][]string, 0, size) + p.MeasurementsList = tSlice for i := 0; i < size; i ++ { -var _elem64 int64 - if v, err := iprot.ReadI64(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + _elem64 := tSlice + for i := 0; i < size; i ++ { +var _elem65 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - _elem64 = v + _elem65 = v } - p.Timestamps = append(p.Timestamps, _elem64) + _elem64 = append(_elem64, _elem65) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + p.MeasurementsList = append(p.MeasurementsList, _elem64) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7427,7 +7485,7 @@ var _elem64 int64 return nil } -func (p *TSFastInsertRecordsReq) 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) @@ -7435,13 +7493,13 @@ func (p *TSFastInsertRecordsReq) ReadField4(ctx context.Context, iprot thrift.T tSlice := make([][]byte, 0, size) p.ValuesList = tSlice for i := 0; i < size; i ++ { -var _elem65 []byte +var _elem66 []byte if v, err := iprot.ReadBinary(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem65 = v + _elem66 = v } - p.ValuesList = append(p.ValuesList, _elem65) + p.ValuesList = append(p.ValuesList, _elem66) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7449,14 +7507,47 @@ var _elem65 []byte return nil } -func (p *TSFastInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSFastInsertRecordsReq"); err != 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 _elem67 int64 + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem67 = v +} + p.Timestamps = append(p.Timestamps, _elem67) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + 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 { 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) } @@ -7465,7 +7556,7 @@ func (p *TSFastInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtoc return nil } -func (p *TSFastInsertRecordsReq) 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 { @@ -7475,7 +7566,7 @@ func (p *TSFastInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.T return err } -func (p *TSFastInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +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 { @@ -7493,7 +7584,33 @@ func (p *TSFastInsertRecordsReq) writeField2(ctx context.Context, oprot thrift.T return err } -func (p *TSFastInsertRecordsReq) writeField4(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 { + 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) { 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 { @@ -7511,7 +7628,7 @@ func (p *TSFastInsertRecordsReq) writeField4(ctx context.Context, oprot thrift.T return err } -func (p *TSFastInsertRecordsReq) 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 { @@ -7529,7 +7646,19 @@ func (p *TSFastInsertRecordsReq) writeField5(ctx context.Context, oprot thrift.T return err } -func (p *TSFastInsertRecordsReq) Equals(other *TSFastInsertRecordsReq) bool { +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 { if p == other { return true } else if p == nil || other == nil { @@ -7538,87 +7667,102 @@ func (p *TSFastInsertRecordsReq) Equals(other *TSFastInsertRecordsReq) bool { if p.SessionId != other.SessionId { return false } if len(p.PrefixPaths) != len(other.PrefixPaths) { return false } for i, _tgt := range p.PrefixPaths { - _src66 := other.PrefixPaths[i] - if _tgt != _src66 { return false } + _src68 := other.PrefixPaths[i] + if _tgt != _src68 { return false } + } + if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } + for i, _tgt := range p.MeasurementsList { + _src69 := other.MeasurementsList[i] + if len(_tgt) != len(_src69) { return false } + for i, _tgt := range _tgt { + _src70 := _src69[i] + if _tgt != _src70 { return false } + } } if len(p.ValuesList) != len(other.ValuesList) { return false } for i, _tgt := range p.ValuesList { - _src67 := other.ValuesList[i] - if bytes.Compare(_tgt, _src67) != 0 { return false } + _src71 := other.ValuesList[i] + if bytes.Compare(_tgt, _src71) != 0 { return false } } if len(p.Timestamps) != len(other.Timestamps) { return false } for i, _tgt := range p.Timestamps { - _src68 := other.Timestamps[i] - if _tgt != _src68 { return false } + _src72 := other.Timestamps[i] + if _tgt != _src72 { return false } + } + if p.IsAligned != other.IsAligned { + if p.IsAligned == nil || other.IsAligned == nil { + return false + } + if (*p.IsAligned) != (*other.IsAligned) { return false } } return true } -func (p *TSFastInsertRecordsReq) String() string { +func (p *TSInsertRecordsReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSFastInsertRecordsReq(%+v)", *p) + return fmt.Sprintf("TSInsertRecordsReq(%+v)", *p) } // Attributes: // - SessionId -// - PrefixPaths +// - PrefixPath // - MeasurementsList // - ValuesList // - Timestamps // - IsAligned -type TSInsertRecordsReq struct { +type TSInsertRecordsOfOneDeviceReq 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 [][]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 NewTSInsertRecordsOfOneDeviceReq() *TSInsertRecordsOfOneDeviceReq { + return &TSInsertRecordsOfOneDeviceReq{} } -func (p *TSInsertRecordsReq) GetSessionId() int64 { +func (p *TSInsertRecordsOfOneDeviceReq) GetSessionId() int64 { return p.SessionId } -func (p *TSInsertRecordsReq) GetPrefixPaths() []string { - return p.PrefixPaths +func (p *TSInsertRecordsOfOneDeviceReq) GetPrefixPath() string { + return p.PrefixPath } -func (p *TSInsertRecordsReq) GetMeasurementsList() [][]string { +func (p *TSInsertRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { return p.MeasurementsList } -func (p *TSInsertRecordsReq) GetValuesList() [][]byte { +func (p *TSInsertRecordsOfOneDeviceReq) GetValuesList() [][]byte { return p.ValuesList } -func (p *TSInsertRecordsReq) GetTimestamps() []int64 { +func (p *TSInsertRecordsOfOneDeviceReq) GetTimestamps() []int64 { return p.Timestamps } -var TSInsertRecordsReq_IsAligned_DEFAULT bool -func (p *TSInsertRecordsReq) GetIsAligned() bool { +var TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT bool +func (p *TSInsertRecordsOfOneDeviceReq) GetIsAligned() bool { if !p.IsSetIsAligned() { - return TSInsertRecordsReq_IsAligned_DEFAULT + return TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT } return *p.IsAligned } -func (p *TSInsertRecordsReq) IsSetIsAligned() bool { +func (p *TSInsertRecordsOfOneDeviceReq) IsSetIsAligned() bool { return p.IsAligned != nil } -func (p *TSInsertRecordsReq) 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) } var issetSessionId bool = false; - var issetPrefixPaths bool = false; + var issetPrefixPath bool = false; var issetMeasurementsList bool = false; var issetValuesList bool = false; var issetTimestamps bool = false; @@ -7642,11 +7786,11 @@ func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) e } } 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 @@ -7710,8 +7854,8 @@ func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) e 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")); @@ -7725,7 +7869,7 @@ func (p *TSInsertRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) e return nil } -func (p *TSInsertRecordsReq) 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 { @@ -7734,29 +7878,16 @@ func (p *TSInsertRecordsReq) ReadField1(ctx context.Context, iprot thrift.TProt return nil } -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) +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 { - _elem69 = v + p.PrefixPath = 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 *TSInsertRecordsReq) 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) @@ -7769,20 +7900,20 @@ func (p *TSInsertRecordsReq) ReadField3(ctx context.Context, iprot thrift.TProt return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - _elem70 := tSlice + _elem73 := tSlice for i := 0; i < size; i ++ { -var _elem71 string +var _elem74 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem71 = v + _elem74 = v } - _elem70 = append(_elem70, _elem71) + _elem73 = append(_elem73, _elem74) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } - p.MeasurementsList = append(p.MeasurementsList, _elem70) + p.MeasurementsList = append(p.MeasurementsList, _elem73) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7790,7 +7921,7 @@ var _elem71 string return nil } -func (p *TSInsertRecordsReq) 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) @@ -7798,13 +7929,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 _elem72 []byte +var _elem75 []byte if v, err := iprot.ReadBinary(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem72 = v + _elem75 = v } - p.ValuesList = append(p.ValuesList, _elem72) + p.ValuesList = append(p.ValuesList, _elem75) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7812,7 +7943,7 @@ var _elem72 []byte return nil } -func (p *TSInsertRecordsReq) 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) @@ -7820,13 +7951,13 @@ func (p *TSInsertRecordsReq) ReadField5(ctx context.Context, iprot thrift.TProt tSlice := make([]int64, 0, size) p.Timestamps = tSlice for i := 0; i < size; i ++ { -var _elem73 int64 +var _elem76 int64 if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem73 = v + _elem76 = v } - p.Timestamps = append(p.Timestamps, _elem73) + p.Timestamps = append(p.Timestamps, _elem76) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -7834,7 +7965,7 @@ var _elem73 int64 return nil } -func (p *TSInsertRecordsReq) 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 { @@ -7843,8 +7974,8 @@ func (p *TSInsertRecordsReq) ReadField6(ctx context.Context, iprot thrift.TProt return nil } -func (p *TSInsertRecordsReq) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "TSInsertRecordsReq"); 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 } @@ -7861,7 +7992,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 *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 { @@ -7871,25 +8002,17 @@ func (p *TSInsertRecordsReq) writeField1(ctx context.Context, oprot thrift.TProt return 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) - } +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) } 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 *TSInsertRecordsReq) 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 { @@ -7915,7 +8038,7 @@ func (p *TSInsertRecordsReq) writeField3(ctx context.Context, oprot thrift.TProt return err } -func (p *TSInsertRecordsReq) 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.STRING, len(p.ValuesList)); err != nil { @@ -7933,7 +8056,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 *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 { @@ -7951,7 +8074,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) { +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) } @@ -7963,36 +8086,32 @@ func (p *TSInsertRecordsReq) writeField6(ctx context.Context, oprot thrift.TProt return err } -func (p *TSInsertRecordsReq) Equals(other *TSInsertRecordsReq) bool { +func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDeviceReq) 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 { - _src74 := other.PrefixPaths[i] - if _tgt != _src74 { return false } - } + if p.PrefixPath != other.PrefixPath { return false } if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } for i, _tgt := range p.MeasurementsList { - _src75 := other.MeasurementsList[i] - if len(_tgt) != len(_src75) { return false } + _src77 := other.MeasurementsList[i] + if len(_tgt) != len(_src77) { return false } for i, _tgt := range _tgt { - _src76 := _src75[i] - if _tgt != _src76 { return false } + _src78 := _src77[i] + if _tgt != _src78 { return false } } } if len(p.ValuesList) != len(other.ValuesList) { return false } for i, _tgt := range p.ValuesList { - _src77 := other.ValuesList[i] - if bytes.Compare(_tgt, _src77) != 0 { return false } + _src79 := other.ValuesList[i] + if bytes.Compare(_tgt, _src79) != 0 { return false } } if len(p.Timestamps) != len(other.Timestamps) { return false } for i, _tgt := range p.Timestamps { - _src78 := other.Timestamps[i] - if _tgt != _src78 { return false } + _src80 := other.Timestamps[i] + if _tgt != _src80 { return false } } if p.IsAligned != other.IsAligned { if p.IsAligned == nil || other.IsAligned == nil { @@ -8003,11 +8122,11 @@ func (p *TSInsertRecordsReq) Equals(other *TSInsertRecordsReq) bool { return true } -func (p *TSInsertRecordsReq) String() string { +func (p *TSInsertRecordsOfOneDeviceReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSInsertRecordsReq(%+v)", *p) + return fmt.Sprintf("TSInsertRecordsOfOneDeviceReq(%+v)", *p) } // Attributes: @@ -8017,51 +8136,51 @@ func (p *TSInsertRecordsReq) String() string { // - ValuesList // - Timestamps // - IsAligned -type TSInsertRecordsOfOneDeviceReq struct { +type TSInsertStringRecordsOfOneDeviceReq 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 [][]byte `thrift:"valuesList,4,required" db:"valuesList" json:"valuesList"` + 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 NewTSInsertRecordsOfOneDeviceReq() *TSInsertRecordsOfOneDeviceReq { - return &TSInsertRecordsOfOneDeviceReq{} +func NewTSInsertStringRecordsOfOneDeviceReq() *TSInsertStringRecordsOfOneDeviceReq { + return &TSInsertStringRecordsOfOneDeviceReq{} } -func (p *TSInsertRecordsOfOneDeviceReq) GetSessionId() int64 { +func (p *TSInsertStringRecordsOfOneDeviceReq) GetSessionId() int64 { return p.SessionId } -func (p *TSInsertRecordsOfOneDeviceReq) GetPrefixPath() string { +func (p *TSInsertStringRecordsOfOneDeviceReq) GetPrefixPath() string { return p.PrefixPath } -func (p *TSInsertRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { +func (p *TSInsertStringRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { return p.MeasurementsList } -func (p *TSInsertRecordsOfOneDeviceReq) GetValuesList() [][]byte { +func (p *TSInsertStringRecordsOfOneDeviceReq) GetValuesList() [][]string { return p.ValuesList } -func (p *TSInsertRecordsOfOneDeviceReq) GetTimestamps() []int64 { +func (p *TSInsertStringRecordsOfOneDeviceReq) GetTimestamps() []int64 { return p.Timestamps } -var TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT bool -func (p *TSInsertRecordsOfOneDeviceReq) GetIsAligned() bool { +var TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT bool +func (p *TSInsertStringRecordsOfOneDeviceReq) GetIsAligned() bool { if !p.IsSetIsAligned() { - return TSInsertRecordsOfOneDeviceReq_IsAligned_DEFAULT + return TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT } return *p.IsAligned } -func (p *TSInsertRecordsOfOneDeviceReq) IsSetIsAligned() bool { +func (p *TSInsertStringRecordsOfOneDeviceReq) IsSetIsAligned() bool { return p.IsAligned != nil } -func (p *TSInsertRecordsOfOneDeviceReq) 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) } @@ -8174,7 +8293,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 *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 { @@ -8183,7 +8302,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField1(ctx context.Context, iprot t return nil } -func (p *TSInsertRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { +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 { @@ -8192,7 +8311,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField2(ctx context.Context, iprot t return nil } -func (p *TSInsertRecordsOfOneDeviceReq) 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) @@ -8205,20 +8324,20 @@ func (p *TSInsertRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot t return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - _elem79 := tSlice + _elem81 := tSlice for i := 0; i < size; i ++ { -var _elem80 string +var _elem82 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem80 = v + _elem82 = v } - _elem79 = append(_elem79, _elem80) + _elem81 = append(_elem81, _elem82) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } - p.MeasurementsList = append(p.MeasurementsList, _elem79) + p.MeasurementsList = append(p.MeasurementsList, _elem81) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8226,21 +8345,33 @@ var _elem80 string return nil } -func (p *TSInsertRecordsOfOneDeviceReq) 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) } - tSlice := make([][]byte, 0, size) + tSlice := make([][]string, 0, size) p.ValuesList = tSlice for i := 0; i < size; i ++ { -var _elem81 []byte - if v, err := iprot.ReadBinary(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + _elem83 := tSlice + for i := 0; i < size; i ++ { +var _elem84 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - _elem81 = v + _elem84 = v } - p.ValuesList = append(p.ValuesList, _elem81) + _elem83 = append(_elem83, _elem84) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + p.ValuesList = append(p.ValuesList, _elem83) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8248,7 +8379,7 @@ var _elem81 []byte return nil } -func (p *TSInsertRecordsOfOneDeviceReq) 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) @@ -8256,13 +8387,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 _elem82 int64 +var _elem85 int64 if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem82 = v + _elem85 = v } - p.Timestamps = append(p.Timestamps, _elem82) + p.Timestamps = append(p.Timestamps, _elem85) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8270,7 +8401,7 @@ var _elem82 int64 return nil } -func (p *TSInsertRecordsOfOneDeviceReq) 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 { @@ -8279,8 +8410,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 *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 } @@ -8297,7 +8428,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 *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 { @@ -8307,7 +8438,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField1(ctx context.Context, oprot t return err } -func (p *TSInsertRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { +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 { @@ -8317,7 +8448,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField2(ctx context.Context, oprot t return err } -func (p *TSInsertRecordsOfOneDeviceReq) 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 { @@ -8343,15 +8474,23 @@ 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 *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.STRING, len(p.ValuesList)); err != nil { + 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.WriteBinary(ctx, v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + 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) @@ -8361,7 +8500,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 *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 { @@ -8379,7 +8518,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 *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) } @@ -8391,7 +8530,7 @@ func (p *TSInsertRecordsOfOneDeviceReq) writeField6(ctx context.Context, oprot t return err } -func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDeviceReq) bool { +func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecordsOfOneDeviceReq) bool { if p == other { return true } else if p == nil || other == nil { @@ -8401,22 +8540,26 @@ func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDevice if p.PrefixPath != other.PrefixPath { return false } if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } for i, _tgt := range p.MeasurementsList { - _src83 := other.MeasurementsList[i] - if len(_tgt) != len(_src83) { return false } + _src86 := other.MeasurementsList[i] + if len(_tgt) != len(_src86) { return false } for i, _tgt := range _tgt { - _src84 := _src83[i] - if _tgt != _src84 { return false } + _src87 := _src86[i] + if _tgt != _src87 { return false } } } if len(p.ValuesList) != len(other.ValuesList) { return false } for i, _tgt := range p.ValuesList { - _src85 := other.ValuesList[i] - if bytes.Compare(_tgt, _src85) != 0 { return false } + _src88 := other.ValuesList[i] + if len(_tgt) != len(_src88) { return false } + for i, _tgt := range _tgt { + _src89 := _src88[i] + if _tgt != _src89 { return false } + } } if len(p.Timestamps) != len(other.Timestamps) { return false } for i, _tgt := range p.Timestamps { - _src86 := other.Timestamps[i] - if _tgt != _src86 { return false } + _src90 := other.Timestamps[i] + if _tgt != _src90 { return false } } if p.IsAligned != other.IsAligned { if p.IsAligned == nil || other.IsAligned == nil { @@ -8427,71 +8570,71 @@ func (p *TSInsertRecordsOfOneDeviceReq) Equals(other *TSInsertRecordsOfOneDevice return true } -func (p *TSInsertRecordsOfOneDeviceReq) String() string { +func (p *TSInsertStringRecordsOfOneDeviceReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSInsertRecordsOfOneDeviceReq(%+v)", *p) + return fmt.Sprintf("TSInsertStringRecordsOfOneDeviceReq(%+v)", *p) } // Attributes: // - SessionId -// - PrefixPath +// - PrefixPaths // - MeasurementsList // - ValuesList // - Timestamps // - IsAligned -type TSInsertStringRecordsOfOneDeviceReq struct { +type TSInsertStringRecordsReq 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 [][]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 NewTSInsertStringRecordsOfOneDeviceReq() *TSInsertStringRecordsOfOneDeviceReq { - return &TSInsertStringRecordsOfOneDeviceReq{} +func NewTSInsertStringRecordsReq() *TSInsertStringRecordsReq { + return &TSInsertStringRecordsReq{} } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetSessionId() int64 { +func (p *TSInsertStringRecordsReq) GetSessionId() int64 { return p.SessionId } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetPrefixPath() string { - return p.PrefixPath +func (p *TSInsertStringRecordsReq) GetPrefixPaths() []string { + return p.PrefixPaths } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetMeasurementsList() [][]string { +func (p *TSInsertStringRecordsReq) GetMeasurementsList() [][]string { return p.MeasurementsList } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetValuesList() [][]string { +func (p *TSInsertStringRecordsReq) GetValuesList() [][]string { return p.ValuesList } -func (p *TSInsertStringRecordsOfOneDeviceReq) GetTimestamps() []int64 { +func (p *TSInsertStringRecordsReq) GetTimestamps() []int64 { return p.Timestamps } -var TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT bool -func (p *TSInsertStringRecordsOfOneDeviceReq) GetIsAligned() bool { +var TSInsertStringRecordsReq_IsAligned_DEFAULT bool +func (p *TSInsertStringRecordsReq) GetIsAligned() bool { if !p.IsSetIsAligned() { - return TSInsertStringRecordsOfOneDeviceReq_IsAligned_DEFAULT + return TSInsertStringRecordsReq_IsAligned_DEFAULT } return *p.IsAligned } -func (p *TSInsertStringRecordsOfOneDeviceReq) IsSetIsAligned() bool { +func (p *TSInsertStringRecordsReq) IsSetIsAligned() bool { return p.IsAligned != nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +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 issetPrefixPath bool = false; + var issetPrefixPaths bool = false; var issetMeasurementsList bool = false; var issetValuesList bool = false; var issetTimestamps bool = false; @@ -8515,11 +8658,11 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot th } } 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 @@ -8583,8 +8726,8 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Read(ctx context.Context, iprot th 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")); @@ -8598,7 +8741,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 *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 { @@ -8607,16 +8750,29 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField1(ctx context.Context, i return nil } -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) +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 _elem91 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) } else { - p.PrefixPath = v + _elem91 = v } + p.PrefixPaths = append(p.PrefixPaths, _elem91) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { +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) @@ -8629,20 +8785,20 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField3(ctx context.Context, i return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - _elem87 := tSlice + _elem92 := tSlice for i := 0; i < size; i ++ { -var _elem88 string +var _elem93 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem88 = v + _elem93 = v } - _elem87 = append(_elem87, _elem88) + _elem92 = append(_elem92, _elem93) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } - p.MeasurementsList = append(p.MeasurementsList, _elem87) + p.MeasurementsList = append(p.MeasurementsList, _elem92) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8650,7 +8806,7 @@ var _elem88 string return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { +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) @@ -8663,20 +8819,20 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField4(ctx context.Context, i return thrift.PrependError("error reading list begin: ", err) } tSlice := make([]string, 0, size) - _elem89 := tSlice + _elem94 := tSlice for i := 0; i < size; i ++ { -var _elem90 string +var _elem95 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem90 = v + _elem95 = v } - _elem89 = append(_elem89, _elem90) + _elem94 = append(_elem94, _elem95) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) } - p.ValuesList = append(p.ValuesList, _elem89) + p.ValuesList = append(p.ValuesList, _elem94) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8684,7 +8840,7 @@ var _elem90 string return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { +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) @@ -8692,13 +8848,13 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField5(ctx context.Context, i tSlice := make([]int64, 0, size) p.Timestamps = tSlice for i := 0; i < size; i ++ { -var _elem91 int64 +var _elem96 int64 if v, err := iprot.ReadI64(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem91 = v + _elem96 = v } - p.Timestamps = append(p.Timestamps, _elem91) + p.Timestamps = append(p.Timestamps, _elem96) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -8706,7 +8862,7 @@ var _elem91 int64 return nil } -func (p *TSInsertStringRecordsOfOneDeviceReq) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { +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 { @@ -8715,8 +8871,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 *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 } @@ -8733,7 +8889,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 *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 { @@ -8743,17 +8899,25 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField1(ctx context.Context, o return 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) } +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) + } 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 *TSInsertStringRecordsOfOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { +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 { @@ -8779,7 +8943,7 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField3(ctx context.Context, o return err } -func (p *TSInsertStringRecordsOfOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { +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 { @@ -8805,7 +8969,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 *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 { @@ -8823,7 +8987,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 *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) } @@ -8835,36 +8999,40 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) writeField6(ctx context.Context, o return err } -func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecordsOfOneDeviceReq) bool { +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 p.PrefixPath != other.PrefixPath { return false } + if len(p.PrefixPaths) != len(other.PrefixPaths) { return false } + for i, _tgt := range p.PrefixPaths { + _src97 := other.PrefixPaths[i] + if _tgt != _src97 { return false } + } if len(p.MeasurementsList) != len(other.MeasurementsList) { return false } for i, _tgt := range p.MeasurementsList { - _src92 := other.MeasurementsList[i] - if len(_tgt) != len(_src92) { return false } + _src98 := other.MeasurementsList[i] + if len(_tgt) != len(_src98) { return false } for i, _tgt := range _tgt { - _src93 := _src92[i] - if _tgt != _src93 { return false } + _src99 := _src98[i] + if _tgt != _src99 { return false } } } if len(p.ValuesList) != len(other.ValuesList) { return false } for i, _tgt := range p.ValuesList { - _src94 := other.ValuesList[i] - if len(_tgt) != len(_src94) { return false } + _src100 := other.ValuesList[i] + if len(_tgt) != len(_src100) { return false } for i, _tgt := range _tgt { - _src95 := _src94[i] - if _tgt != _src95 { return false } + _src101 := _src100[i] + if _tgt != _src101 { return false } } } if len(p.Timestamps) != len(other.Timestamps) { return false } for i, _tgt := range p.Timestamps { - _src96 := other.Timestamps[i] - if _tgt != _src96 { return false } + _src102 := other.Timestamps[i] + if _tgt != _src102 { return false } } if p.IsAligned != other.IsAligned { if p.IsAligned == nil || other.IsAligned == nil { @@ -8875,527 +9043,54 @@ func (p *TSInsertStringRecordsOfOneDeviceReq) Equals(other *TSInsertStringRecord return true } -func (p *TSInsertStringRecordsOfOneDeviceReq) String() string { +func (p *TSInsertStringRecordsReq) String() string { if p == nil { return "" } - return fmt.Sprintf("TSInsertStringRecordsOfOneDeviceReq(%+v)", *p) + return fmt.Sprintf("TSInsertStringRecordsReq(%+v)", *p) } // Attributes: // - SessionId -// - PrefixPaths -// - MeasurementsList -// - ValuesList -// - Timestamps -// - IsAligned -type TSInsertStringRecordsReq struct { +// - Paths +// - StartTime +// - EndTime +type TSDeleteDataReq 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"` - 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"` + 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 NewTSInsertStringRecordsReq() *TSInsertStringRecordsReq { - return &TSInsertStringRecordsReq{} +func NewTSDeleteDataReq() *TSDeleteDataReq { + return &TSDeleteDataReq{} } -func (p *TSInsertStringRecordsReq) GetSessionId() int64 { +func (p *TSDeleteDataReq) GetSessionId() int64 { return p.SessionId } -func (p *TSInsertStringRecordsReq) GetPrefixPaths() []string { - return p.PrefixPaths -} - -func (p *TSInsertStringRecordsReq) GetMeasurementsList() [][]string { - return p.MeasurementsList +func (p *TSDeleteDataReq) GetPaths() []string { + return p.Paths } -func (p *TSInsertStringRecordsReq) GetValuesList() [][]string { - return p.ValuesList +func (p *TSDeleteDataReq) GetStartTime() int64 { + return p.StartTime } -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 *TSDeleteDataReq) GetEndTime() int64 { + return p.EndTime } - -func (p *TSInsertStringRecordsReq) Read(ctx context.Context, iprot thrift.TProtocol) error { +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 issetPrefixPaths bool = false; - var issetMeasurementsList bool = false; - var issetValuesList bool = false; - var issetTimestamps 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 - } - issetPrefixPaths = 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 - } - issetMeasurementsList = 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 - } - 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 - } - } - 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 !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 !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 *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 { - p.SessionId = v -} - 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 _elem97 string - if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 0: ", err) -} else { - _elem97 = v -} - p.PrefixPaths = append(p.PrefixPaths, _elem97) - } - 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 { - _, 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 { - _elem99 = 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 *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) } - if err := oprot.WriteStructEnd(ctx); err != nil { - return thrift.PrependError("write struct stop error: ", err) } - return nil -} - -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 { - 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 *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) - } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:prefixPaths: ", p), err) } - return 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:measurementsList: ", p), err) } - return 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:valuesList: ", p), err) } - return err -} - -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.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 } - } - return true -} - -func (p *TSInsertStringRecordsReq) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TSInsertStringRecordsReq(%+v)", *p) -} - -// Attributes: -// - SessionId -// - Paths -// - StartTime -// - EndTime -type TSDeleteDataReq 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"` -} - -func NewTSDeleteDataReq() *TSDeleteDataReq { - return &TSDeleteDataReq{} -} - - -func (p *TSDeleteDataReq) GetSessionId() int64 { - return p.SessionId -} - -func (p *TSDeleteDataReq) GetPaths() []string { - return p.Paths -} - -func (p *TSDeleteDataReq) GetStartTime() int64 { - return p.StartTime -} - -func (p *TSDeleteDataReq) GetEndTime() int64 { - return p.EndTime -} -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 issetPaths bool = false; - var issetStartTime bool = false; - var issetEndTime bool = false; + var issetPaths bool = false; + var issetStartTime bool = false; + var issetEndTime bool = false; for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) @@ -9492,13 +9187,13 @@ func (p *TSDeleteDataReq) ReadField2(ctx context.Context, iprot thrift.TProtoco tSlice := make([]string, 0, size) p.Paths = tSlice for i := 0; i < size; i ++ { -var _elem109 string +var _elem103 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem109 = v + _elem103 = v } - p.Paths = append(p.Paths, _elem109) + p.Paths = append(p.Paths, _elem103) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -9597,8 +9292,8 @@ func (p *TSDeleteDataReq) Equals(other *TSDeleteDataReq) bool { if p.SessionId != other.SessionId { return false } if len(p.Paths) != len(other.Paths) { return false } for i, _tgt := range p.Paths { - _src110 := other.Paths[i] - if _tgt != _src110 { return false } + _src104 := other.Paths[i] + if _tgt != _src104 { return false } } if p.StartTime != other.StartTime { return false } if p.EndTime != other.EndTime { return false } @@ -9892,19 +9587,19 @@ func (p *TSCreateTimeseriesReq) ReadField6(ctx context.Context, iprot thrift.TP tMap := make(map[string]string, size) p.Props = tMap for i := 0; i < size; i ++ { -var _key111 string +var _key105 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key111 = v + _key105 = v } -var _val112 string +var _val106 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val112 = v + _val106 = v } - p.Props[_key111] = _val112 + p.Props[_key105] = _val106 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) @@ -9920,19 +9615,19 @@ func (p *TSCreateTimeseriesReq) ReadField7(ctx context.Context, iprot thrift.TP tMap := make(map[string]string, size) p.Tags = tMap for i := 0; i < size; i ++ { -var _key113 string +var _key107 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key113 = v + _key107 = v } -var _val114 string +var _val108 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val114 = v + _val108 = v } - p.Tags[_key113] = _val114 + p.Tags[_key107] = _val108 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) @@ -9948,19 +9643,19 @@ func (p *TSCreateTimeseriesReq) ReadField8(ctx context.Context, iprot thrift.TP tMap := make(map[string]string, size) p.Attributes = tMap for i := 0; i < size; i ++ { -var _key115 string +var _key109 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key115 = v + _key109 = v } -var _val116 string +var _val110 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val116 = v + _val110 = v } - p.Attributes[_key115] = _val116 + p.Attributes[_key109] = _val110 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) @@ -10139,18 +9834,18 @@ func (p *TSCreateTimeseriesReq) Equals(other *TSCreateTimeseriesReq) bool { 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 } + _src111 := other.Props[k] + if _tgt != _src111 { return false } } if len(p.Tags) != len(other.Tags) { return false } for k, _tgt := range p.Tags { - _src118 := other.Tags[k] - if _tgt != _src118 { return false } + _src112 := other.Tags[k] + if _tgt != _src112 { return false } } if len(p.Attributes) != len(other.Attributes) { return false } for k, _tgt := range p.Attributes { - _src119 := other.Attributes[k] - if _tgt != _src119 { return false } + _src113 := other.Attributes[k] + if _tgt != _src113 { return false } } if p.MeasurementAlias != other.MeasurementAlias { if p.MeasurementAlias == nil || other.MeasurementAlias == nil { @@ -10419,13 +10114,13 @@ func (p *TSCreateAlignedTimeseriesReq) ReadField3(ctx context.Context, iprot th tSlice := make([]string, 0, size) p.Measurements = tSlice for i := 0; i < size; i ++ { -var _elem120 string +var _elem114 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem120 = v + _elem114 = v } - p.Measurements = append(p.Measurements, _elem120) + p.Measurements = append(p.Measurements, _elem114) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -10441,13 +10136,13 @@ func (p *TSCreateAlignedTimeseriesReq) ReadField4(ctx context.Context, iprot th tSlice := make([]int32, 0, size) p.DataTypes = tSlice for i := 0; i < size; i ++ { -var _elem121 int32 +var _elem115 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem121 = v + _elem115 = v } - p.DataTypes = append(p.DataTypes, _elem121) + p.DataTypes = append(p.DataTypes, _elem115) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -10463,13 +10158,13 @@ func (p *TSCreateAlignedTimeseriesReq) ReadField5(ctx context.Context, iprot th tSlice := make([]int32, 0, size) p.Encodings = tSlice for i := 0; i < size; i ++ { -var _elem122 int32 +var _elem116 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem122 = v + _elem116 = v } - p.Encodings = append(p.Encodings, _elem122) + p.Encodings = append(p.Encodings, _elem116) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -10485,13 +10180,13 @@ func (p *TSCreateAlignedTimeseriesReq) ReadField6(ctx context.Context, iprot th tSlice := make([]int32, 0, size) p.Compressors = tSlice for i := 0; i < size; i ++ { -var _elem123 int32 +var _elem117 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem123 = v + _elem117 = v } - p.Compressors = append(p.Compressors, _elem123) + p.Compressors = append(p.Compressors, _elem117) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -10507,13 +10202,13 @@ func (p *TSCreateAlignedTimeseriesReq) ReadField7(ctx context.Context, iprot th tSlice := make([]string, 0, size) p.MeasurementAlias = tSlice for i := 0; i < size; i ++ { -var _elem124 string +var _elem118 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem124 = v + _elem118 = v } - p.MeasurementAlias = append(p.MeasurementAlias, _elem124) + p.MeasurementAlias = append(p.MeasurementAlias, _elem118) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -10534,26 +10229,26 @@ func (p *TSCreateAlignedTimeseriesReq) ReadField8(ctx context.Context, iprot th return thrift.PrependError("error reading map begin: ", err) } tMap := make(map[string]string, size) - _elem125 := tMap + _elem119 := tMap for i := 0; i < size; i ++ { -var _key126 string +var _key120 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key126 = v + _key120 = v } -var _val127 string +var _val121 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val127 = v + _val121 = v } - _elem125[_key126] = _val127 + _elem119[_key120] = _val121 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) } - p.TagsList = append(p.TagsList, _elem125) + p.TagsList = append(p.TagsList, _elem119) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -10574,26 +10269,26 @@ func (p *TSCreateAlignedTimeseriesReq) ReadField9(ctx context.Context, iprot th return thrift.PrependError("error reading map begin: ", err) } tMap := make(map[string]string, size) - _elem128 := tMap + _elem122 := tMap for i := 0; i < size; i ++ { -var _key129 string +var _key123 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key129 = v + _key123 = v } -var _val130 string +var _val124 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val130 = v + _val124 = v } - _elem128[_key129] = _val130 + _elem122[_key123] = _val124 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) } - p.AttributesList = append(p.AttributesList, _elem128) + p.AttributesList = append(p.AttributesList, _elem122) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -10804,45 +10499,45 @@ func (p *TSCreateAlignedTimeseriesReq) Equals(other *TSCreateAlignedTimeseriesRe 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 } + _src125 := other.Measurements[i] + if _tgt != _src125 { 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 } + _src126 := other.DataTypes[i] + if _tgt != _src126 { 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 } + _src127 := other.Encodings[i] + if _tgt != _src127 { 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 } + _src128 := other.Compressors[i] + if _tgt != _src128 { 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 } + _src129 := other.MeasurementAlias[i] + if _tgt != _src129 { 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 } + _src130 := other.TagsList[i] + if len(_tgt) != len(_src130) { return false } for k, _tgt := range _tgt { - _src137 := _src136[k] - if _tgt != _src137 { return false } + _src131 := _src130[k] + if _tgt != _src131 { 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 } + _src132 := other.AttributesList[i] + if len(_tgt) != len(_src132) { return false } for k, _tgt := range _tgt { - _src139 := _src138[k] - if _tgt != _src139 { return false } + _src133 := _src132[k] + if _tgt != _src133 { return false } } } return true @@ -11128,13 +10823,13 @@ func (p *TSRawDataQueryReq) ReadField2(ctx context.Context, iprot thrift.TProto tSlice := make([]string, 0, size) p.Paths = tSlice for i := 0; i < size; i ++ { -var _elem140 string +var _elem134 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem140 = v + _elem134 = v } - p.Paths = append(p.Paths, _elem140) + p.Paths = append(p.Paths, _elem134) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -11363,8 +11058,8 @@ func (p *TSRawDataQueryReq) Equals(other *TSRawDataQueryReq) bool { if p.SessionId != other.SessionId { return false } if len(p.Paths) != len(other.Paths) { return false } for i, _tgt := range p.Paths { - _src141 := other.Paths[i] - if _tgt != _src141 { return false } + _src135 := other.Paths[i] + if _tgt != _src135 { return false } } if p.FetchSize != other.FetchSize { if p.FetchSize == nil || other.FetchSize == nil { @@ -11661,13 +11356,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 _elem142 string +var _elem136 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem142 = v + _elem136 = v } - p.Paths = append(p.Paths, _elem142) + p.Paths = append(p.Paths, _elem136) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -11876,8 +11571,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 { - _src143 := other.Paths[i] - if _tgt != _src143 { return false } + _src137 := other.Paths[i] + if _tgt != _src137 { return false } } if p.FetchSize != other.FetchSize { if p.FetchSize == nil || other.FetchSize == nil { @@ -11921,6 +11616,560 @@ func (p *TSLastDataQueryReq) String() string { return fmt.Sprintf("TSLastDataQueryReq(%+v)", *p) } +// Attributes: +// - SessionId +// - Db +// - DeviceId +// - Sensors +// - FetchSize +// - StatementId +// - EnableRedirectQuery +// - JdbcQuery +// - Timeout +// - LegalPathNodes +type TSFastLastDataQueryForOneDeviceReq struct { + SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` + Db string `thrift:"db,2,required" db:"db" json:"db"` + DeviceId string `thrift:"deviceId,3,required" db:"deviceId" json:"deviceId"` + Sensors []string `thrift:"sensors,4,required" db:"sensors" json:"sensors"` + FetchSize *int32 `thrift:"fetchSize,5" db:"fetchSize" json:"fetchSize,omitempty"` + 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 NewTSFastLastDataQueryForOneDeviceReq() *TSFastLastDataQueryForOneDeviceReq { + return &TSFastLastDataQueryForOneDeviceReq{} +} + + +func (p *TSFastLastDataQueryForOneDeviceReq) GetSessionId() int64 { + return p.SessionId +} + +func (p *TSFastLastDataQueryForOneDeviceReq) GetDb() string { + return p.Db +} + +func (p *TSFastLastDataQueryForOneDeviceReq) GetDeviceId() string { + return p.DeviceId +} + +func (p *TSFastLastDataQueryForOneDeviceReq) GetSensors() []string { + return p.Sensors +} +var TSFastLastDataQueryForOneDeviceReq_FetchSize_DEFAULT int32 +func (p *TSFastLastDataQueryForOneDeviceReq) GetFetchSize() int32 { + if !p.IsSetFetchSize() { + return TSFastLastDataQueryForOneDeviceReq_FetchSize_DEFAULT + } +return *p.FetchSize +} + +func (p *TSFastLastDataQueryForOneDeviceReq) GetStatementId() int64 { + return p.StatementId +} +var TSFastLastDataQueryForOneDeviceReq_EnableRedirectQuery_DEFAULT bool +func (p *TSFastLastDataQueryForOneDeviceReq) GetEnableRedirectQuery() bool { + if !p.IsSetEnableRedirectQuery() { + return TSFastLastDataQueryForOneDeviceReq_EnableRedirectQuery_DEFAULT + } +return *p.EnableRedirectQuery +} +var TSFastLastDataQueryForOneDeviceReq_JdbcQuery_DEFAULT bool +func (p *TSFastLastDataQueryForOneDeviceReq) GetJdbcQuery() bool { + if !p.IsSetJdbcQuery() { + return TSFastLastDataQueryForOneDeviceReq_JdbcQuery_DEFAULT + } +return *p.JdbcQuery +} +var TSFastLastDataQueryForOneDeviceReq_Timeout_DEFAULT int64 +func (p *TSFastLastDataQueryForOneDeviceReq) GetTimeout() int64 { + if !p.IsSetTimeout() { + return TSFastLastDataQueryForOneDeviceReq_Timeout_DEFAULT + } +return *p.Timeout +} +var TSFastLastDataQueryForOneDeviceReq_LegalPathNodes_DEFAULT bool +func (p *TSFastLastDataQueryForOneDeviceReq) GetLegalPathNodes() bool { + if !p.IsSetLegalPathNodes() { + return TSFastLastDataQueryForOneDeviceReq_LegalPathNodes_DEFAULT + } +return *p.LegalPathNodes +} +func (p *TSFastLastDataQueryForOneDeviceReq) IsSetFetchSize() bool { + return p.FetchSize != nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) IsSetEnableRedirectQuery() bool { + return p.EnableRedirectQuery != nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) IsSetJdbcQuery() bool { + return p.JdbcQuery != nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) IsSetTimeout() bool { + return p.Timeout != nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) IsSetLegalPathNodes() bool { + return p.LegalPathNodes != nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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 issetDb bool = false; + var issetDeviceId bool = false; + var issetSensors bool = false; + var issetStatementId 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 + } + issetDb = 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 + } + issetDeviceId = 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 + } + issetSensors = 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 + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + 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 + } + } + 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 + } + } + 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 + } + } + 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 !issetDb{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Db is not set")); + } + if !issetDeviceId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DeviceId is not set")); + } + if !issetSensors{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Sensors is not set")); + } + if !issetStatementId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")); + } + return nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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 *TSFastLastDataQueryForOneDeviceReq) 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.Db = v +} + return nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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.DeviceId = v +} + return nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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.Sensors = tSlice + for i := 0; i < size; i ++ { +var _elem138 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem138 = v +} + p.Sensors = append(p.Sensors, _elem138) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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.FetchSize = &v +} + return nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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.StatementId = v +} + return nil +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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 *TSFastLastDataQueryForOneDeviceReq) 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 *TSFastLastDataQueryForOneDeviceReq) 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 *TSFastLastDataQueryForOneDeviceReq) 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 *TSFastLastDataQueryForOneDeviceReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSFastLastDataQueryForOneDeviceReq"); 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 := 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 *TSFastLastDataQueryForOneDeviceReq) 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 *TSFastLastDataQueryForOneDeviceReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "db", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:db: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Db)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.db (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:db: ", p), err) } + return err +} + +func (p *TSFastLastDataQueryForOneDeviceReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "deviceId", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:deviceId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.DeviceId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.deviceId (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:deviceId: ", p), err) } + return err +} + +func (p *TSFastLastDataQueryForOneDeviceReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "sensors", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:sensors: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Sensors)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Sensors { + 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:sensors: ", p), err) } + return err +} + +func (p *TSFastLastDataQueryForOneDeviceReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFetchSize() { + if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:fetchSize: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.fetchSize (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:fetchSize: ", p), err) } + } + return err +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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) } + return err +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:enableRedirectQuery: ", p), err) } + } + return err +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:jdbcQuery: ", p), err) } + } + return err +} + +func (p *TSFastLastDataQueryForOneDeviceReq) 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 *TSFastLastDataQueryForOneDeviceReq) 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 *TSFastLastDataQueryForOneDeviceReq) Equals(other *TSFastLastDataQueryForOneDeviceReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.SessionId != other.SessionId { return false } + if p.Db != other.Db { return false } + if p.DeviceId != other.DeviceId { return false } + if len(p.Sensors) != len(other.Sensors) { return false } + for i, _tgt := range p.Sensors { + _src139 := other.Sensors[i] + if _tgt != _src139 { return false } + } + if p.FetchSize != other.FetchSize { + if p.FetchSize == nil || other.FetchSize == nil { + return false + } + if (*p.FetchSize) != (*other.FetchSize) { 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 p.JdbcQuery != other.JdbcQuery { + if p.JdbcQuery == nil || other.JdbcQuery == nil { + return false + } + 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 *TSFastLastDataQueryForOneDeviceReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSFastLastDataQueryForOneDeviceReq(%+v)", *p) +} + // Attributes: // - SessionId // - StatementId @@ -12228,13 +12477,13 @@ func (p *TSAggregationQueryReq) ReadField3(ctx context.Context, iprot thrift.TP tSlice := make([]string, 0, size) p.Paths = tSlice for i := 0; i < size; i ++ { -var _elem144 string +var _elem140 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem144 = v + _elem140 = v } - p.Paths = append(p.Paths, _elem144) + p.Paths = append(p.Paths, _elem140) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -12250,14 +12499,14 @@ func (p *TSAggregationQueryReq) ReadField4(ctx context.Context, iprot thrift.TP tSlice := make([]common.TAggregationType, 0, size) p.Aggregations = tSlice for i := 0; i < size; i ++ { -var _elem145 common.TAggregationType +var _elem141 common.TAggregationType if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { temp := common.TAggregationType(v) - _elem145 = temp + _elem141 = temp } - p.Aggregations = append(p.Aggregations, _elem145) + p.Aggregations = append(p.Aggregations, _elem141) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -12501,13 +12750,13 @@ func (p *TSAggregationQueryReq) Equals(other *TSAggregationQueryReq) bool { 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 } + _src142 := other.Paths[i] + if _tgt != _src142 { return false } } if len(p.Aggregations) != len(other.Aggregations) { return false } for i, _tgt := range p.Aggregations { - _src147 := other.Aggregations[i] - if _tgt != _src147 { return false } + _src143 := other.Aggregations[i] + if _tgt != _src143 { return false } } if p.StartTime != other.StartTime { if p.StartTime == nil || other.StartTime == nil { @@ -12561,6 +12810,629 @@ func (p *TSAggregationQueryReq) String() string { return fmt.Sprintf("TSAggregationQueryReq(%+v)", *p) } +// Attributes: +// - SessionId +// - StatementId +// - Device +// - Measurement +// - DataType +// - AggregationType +// - Database +// - StartTime +// - EndTime +// - Interval +// - FetchSize +// - Timeout +type TSGroupByQueryIntervalReq struct { + SessionId int64 `thrift:"sessionId,1,required" db:"sessionId" json:"sessionId"` + StatementId int64 `thrift:"statementId,2,required" db:"statementId" json:"statementId"` + Device string `thrift:"device,3,required" db:"device" json:"device"` + Measurement string `thrift:"measurement,4,required" db:"measurement" json:"measurement"` + DataType int32 `thrift:"dataType,5,required" db:"dataType" json:"dataType"` + AggregationType common.TAggregationType `thrift:"aggregationType,6,required" db:"aggregationType" json:"aggregationType"` + Database *string `thrift:"database,7" db:"database" json:"database,omitempty"` + StartTime *int64 `thrift:"startTime,8" db:"startTime" json:"startTime,omitempty"` + EndTime *int64 `thrift:"endTime,9" db:"endTime" json:"endTime,omitempty"` + Interval *int64 `thrift:"interval,10" db:"interval" json:"interval,omitempty"` + FetchSize *int32 `thrift:"fetchSize,11" db:"fetchSize" json:"fetchSize,omitempty"` + Timeout *int64 `thrift:"timeout,12" db:"timeout" json:"timeout,omitempty"` +} + +func NewTSGroupByQueryIntervalReq() *TSGroupByQueryIntervalReq { + return &TSGroupByQueryIntervalReq{} +} + + +func (p *TSGroupByQueryIntervalReq) GetSessionId() int64 { + return p.SessionId +} + +func (p *TSGroupByQueryIntervalReq) GetStatementId() int64 { + return p.StatementId +} + +func (p *TSGroupByQueryIntervalReq) GetDevice() string { + return p.Device +} + +func (p *TSGroupByQueryIntervalReq) GetMeasurement() string { + return p.Measurement +} + +func (p *TSGroupByQueryIntervalReq) GetDataType() int32 { + return p.DataType +} + +func (p *TSGroupByQueryIntervalReq) GetAggregationType() common.TAggregationType { + return p.AggregationType +} +var TSGroupByQueryIntervalReq_Database_DEFAULT string +func (p *TSGroupByQueryIntervalReq) GetDatabase() string { + if !p.IsSetDatabase() { + return TSGroupByQueryIntervalReq_Database_DEFAULT + } +return *p.Database +} +var TSGroupByQueryIntervalReq_StartTime_DEFAULT int64 +func (p *TSGroupByQueryIntervalReq) GetStartTime() int64 { + if !p.IsSetStartTime() { + return TSGroupByQueryIntervalReq_StartTime_DEFAULT + } +return *p.StartTime +} +var TSGroupByQueryIntervalReq_EndTime_DEFAULT int64 +func (p *TSGroupByQueryIntervalReq) GetEndTime() int64 { + if !p.IsSetEndTime() { + return TSGroupByQueryIntervalReq_EndTime_DEFAULT + } +return *p.EndTime +} +var TSGroupByQueryIntervalReq_Interval_DEFAULT int64 +func (p *TSGroupByQueryIntervalReq) GetInterval() int64 { + if !p.IsSetInterval() { + return TSGroupByQueryIntervalReq_Interval_DEFAULT + } +return *p.Interval +} +var TSGroupByQueryIntervalReq_FetchSize_DEFAULT int32 +func (p *TSGroupByQueryIntervalReq) GetFetchSize() int32 { + if !p.IsSetFetchSize() { + return TSGroupByQueryIntervalReq_FetchSize_DEFAULT + } +return *p.FetchSize +} +var TSGroupByQueryIntervalReq_Timeout_DEFAULT int64 +func (p *TSGroupByQueryIntervalReq) GetTimeout() int64 { + if !p.IsSetTimeout() { + return TSGroupByQueryIntervalReq_Timeout_DEFAULT + } +return *p.Timeout +} +func (p *TSGroupByQueryIntervalReq) IsSetDatabase() bool { + return p.Database != nil +} + +func (p *TSGroupByQueryIntervalReq) IsSetStartTime() bool { + return p.StartTime != nil +} + +func (p *TSGroupByQueryIntervalReq) IsSetEndTime() bool { + return p.EndTime != nil +} + +func (p *TSGroupByQueryIntervalReq) IsSetInterval() bool { + return p.Interval != nil +} + +func (p *TSGroupByQueryIntervalReq) IsSetFetchSize() bool { + return p.FetchSize != nil +} + +func (p *TSGroupByQueryIntervalReq) IsSetTimeout() bool { + return p.Timeout != nil +} + +func (p *TSGroupByQueryIntervalReq) 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 issetStatementId bool = false; + var issetDevice bool = false; + var issetMeasurement bool = false; + var issetDataType bool = false; + var issetAggregationType 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.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetStatementId = 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 + } + issetDevice = 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 + } + issetMeasurement = 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 + } + issetDataType = true + } 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 + } + issetAggregationType = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRING { + 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.I64 { + 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.I64 { + 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 + } + } + case 12: + if fieldTypeId == thrift.I64 { + 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 + } + } + 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 !issetStatementId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StatementId is not set")); + } + if !issetDevice{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Device is not set")); + } + if !issetMeasurement{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Measurement is not set")); + } + if !issetDataType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field DataType is not set")); + } + if !issetAggregationType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field AggregationType is not set")); + } + return nil +} + +func (p *TSGroupByQueryIntervalReq) 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 *TSGroupByQueryIntervalReq) 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 *TSGroupByQueryIntervalReq) 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.Device = v +} + return nil +} + +func (p *TSGroupByQueryIntervalReq) 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 *TSGroupByQueryIntervalReq) 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.DataType = v +} + return nil +} + +func (p *TSGroupByQueryIntervalReq) 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 { + temp := common.TAggregationType(v) + p.AggregationType = temp +} + return nil +} + +func (p *TSGroupByQueryIntervalReq) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.Database = &v +} + return nil +} + +func (p *TSGroupByQueryIntervalReq) 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.StartTime = &v +} + return nil +} + +func (p *TSGroupByQueryIntervalReq) 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.EndTime = &v +} + return nil +} + +func (p *TSGroupByQueryIntervalReq) 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.Interval = &v +} + return nil +} + +func (p *TSGroupByQueryIntervalReq) 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.FetchSize = &v +} + return nil +} + +func (p *TSGroupByQueryIntervalReq) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 12: ", err) +} else { + p.Timeout = &v +} + return nil +} + +func (p *TSGroupByQueryIntervalReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TSGroupByQueryIntervalReq"); 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) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TSGroupByQueryIntervalReq) 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 *TSGroupByQueryIntervalReq) 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 *TSGroupByQueryIntervalReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "device", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:device: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Device)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.device (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:device: ", p), err) } + return err +} + +func (p *TSGroupByQueryIntervalReq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + 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 *TSGroupByQueryIntervalReq) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "dataType", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:dataType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.DataType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.dataType (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:dataType: ", p), err) } + return err +} + +func (p *TSGroupByQueryIntervalReq) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "aggregationType", thrift.I32, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:aggregationType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.AggregationType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.aggregationType (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:aggregationType: ", p), err) } + return err +} + +func (p *TSGroupByQueryIntervalReq) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDatabase() { + if err := oprot.WriteFieldBegin(ctx, "database", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:database: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Database)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.database (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:database: ", p), err) } + } + return err +} + +func (p *TSGroupByQueryIntervalReq) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStartTime() { + if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:startTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.StartTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startTime (8) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:startTime: ", p), err) } + } + return err +} + +func (p *TSGroupByQueryIntervalReq) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetEndTime() { + if err := oprot.WriteFieldBegin(ctx, "endTime", thrift.I64, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:endTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.EndTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.endTime (9) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:endTime: ", p), err) } + } + return err +} + +func (p *TSGroupByQueryIntervalReq) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetInterval() { + if err := oprot.WriteFieldBegin(ctx, "interval", thrift.I64, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:interval: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Interval)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.interval (10) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:interval: ", p), err) } + } + return err +} + +func (p *TSGroupByQueryIntervalReq) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFetchSize() { + if err := oprot.WriteFieldBegin(ctx, "fetchSize", thrift.I32, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:fetchSize: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.FetchSize)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.fetchSize (11) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:fetchSize: ", p), err) } + } + return err +} + +func (p *TSGroupByQueryIntervalReq) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimeout() { + if err := oprot.WriteFieldBegin(ctx, "timeout", thrift.I64, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:timeout: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timeout)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timeout (12) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:timeout: ", p), err) } + } + return err +} + +func (p *TSGroupByQueryIntervalReq) Equals(other *TSGroupByQueryIntervalReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.SessionId != other.SessionId { return false } + if p.StatementId != other.StatementId { return false } + if p.Device != other.Device { return false } + if p.Measurement != other.Measurement { return false } + if p.DataType != other.DataType { return false } + if p.AggregationType != other.AggregationType { return false } + if p.Database != other.Database { + if p.Database == nil || other.Database == nil { + return false + } + if (*p.Database) != (*other.Database) { return false } + } + if p.StartTime != other.StartTime { + if p.StartTime == nil || other.StartTime == nil { + return false + } + if (*p.StartTime) != (*other.StartTime) { return false } + } + if p.EndTime != other.EndTime { + if p.EndTime == nil || other.EndTime == nil { + return false + } + if (*p.EndTime) != (*other.EndTime) { return false } + } + if p.Interval != other.Interval { + if p.Interval == nil || other.Interval == nil { + return false + } + if (*p.Interval) != (*other.Interval) { return false } + } + if p.FetchSize != other.FetchSize { + if p.FetchSize == nil || other.FetchSize == nil { + return false + } + if (*p.FetchSize) != (*other.FetchSize) { 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 +} + +func (p *TSGroupByQueryIntervalReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TSGroupByQueryIntervalReq(%+v)", *p) +} + // Attributes: // - SessionId // - Paths @@ -12803,13 +13675,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 _elem148 string +var _elem144 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem148 = v + _elem144 = v } - p.Paths = append(p.Paths, _elem148) + p.Paths = append(p.Paths, _elem144) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -12825,13 +13697,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField3(ctx context.Context, iprot thri tSlice := make([]int32, 0, size) p.DataTypes = tSlice for i := 0; i < size; i ++ { -var _elem149 int32 +var _elem145 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem149 = v + _elem145 = v } - p.DataTypes = append(p.DataTypes, _elem149) + p.DataTypes = append(p.DataTypes, _elem145) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -12847,13 +13719,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField4(ctx context.Context, iprot thri tSlice := make([]int32, 0, size) p.Encodings = tSlice for i := 0; i < size; i ++ { -var _elem150 int32 +var _elem146 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem150 = v + _elem146 = v } - p.Encodings = append(p.Encodings, _elem150) + p.Encodings = append(p.Encodings, _elem146) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -12869,13 +13741,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField5(ctx context.Context, iprot thri tSlice := make([]int32, 0, size) p.Compressors = tSlice for i := 0; i < size; i ++ { -var _elem151 int32 +var _elem147 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem151 = v + _elem147 = v } - p.Compressors = append(p.Compressors, _elem151) + p.Compressors = append(p.Compressors, _elem147) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -12896,26 +13768,26 @@ func (p *TSCreateMultiTimeseriesReq) ReadField6(ctx context.Context, iprot thri return thrift.PrependError("error reading map begin: ", err) } tMap := make(map[string]string, size) - _elem152 := tMap + _elem148 := tMap for i := 0; i < size; i ++ { -var _key153 string +var _key149 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key153 = v + _key149 = v } -var _val154 string +var _val150 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val154 = v + _val150 = v } - _elem152[_key153] = _val154 + _elem148[_key149] = _val150 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) } - p.PropsList = append(p.PropsList, _elem152) + p.PropsList = append(p.PropsList, _elem148) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -12936,26 +13808,26 @@ func (p *TSCreateMultiTimeseriesReq) ReadField7(ctx context.Context, iprot thri return thrift.PrependError("error reading map begin: ", err) } tMap := make(map[string]string, size) - _elem155 := tMap + _elem151 := tMap for i := 0; i < size; i ++ { -var _key156 string +var _key152 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key156 = v + _key152 = v } -var _val157 string +var _val153 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val157 = v + _val153 = v } - _elem155[_key156] = _val157 + _elem151[_key152] = _val153 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) } - p.TagsList = append(p.TagsList, _elem155) + p.TagsList = append(p.TagsList, _elem151) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -12976,26 +13848,26 @@ func (p *TSCreateMultiTimeseriesReq) ReadField8(ctx context.Context, iprot thri return thrift.PrependError("error reading map begin: ", err) } tMap := make(map[string]string, size) - _elem158 := tMap + _elem154 := tMap for i := 0; i < size; i ++ { -var _key159 string +var _key155 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _key159 = v + _key155 = v } -var _val160 string +var _val156 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _val160 = v + _val156 = v } - _elem158[_key159] = _val160 + _elem154[_key155] = _val156 } if err := iprot.ReadMapEnd(ctx); err != nil { return thrift.PrependError("error reading map end: ", err) } - p.AttributesList = append(p.AttributesList, _elem158) + p.AttributesList = append(p.AttributesList, _elem154) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -13011,13 +13883,13 @@ func (p *TSCreateMultiTimeseriesReq) ReadField9(ctx context.Context, iprot thri tSlice := make([]string, 0, size) p.MeasurementAliasList = tSlice for i := 0; i < size; i ++ { -var _elem161 string +var _elem157 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem161 = v + _elem157 = v } - p.MeasurementAliasList = append(p.MeasurementAliasList, _elem161) + p.MeasurementAliasList = append(p.MeasurementAliasList, _elem157) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -13247,55 +14119,55 @@ 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 { - _src162 := other.Paths[i] - if _tgt != _src162 { return false } + _src158 := other.Paths[i] + if _tgt != _src158 { 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 } + _src159 := other.DataTypes[i] + if _tgt != _src159 { 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 } + _src160 := other.Encodings[i] + if _tgt != _src160 { 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 } + _src161 := other.Compressors[i] + if _tgt != _src161 { 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 } + _src162 := other.PropsList[i] + if len(_tgt) != len(_src162) { return false } for k, _tgt := range _tgt { - _src167 := _src166[k] - if _tgt != _src167 { return false } + _src163 := _src162[k] + if _tgt != _src163 { 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 } + _src164 := other.TagsList[i] + if len(_tgt) != len(_src164) { return false } for k, _tgt := range _tgt { - _src169 := _src168[k] - if _tgt != _src169 { return false } + _src165 := _src164[k] + if _tgt != _src165 { 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 } + _src166 := other.AttributesList[i] + if len(_tgt) != len(_src166) { return false } for k, _tgt := range _tgt { - _src171 := _src170[k] - if _tgt != _src171 { return false } + _src167 := _src166[k] + if _tgt != _src167 { 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 } + _src168 := other.MeasurementAliasList[i] + if _tgt != _src168 { return false } } return true } @@ -13312,10 +14184,6 @@ func (p *TSCreateMultiTimeseriesReq) String() string { // - SupportedTimeAggregationOperations // - TimestampPrecision // - MaxConcurrentClientNum -// - WatermarkSecretKey -// - WatermarkBitString -// - WatermarkParamMarkRate -// - WatermarkParamMaxRightBit // - ThriftMaxFrameSize // - IsReadOnly // - BuildInfo @@ -13325,14 +14193,10 @@ type ServerProperties struct { 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"` + ThriftMaxFrameSize *int32 `thrift:"thriftMaxFrameSize,5" db:"thriftMaxFrameSize" json:"thriftMaxFrameSize,omitempty"` + IsReadOnly *bool `thrift:"isReadOnly,6" db:"isReadOnly" json:"isReadOnly,omitempty"` + BuildInfo *string `thrift:"buildInfo,7" db:"buildInfo" json:"buildInfo,omitempty"` + Logo *string `thrift:"logo,8" db:"logo" json:"logo,omitempty"` } func NewServerProperties() *ServerProperties { @@ -13355,34 +14219,6 @@ func (p *ServerProperties) GetTimestampPrecision() string { 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() { @@ -13411,22 +14247,6 @@ func (p *ServerProperties) GetLogo() string { } 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 } @@ -13503,7 +14323,7 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err } } case 5: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.I32 { if err := p.ReadField5(ctx, iprot); err != nil { return err } @@ -13513,7 +14333,7 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err } } case 6: - if fieldTypeId == thrift.STRING { + if fieldTypeId == thrift.BOOL { if err := p.ReadField6(ctx, iprot); err != nil { return err } @@ -13523,7 +14343,7 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) err } } case 7: - if fieldTypeId == thrift.I32 { + if fieldTypeId == thrift.STRING { if err := p.ReadField7(ctx, iprot); err != nil { return err } @@ -13533,48 +14353,8 @@ func (p *ServerProperties) Read(ctx context.Context, iprot thrift.TProtocol) 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 { + if err := p.ReadField8(ctx, iprot); err != nil { return err } } else { @@ -13623,13 +14403,13 @@ func (p *ServerProperties) ReadField2(ctx context.Context, iprot thrift.TProtoc tSlice := make([]string, 0, size) p.SupportedTimeAggregationOperations = tSlice for i := 0; i < size; i ++ { -var _elem173 string +var _elem169 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem173 = v + _elem169 = v } - p.SupportedTimeAggregationOperations = append(p.SupportedTimeAggregationOperations, _elem173) + p.SupportedTimeAggregationOperations = append(p.SupportedTimeAggregationOperations, _elem169) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -13656,71 +14436,35 @@ func (p *ServerProperties) ReadField4(ctx context.Context, iprot thrift.TProtoc } 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 { - p.WatermarkSecretKey = &v -} - return 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) + return thrift.PrependError("error reading field 5: ", err) } else { p.ThriftMaxFrameSize = &v } return nil } -func (p *ServerProperties) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ServerProperties) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadBool(ctx); err != nil { - return thrift.PrependError("error reading field 10: ", err) + return thrift.PrependError("error reading field 6: ", err) } else { p.IsReadOnly = &v } return nil } -func (p *ServerProperties) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ServerProperties) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 11: ", err) + return thrift.PrependError("error reading field 7: ", err) } else { p.BuildInfo = &v } return nil } -func (p *ServerProperties) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { +func (p *ServerProperties) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { if v, err := iprot.ReadString(ctx); err != nil { - return thrift.PrependError("error reading field 12: ", err) + return thrift.PrependError("error reading field 8: ", err) } else { p.Logo = &v } @@ -13739,10 +14483,6 @@ func (p *ServerProperties) Write(ctx context.Context, oprot thrift.TProtocol) er 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) } @@ -13800,97 +14540,49 @@ func (p *ServerProperties) writeField4(ctx context.Context, oprot thrift.TProtoc } 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) } - } - 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) } - if err := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:watermarkBitString: ", 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) } - 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.WriteFieldBegin(ctx, "thriftMaxFrameSize", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5: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) } + return thrift.PrependError(fmt.Sprintf("%T.thriftMaxFrameSize (5) 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 5:thriftMaxFrameSize: ", p), err) } } return err } -func (p *ServerProperties) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ServerProperties) writeField6(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.WriteFieldBegin(ctx, "isReadOnly", thrift.BOOL, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6: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) } + return thrift.PrependError(fmt.Sprintf("%T.isReadOnly (6) 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 6:isReadOnly: ", p), err) } } return err } -func (p *ServerProperties) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ServerProperties) writeField7(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.WriteFieldBegin(ctx, "buildInfo", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7: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) } + return thrift.PrependError(fmt.Sprintf("%T.buildInfo (7) 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 thrift.PrependError(fmt.Sprintf("%T write field end error 7:buildInfo: ", p), err) } } return err } -func (p *ServerProperties) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *ServerProperties) writeField8(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.WriteFieldBegin(ctx, "logo", thrift.STRING, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8: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) } + return thrift.PrependError(fmt.Sprintf("%T.logo (8) 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 thrift.PrependError(fmt.Sprintf("%T write field end error 8:logo: ", p), err) } } return err } @@ -13904,35 +14596,11 @@ func (p *ServerProperties) Equals(other *ServerProperties) bool { 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 } + _src170 := other.SupportedTimeAggregationOperations[i] + if _tgt != _src170 { 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 @@ -14565,13 +15233,13 @@ func (p *TSAppendSchemaTemplateReq) ReadField4(ctx context.Context, iprot thrif tSlice := make([]string, 0, size) p.Measurements = tSlice for i := 0; i < size; i ++ { -var _elem175 string +var _elem171 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem175 = v + _elem171 = v } - p.Measurements = append(p.Measurements, _elem175) + p.Measurements = append(p.Measurements, _elem171) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -14587,13 +15255,13 @@ func (p *TSAppendSchemaTemplateReq) ReadField5(ctx context.Context, iprot thrif tSlice := make([]int32, 0, size) p.DataTypes = tSlice for i := 0; i < size; i ++ { -var _elem176 int32 +var _elem172 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem176 = v + _elem172 = v } - p.DataTypes = append(p.DataTypes, _elem176) + p.DataTypes = append(p.DataTypes, _elem172) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -14609,13 +15277,13 @@ func (p *TSAppendSchemaTemplateReq) ReadField6(ctx context.Context, iprot thrif tSlice := make([]int32, 0, size) p.Encodings = tSlice for i := 0; i < size; i ++ { -var _elem177 int32 +var _elem173 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem177 = v + _elem173 = v } - p.Encodings = append(p.Encodings, _elem177) + p.Encodings = append(p.Encodings, _elem173) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -14631,13 +15299,13 @@ func (p *TSAppendSchemaTemplateReq) ReadField7(ctx context.Context, iprot thrif tSlice := make([]int32, 0, size) p.Compressors = tSlice for i := 0; i < size; i ++ { -var _elem178 int32 +var _elem174 int32 if v, err := iprot.ReadI32(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem178 = v + _elem174 = v } - p.Compressors = append(p.Compressors, _elem178) + p.Compressors = append(p.Compressors, _elem174) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -14777,23 +15445,23 @@ func (p *TSAppendSchemaTemplateReq) Equals(other *TSAppendSchemaTemplateReq) boo if p.IsAligned != other.IsAligned { return false } if len(p.Measurements) != len(other.Measurements) { return false } for i, _tgt := range p.Measurements { - _src179 := other.Measurements[i] - if _tgt != _src179 { return false } + _src175 := other.Measurements[i] + if _tgt != _src175 { 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 } + _src176 := other.DataTypes[i] + if _tgt != _src176 { 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 } + _src177 := other.Encodings[i] + if _tgt != _src177 { 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 } + _src178 := other.Compressors[i] + if _tgt != _src178 { return false } } return true } @@ -15431,13 +16099,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 _elem183 string +var _elem179 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem183 = v + _elem179 = v } - p.Measurements = append(p.Measurements, _elem183) + p.Measurements = append(p.Measurements, _elem179) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -15549,8 +16217,8 @@ func (p *TSQueryTemplateResp) Equals(other *TSQueryTemplateResp) bool { } if len(p.Measurements) != len(other.Measurements) { return false } for i, _tgt := range p.Measurements { - _src184 := other.Measurements[i] - if _tgt != _src184 { return false } + _src180 := other.Measurements[i] + if _tgt != _src180 { return false } } return true } @@ -15995,13 +16663,13 @@ func (p *TCreateTimeseriesUsingSchemaTemplateReq) ReadField2(ctx context.Contex tSlice := make([]string, 0, size) p.DevicePathList = tSlice for i := 0; i < size; i ++ { -var _elem185 string +var _elem181 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem185 = v + _elem181 = v } - p.DevicePathList = append(p.DevicePathList, _elem185) + p.DevicePathList = append(p.DevicePathList, _elem181) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -16060,8 +16728,8 @@ func (p *TCreateTimeseriesUsingSchemaTemplateReq) Equals(other *TCreateTimeserie 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 } + _src182 := other.DevicePathList[i] + if _tgt != _src182 { return false } } return true } @@ -16454,66 +17122,874 @@ func (p *TSyncTransportMetaInfo) String() string { } // 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"` +// - Version +// - Type +// - Body +type TPipeTransferReq struct { + Version int8 `thrift:"version,1,required" db:"version" json:"version"` + Type int16 `thrift:"type,2,required" db:"type" json:"type"` + Body []byte `thrift:"body,3,required" db:"body" json:"body"` } -func NewTSBackupConfigurationResp() *TSBackupConfigurationResp { - return &TSBackupConfigurationResp{} +func NewTPipeTransferReq() *TPipeTransferReq { + return &TPipeTransferReq{} } -var TSBackupConfigurationResp_Status_DEFAULT *common.TSStatus -func (p *TSBackupConfigurationResp) GetStatus() *common.TSStatus { - if !p.IsSetStatus() { - return TSBackupConfigurationResp_Status_DEFAULT + +func (p *TPipeTransferReq) GetVersion() int8 { + return p.Version +} + +func (p *TPipeTransferReq) GetType() int16 { + return p.Type +} + +func (p *TPipeTransferReq) GetBody() []byte { + return p.Body +} +func (p *TPipeTransferReq) 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) } -return p.Status + + var issetVersion bool = false; + var issetType bool = false; + var issetBody 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.BYTE { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetVersion = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I16 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetType = 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 + } + issetBody = 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 !issetVersion{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")); + } + if !issetType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")); + } + if !issetBody{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Body is not set")); + } + return nil } -var TSBackupConfigurationResp_EnableOperationSync_DEFAULT bool -func (p *TSBackupConfigurationResp) GetEnableOperationSync() bool { - if !p.IsSetEnableOperationSync() { - return TSBackupConfigurationResp_EnableOperationSync_DEFAULT + +func (p *TPipeTransferReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadByte(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + temp := int8(v) + p.Version = temp +} + return nil +} + +func (p *TPipeTransferReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Type = v +} + return nil +} + +func (p *TPipeTransferReq) 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.Body = v +} + return nil +} + +func (p *TPipeTransferReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TPipeTransferReq"); 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 } } -return *p.EnableOperationSync + 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 } -var TSBackupConfigurationResp_SecondaryAddress_DEFAULT string -func (p *TSBackupConfigurationResp) GetSecondaryAddress() string { - if !p.IsSetSecondaryAddress() { - return TSBackupConfigurationResp_SecondaryAddress_DEFAULT + +func (p *TPipeTransferReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.BYTE, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:version: ", p), err) } + if err := oprot.WriteByte(ctx, int8(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 1:version: ", p), err) } + return err +} + +func (p *TPipeTransferReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.I16, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:type: ", p), err) } + if err := oprot.WriteI16(ctx, int16(p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:type: ", p), err) } + return err +} + +func (p *TPipeTransferReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "body", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:body: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Body); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.body (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:body: ", p), err) } + return err +} + +func (p *TPipeTransferReq) Equals(other *TPipeTransferReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false } -return *p.SecondaryAddress + if p.Version != other.Version { return false } + if p.Type != other.Type { return false } + if bytes.Compare(p.Body, other.Body) != 0 { return false } + return true } -var TSBackupConfigurationResp_SecondaryPort_DEFAULT int32 -func (p *TSBackupConfigurationResp) GetSecondaryPort() int32 { - if !p.IsSetSecondaryPort() { - return TSBackupConfigurationResp_SecondaryPort_DEFAULT + +func (p *TPipeTransferReq) String() string { + if p == nil { + return "" } -return *p.SecondaryPort + return fmt.Sprintf("TPipeTransferReq(%+v)", *p) } -func (p *TSBackupConfigurationResp) IsSetStatus() bool { - return p.Status != nil + +// Attributes: +// - Status +// - Body +type TPipeTransferResp struct { + Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` + Body []byte `thrift:"body,2" db:"body" json:"body,omitempty"` } -func (p *TSBackupConfigurationResp) IsSetEnableOperationSync() bool { - return p.EnableOperationSync != nil +func NewTPipeTransferResp() *TPipeTransferResp { + return &TPipeTransferResp{} } -func (p *TSBackupConfigurationResp) IsSetSecondaryAddress() bool { - return p.SecondaryAddress != nil +var TPipeTransferResp_Status_DEFAULT *common.TSStatus +func (p *TPipeTransferResp) GetStatus() *common.TSStatus { + if !p.IsSetStatus() { + return TPipeTransferResp_Status_DEFAULT + } +return p.Status } +var TPipeTransferResp_Body_DEFAULT []byte -func (p *TSBackupConfigurationResp) IsSetSecondaryPort() bool { - return p.SecondaryPort != nil +func (p *TPipeTransferResp) GetBody() []byte { + return p.Body +} +func (p *TPipeTransferResp) IsSetStatus() bool { + return p.Status != nil } -func (p *TSBackupConfigurationResp) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *TPipeTransferResp) IsSetBody() bool { + return p.Body != nil +} + +func (p *TPipeTransferResp) 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.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 + } + } + 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 *TPipeTransferResp) 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 *TPipeTransferResp) 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.Body = v +} + return nil +} + +func (p *TPipeTransferResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TPipeTransferResp"); 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 *TPipeTransferResp) 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 *TPipeTransferResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBody() { + if err := oprot.WriteFieldBegin(ctx, "body", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:body: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Body); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.body (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:body: ", p), err) } + } + return err +} + +func (p *TPipeTransferResp) Equals(other *TPipeTransferResp) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Status.Equals(other.Status) { return false } + if bytes.Compare(p.Body, other.Body) != 0 { return false } + return true +} + +func (p *TPipeTransferResp) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TPipeTransferResp(%+v)", *p) +} + +// Attributes: +// - Version +// - Type +// - Body +type TPipeSubscribeReq struct { + Version int8 `thrift:"version,1,required" db:"version" json:"version"` + Type int16 `thrift:"type,2,required" db:"type" json:"type"` + Body []byte `thrift:"body,3" db:"body" json:"body,omitempty"` +} + +func NewTPipeSubscribeReq() *TPipeSubscribeReq { + return &TPipeSubscribeReq{} +} + + +func (p *TPipeSubscribeReq) GetVersion() int8 { + return p.Version +} + +func (p *TPipeSubscribeReq) GetType() int16 { + return p.Type +} +var TPipeSubscribeReq_Body_DEFAULT []byte + +func (p *TPipeSubscribeReq) GetBody() []byte { + return p.Body +} +func (p *TPipeSubscribeReq) IsSetBody() bool { + return p.Body != nil +} + +func (p *TPipeSubscribeReq) 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 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.BYTE { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetVersion = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I16 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetType = 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 + } + } + 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 !issetVersion{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")); + } + if !issetType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")); + } + return nil +} + +func (p *TPipeSubscribeReq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadByte(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + temp := int8(v) + p.Version = temp +} + return nil +} + +func (p *TPipeSubscribeReq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Type = v +} + return nil +} + +func (p *TPipeSubscribeReq) 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.Body = v +} + return nil +} + +func (p *TPipeSubscribeReq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TPipeSubscribeReq"); 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 *TPipeSubscribeReq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.BYTE, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:version: ", p), err) } + if err := oprot.WriteByte(ctx, int8(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 1:version: ", p), err) } + return err +} + +func (p *TPipeSubscribeReq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.I16, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:type: ", p), err) } + if err := oprot.WriteI16(ctx, int16(p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:type: ", p), err) } + return err +} + +func (p *TPipeSubscribeReq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBody() { + if err := oprot.WriteFieldBegin(ctx, "body", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:body: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Body); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.body (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:body: ", p), err) } + } + return err +} + +func (p *TPipeSubscribeReq) Equals(other *TPipeSubscribeReq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Version != other.Version { return false } + if p.Type != other.Type { return false } + if bytes.Compare(p.Body, other.Body) != 0 { return false } + return true +} + +func (p *TPipeSubscribeReq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TPipeSubscribeReq(%+v)", *p) +} + +// Attributes: +// - Status +// - Version +// - Type +// - Body +type TPipeSubscribeResp struct { + Status *common.TSStatus `thrift:"status,1,required" db:"status" json:"status"` + Version int8 `thrift:"version,2,required" db:"version" json:"version"` + Type int16 `thrift:"type,3,required" db:"type" json:"type"` + Body [][]byte `thrift:"body,4" db:"body" json:"body,omitempty"` +} + +func NewTPipeSubscribeResp() *TPipeSubscribeResp { + return &TPipeSubscribeResp{} +} + +var TPipeSubscribeResp_Status_DEFAULT *common.TSStatus +func (p *TPipeSubscribeResp) GetStatus() *common.TSStatus { + if !p.IsSetStatus() { + return TPipeSubscribeResp_Status_DEFAULT + } +return p.Status +} + +func (p *TPipeSubscribeResp) GetVersion() int8 { + return p.Version +} + +func (p *TPipeSubscribeResp) GetType() int16 { + return p.Type +} +var TPipeSubscribeResp_Body_DEFAULT [][]byte + +func (p *TPipeSubscribeResp) GetBody() [][]byte { + return p.Body +} +func (p *TPipeSubscribeResp) IsSetStatus() bool { + return p.Status != nil +} + +func (p *TPipeSubscribeResp) IsSetBody() bool { + return p.Body != nil +} + +func (p *TPipeSubscribeResp) 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 issetVersion 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.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.BYTE { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetVersion = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I16 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetType = 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 + } + } 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 !issetVersion{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")); + } + if !issetType{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Type is not set")); + } + return nil +} + +func (p *TPipeSubscribeResp) 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 *TPipeSubscribeResp) 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.Version = temp +} + return nil +} + +func (p *TPipeSubscribeResp) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Type = v +} + return nil +} + +func (p *TPipeSubscribeResp) 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([][]byte, 0, size) + p.Body = tSlice + for i := 0; i < size; i ++ { +var _elem183 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem183 = v +} + p.Body = append(p.Body, _elem183) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TPipeSubscribeResp) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TPipeSubscribeResp"); 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 *TPipeSubscribeResp) 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 *TPipeSubscribeResp) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.BYTE, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:version: ", p), err) } + if err := oprot.WriteByte(ctx, int8(p.Version)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.version (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:version: ", p), err) } + return err +} + +func (p *TPipeSubscribeResp) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.I16, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:type: ", p), err) } + if err := oprot.WriteI16(ctx, int16(p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:type: ", p), err) } + return err +} + +func (p *TPipeSubscribeResp) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBody() { + if err := oprot.WriteFieldBegin(ctx, "body", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:body: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Body)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Body { + 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 4:body: ", p), err) } + } + return err +} + +func (p *TPipeSubscribeResp) Equals(other *TPipeSubscribeResp) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Status.Equals(other.Status) { return false } + if p.Version != other.Version { return false } + if p.Type != other.Type { return false } + if len(p.Body) != len(other.Body) { return false } + for i, _tgt := range p.Body { + _src184 := other.Body[i] + if bytes.Compare(_tgt, _src184) != 0 { return false } + } + return true +} + +func (p *TPipeSubscribeResp) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TPipeSubscribeResp(%+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) } @@ -17017,11 +18493,11 @@ func (p *TSConnectionInfoResp) ReadField1(ctx context.Context, iprot thrift.TPr 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) + _elem185 := &TSConnectionInfo{} + if err := _elem185.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem185), err) } - p.ConnectionInfoList = append(p.ConnectionInfoList, _elem187) + p.ConnectionInfoList = append(p.ConnectionInfoList, _elem185) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -17069,8 +18545,8 @@ func (p *TSConnectionInfoResp) Equals(other *TSConnectionInfoResp) bool { } 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 } + _src186 := other.ConnectionInfoList[i] + if !_tgt.Equals(_src186) { return false } } return true } @@ -17100,9 +18576,15 @@ type IClientRPCService interface { ExecuteLastDataQueryV2(ctx context.Context, req *TSLastDataQueryReq) (_r *TSExecuteStatementResp, _err error) // Parameters: // - Req + ExecuteFastLastDataQueryForOneDeviceV2(ctx context.Context, req *TSFastLastDataQueryForOneDeviceReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req ExecuteAggregationQueryV2(ctx context.Context, req *TSAggregationQueryReq) (_r *TSExecuteStatementResp, _err error) // Parameters: // - Req + ExecuteGroupByQueryIntervalQuery(ctx context.Context, req *TSGroupByQueryIntervalReq) (_r *TSExecuteStatementResp, _err error) + // Parameters: + // - Req FetchResultsV2(ctx context.Context, req *TSFetchResultsReq) (_r *TSFetchResultsResp, _err error) // Parameters: // - Req @@ -17179,9 +18661,6 @@ type IClientRPCService interface { 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 @@ -17237,6 +18716,10 @@ type IClientRPCService interface { // Parameters: // - Req QuerySchemaTemplate(ctx context.Context, req *TSQueryTemplateReq) (_r *TSQueryTemplateResp, _err error) + ShowConfigurationTemplate(ctx context.Context) (_r *common.TShowConfigurationTemplateResp, _err error) + // Parameters: + // - NodeId + ShowConfiguration(ctx context.Context, nodeId int32) (_r *common.TShowConfigurationResp, _err error) // Parameters: // - Req SetSchemaTemplate(ctx context.Context, req *TSSetSchemaTemplateReq) (_r *common.TSStatus, _err error) @@ -17259,8 +18742,16 @@ type IClientRPCService interface { // - MetaInfo // - Buff SendFile(ctx context.Context, metaInfo *TSyncTransportMetaInfo, buff []byte) (_r *common.TSStatus, _err error) + // Parameters: + // - Req + PipeTransfer(ctx context.Context, req *TPipeTransferReq) (_r *TPipeTransferResp, _err error) + // Parameters: + // - Req + PipeSubscribe(ctx context.Context, req *TPipeSubscribeReq) (_r *TPipeSubscribeResp, _err error) GetBackupConfiguration(ctx context.Context) (_r *TSBackupConfigurationResp, _err error) FetchAllConnectionsInfo(ctx context.Context) (_r *TSConnectionInfoResp, _err error) + // For other node's call + TestConnectionEmptyRPC(ctx context.Context) (_r *common.TSStatus, _err error) } type IClientRPCServiceClient struct { @@ -17301,900 +18792,985 @@ func (p *IClientRPCServiceClient) SetLastResponseMeta_(meta thrift.ResponseMeta) // 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) + var _args187 IClientRPCServiceExecuteQueryStatementV2Args + _args187.Req = req + var _result189 IClientRPCServiceExecuteQueryStatementV2Result + var _meta188 thrift.ResponseMeta + _meta188, _err = p.Client_().Call(ctx, "executeQueryStatementV2", &_args187, &_result189) + p.SetLastResponseMeta_(_meta188) if _err != nil { return } - return _result191.GetSuccess(), nil + return _result189.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) + var _args190 IClientRPCServiceExecuteUpdateStatementV2Args + _args190.Req = req + var _result192 IClientRPCServiceExecuteUpdateStatementV2Result + var _meta191 thrift.ResponseMeta + _meta191, _err = p.Client_().Call(ctx, "executeUpdateStatementV2", &_args190, &_result192) + p.SetLastResponseMeta_(_meta191) if _err != nil { return } - return _result194.GetSuccess(), nil + return _result192.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) + var _args193 IClientRPCServiceExecuteStatementV2Args + _args193.Req = req + var _result195 IClientRPCServiceExecuteStatementV2Result + var _meta194 thrift.ResponseMeta + _meta194, _err = p.Client_().Call(ctx, "executeStatementV2", &_args193, &_result195) + p.SetLastResponseMeta_(_meta194) if _err != nil { return } - return _result197.GetSuccess(), nil + return _result195.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) + var _args196 IClientRPCServiceExecuteRawDataQueryV2Args + _args196.Req = req + var _result198 IClientRPCServiceExecuteRawDataQueryV2Result + var _meta197 thrift.ResponseMeta + _meta197, _err = p.Client_().Call(ctx, "executeRawDataQueryV2", &_args196, &_result198) + p.SetLastResponseMeta_(_meta197) if _err != nil { return } - return _result200.GetSuccess(), nil + return _result198.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) + var _args199 IClientRPCServiceExecuteLastDataQueryV2Args + _args199.Req = req + var _result201 IClientRPCServiceExecuteLastDataQueryV2Result + var _meta200 thrift.ResponseMeta + _meta200, _err = p.Client_().Call(ctx, "executeLastDataQueryV2", &_args199, &_result201) + p.SetLastResponseMeta_(_meta200) + if _err != nil { + return + } + return _result201.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteFastLastDataQueryForOneDeviceV2(ctx context.Context, req *TSFastLastDataQueryForOneDeviceReq) (_r *TSExecuteStatementResp, _err error) { + var _args202 IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args + _args202.Req = req + var _result204 IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result + var _meta203 thrift.ResponseMeta + _meta203, _err = p.Client_().Call(ctx, "executeFastLastDataQueryForOneDeviceV2", &_args202, &_result204) + p.SetLastResponseMeta_(_meta203) if _err != nil { return } - return _result203.GetSuccess(), nil + return _result204.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) + var _args205 IClientRPCServiceExecuteAggregationQueryV2Args + _args205.Req = req + var _result207 IClientRPCServiceExecuteAggregationQueryV2Result + var _meta206 thrift.ResponseMeta + _meta206, _err = p.Client_().Call(ctx, "executeAggregationQueryV2", &_args205, &_result207) + p.SetLastResponseMeta_(_meta206) + if _err != nil { + return + } + return _result207.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) ExecuteGroupByQueryIntervalQuery(ctx context.Context, req *TSGroupByQueryIntervalReq) (_r *TSExecuteStatementResp, _err error) { + var _args208 IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs + _args208.Req = req + var _result210 IClientRPCServiceExecuteGroupByQueryIntervalQueryResult + var _meta209 thrift.ResponseMeta + _meta209, _err = p.Client_().Call(ctx, "executeGroupByQueryIntervalQuery", &_args208, &_result210) + p.SetLastResponseMeta_(_meta209) if _err != nil { return } - return _result206.GetSuccess(), nil + return _result210.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) + var _args211 IClientRPCServiceFetchResultsV2Args + _args211.Req = req + var _result213 IClientRPCServiceFetchResultsV2Result + var _meta212 thrift.ResponseMeta + _meta212, _err = p.Client_().Call(ctx, "fetchResultsV2", &_args211, &_result213) + p.SetLastResponseMeta_(_meta212) if _err != nil { return } - return _result209.GetSuccess(), nil + return _result213.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) + var _args214 IClientRPCServiceOpenSessionArgs + _args214.Req = req + var _result216 IClientRPCServiceOpenSessionResult + var _meta215 thrift.ResponseMeta + _meta215, _err = p.Client_().Call(ctx, "openSession", &_args214, &_result216) + p.SetLastResponseMeta_(_meta215) if _err != nil { return } - return _result212.GetSuccess(), nil + return _result216.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) + var _args217 IClientRPCServiceCloseSessionArgs + _args217.Req = req + var _result219 IClientRPCServiceCloseSessionResult + var _meta218 thrift.ResponseMeta + _meta218, _err = p.Client_().Call(ctx, "closeSession", &_args217, &_result219) + p.SetLastResponseMeta_(_meta218) if _err != nil { return } - return _result215.GetSuccess(), nil + return _result219.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) + var _args220 IClientRPCServiceExecuteStatementArgs + _args220.Req = req + var _result222 IClientRPCServiceExecuteStatementResult + var _meta221 thrift.ResponseMeta + _meta221, _err = p.Client_().Call(ctx, "executeStatement", &_args220, &_result222) + p.SetLastResponseMeta_(_meta221) if _err != nil { return } - return _result218.GetSuccess(), nil + return _result222.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) + var _args223 IClientRPCServiceExecuteBatchStatementArgs + _args223.Req = req + var _result225 IClientRPCServiceExecuteBatchStatementResult + var _meta224 thrift.ResponseMeta + _meta224, _err = p.Client_().Call(ctx, "executeBatchStatement", &_args223, &_result225) + p.SetLastResponseMeta_(_meta224) if _err != nil { return } - return _result221.GetSuccess(), nil + return _result225.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) + var _args226 IClientRPCServiceExecuteQueryStatementArgs + _args226.Req = req + var _result228 IClientRPCServiceExecuteQueryStatementResult + var _meta227 thrift.ResponseMeta + _meta227, _err = p.Client_().Call(ctx, "executeQueryStatement", &_args226, &_result228) + p.SetLastResponseMeta_(_meta227) if _err != nil { return } - return _result224.GetSuccess(), nil + return _result228.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) + var _args229 IClientRPCServiceExecuteUpdateStatementArgs + _args229.Req = req + var _result231 IClientRPCServiceExecuteUpdateStatementResult + var _meta230 thrift.ResponseMeta + _meta230, _err = p.Client_().Call(ctx, "executeUpdateStatement", &_args229, &_result231) + p.SetLastResponseMeta_(_meta230) if _err != nil { return } - return _result227.GetSuccess(), nil + return _result231.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) + var _args232 IClientRPCServiceFetchResultsArgs + _args232.Req = req + var _result234 IClientRPCServiceFetchResultsResult + var _meta233 thrift.ResponseMeta + _meta233, _err = p.Client_().Call(ctx, "fetchResults", &_args232, &_result234) + p.SetLastResponseMeta_(_meta233) if _err != nil { return } - return _result230.GetSuccess(), nil + return _result234.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) + var _args235 IClientRPCServiceFetchMetadataArgs + _args235.Req = req + var _result237 IClientRPCServiceFetchMetadataResult + var _meta236 thrift.ResponseMeta + _meta236, _err = p.Client_().Call(ctx, "fetchMetadata", &_args235, &_result237) + p.SetLastResponseMeta_(_meta236) if _err != nil { return } - return _result233.GetSuccess(), nil + return _result237.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) + var _args238 IClientRPCServiceCancelOperationArgs + _args238.Req = req + var _result240 IClientRPCServiceCancelOperationResult + var _meta239 thrift.ResponseMeta + _meta239, _err = p.Client_().Call(ctx, "cancelOperation", &_args238, &_result240) + p.SetLastResponseMeta_(_meta239) if _err != nil { return } - return _result236.GetSuccess(), nil + return _result240.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) + var _args241 IClientRPCServiceCloseOperationArgs + _args241.Req = req + var _result243 IClientRPCServiceCloseOperationResult + var _meta242 thrift.ResponseMeta + _meta242, _err = p.Client_().Call(ctx, "closeOperation", &_args241, &_result243) + p.SetLastResponseMeta_(_meta242) if _err != nil { return } - return _result239.GetSuccess(), nil + return _result243.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) + var _args244 IClientRPCServiceGetTimeZoneArgs + _args244.SessionId = sessionId + var _result246 IClientRPCServiceGetTimeZoneResult + var _meta245 thrift.ResponseMeta + _meta245, _err = p.Client_().Call(ctx, "getTimeZone", &_args244, &_result246) + p.SetLastResponseMeta_(_meta245) if _err != nil { return } - return _result242.GetSuccess(), nil + return _result246.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) + var _args247 IClientRPCServiceSetTimeZoneArgs + _args247.Req = req + var _result249 IClientRPCServiceSetTimeZoneResult + var _meta248 thrift.ResponseMeta + _meta248, _err = p.Client_().Call(ctx, "setTimeZone", &_args247, &_result249) + p.SetLastResponseMeta_(_meta248) if _err != nil { return } - return _result245.GetSuccess(), nil + return _result249.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) + var _args250 IClientRPCServiceGetPropertiesArgs + var _result252 IClientRPCServiceGetPropertiesResult + var _meta251 thrift.ResponseMeta + _meta251, _err = p.Client_().Call(ctx, "getProperties", &_args250, &_result252) + p.SetLastResponseMeta_(_meta251) if _err != nil { return } - return _result248.GetSuccess(), nil + return _result252.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) + var _args253 IClientRPCServiceSetStorageGroupArgs + _args253.SessionId = sessionId + _args253.StorageGroup = storageGroup + var _result255 IClientRPCServiceSetStorageGroupResult + var _meta254 thrift.ResponseMeta + _meta254, _err = p.Client_().Call(ctx, "setStorageGroup", &_args253, &_result255) + p.SetLastResponseMeta_(_meta254) if _err != nil { return } - return _result251.GetSuccess(), nil + return _result255.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) + var _args256 IClientRPCServiceCreateTimeseriesArgs + _args256.Req = req + var _result258 IClientRPCServiceCreateTimeseriesResult + var _meta257 thrift.ResponseMeta + _meta257, _err = p.Client_().Call(ctx, "createTimeseries", &_args256, &_result258) + p.SetLastResponseMeta_(_meta257) if _err != nil { return } - return _result254.GetSuccess(), nil + return _result258.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) + var _args259 IClientRPCServiceCreateAlignedTimeseriesArgs + _args259.Req = req + var _result261 IClientRPCServiceCreateAlignedTimeseriesResult + var _meta260 thrift.ResponseMeta + _meta260, _err = p.Client_().Call(ctx, "createAlignedTimeseries", &_args259, &_result261) + p.SetLastResponseMeta_(_meta260) if _err != nil { return } - return _result257.GetSuccess(), nil + return _result261.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) + var _args262 IClientRPCServiceCreateMultiTimeseriesArgs + _args262.Req = req + var _result264 IClientRPCServiceCreateMultiTimeseriesResult + var _meta263 thrift.ResponseMeta + _meta263, _err = p.Client_().Call(ctx, "createMultiTimeseries", &_args262, &_result264) + p.SetLastResponseMeta_(_meta263) if _err != nil { return } - return _result260.GetSuccess(), nil + return _result264.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) + var _args265 IClientRPCServiceDeleteTimeseriesArgs + _args265.SessionId = sessionId + _args265.Path = path + var _result267 IClientRPCServiceDeleteTimeseriesResult + var _meta266 thrift.ResponseMeta + _meta266, _err = p.Client_().Call(ctx, "deleteTimeseries", &_args265, &_result267) + p.SetLastResponseMeta_(_meta266) if _err != nil { return } - return _result263.GetSuccess(), nil + return _result267.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) + var _args268 IClientRPCServiceDeleteStorageGroupsArgs + _args268.SessionId = sessionId + _args268.StorageGroup = storageGroup + var _result270 IClientRPCServiceDeleteStorageGroupsResult + var _meta269 thrift.ResponseMeta + _meta269, _err = p.Client_().Call(ctx, "deleteStorageGroups", &_args268, &_result270) + p.SetLastResponseMeta_(_meta269) if _err != nil { return } - return _result266.GetSuccess(), nil + return _result270.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) + var _args271 IClientRPCServiceInsertRecordArgs + _args271.Req = req + var _result273 IClientRPCServiceInsertRecordResult + var _meta272 thrift.ResponseMeta + _meta272, _err = p.Client_().Call(ctx, "insertRecord", &_args271, &_result273) + p.SetLastResponseMeta_(_meta272) if _err != nil { return } - return _result269.GetSuccess(), nil + return _result273.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) + var _args274 IClientRPCServiceInsertStringRecordArgs + _args274.Req = req + var _result276 IClientRPCServiceInsertStringRecordResult + var _meta275 thrift.ResponseMeta + _meta275, _err = p.Client_().Call(ctx, "insertStringRecord", &_args274, &_result276) + p.SetLastResponseMeta_(_meta275) if _err != nil { return } - return _result272.GetSuccess(), nil + return _result276.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) + var _args277 IClientRPCServiceInsertTabletArgs + _args277.Req = req + var _result279 IClientRPCServiceInsertTabletResult + var _meta278 thrift.ResponseMeta + _meta278, _err = p.Client_().Call(ctx, "insertTablet", &_args277, &_result279) + p.SetLastResponseMeta_(_meta278) if _err != nil { return } - return _result275.GetSuccess(), nil + return _result279.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) + var _args280 IClientRPCServiceInsertTabletsArgs + _args280.Req = req + var _result282 IClientRPCServiceInsertTabletsResult + var _meta281 thrift.ResponseMeta + _meta281, _err = p.Client_().Call(ctx, "insertTablets", &_args280, &_result282) + p.SetLastResponseMeta_(_meta281) if _err != nil { return } - return _result278.GetSuccess(), nil + return _result282.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) + var _args283 IClientRPCServiceInsertRecordsArgs + _args283.Req = req + var _result285 IClientRPCServiceInsertRecordsResult + var _meta284 thrift.ResponseMeta + _meta284, _err = p.Client_().Call(ctx, "insertRecords", &_args283, &_result285) + p.SetLastResponseMeta_(_meta284) 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 + return _result285.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) + var _args286 IClientRPCServiceInsertRecordsOfOneDeviceArgs + _args286.Req = req + var _result288 IClientRPCServiceInsertRecordsOfOneDeviceResult + var _meta287 thrift.ResponseMeta + _meta287, _err = p.Client_().Call(ctx, "insertRecordsOfOneDevice", &_args286, &_result288) + p.SetLastResponseMeta_(_meta287) if _err != nil { return } - return _result287.GetSuccess(), nil + return _result288.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) + var _args289 IClientRPCServiceInsertStringRecordsOfOneDeviceArgs + _args289.Req = req + var _result291 IClientRPCServiceInsertStringRecordsOfOneDeviceResult + var _meta290 thrift.ResponseMeta + _meta290, _err = p.Client_().Call(ctx, "insertStringRecordsOfOneDevice", &_args289, &_result291) + p.SetLastResponseMeta_(_meta290) if _err != nil { return } - return _result290.GetSuccess(), nil + return _result291.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) + var _args292 IClientRPCServiceInsertStringRecordsArgs + _args292.Req = req + var _result294 IClientRPCServiceInsertStringRecordsResult + var _meta293 thrift.ResponseMeta + _meta293, _err = p.Client_().Call(ctx, "insertStringRecords", &_args292, &_result294) + p.SetLastResponseMeta_(_meta293) if _err != nil { return } - return _result293.GetSuccess(), nil + return _result294.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) + var _args295 IClientRPCServiceTestInsertTabletArgs + _args295.Req = req + var _result297 IClientRPCServiceTestInsertTabletResult + var _meta296 thrift.ResponseMeta + _meta296, _err = p.Client_().Call(ctx, "testInsertTablet", &_args295, &_result297) + p.SetLastResponseMeta_(_meta296) if _err != nil { return } - return _result296.GetSuccess(), nil + return _result297.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) + var _args298 IClientRPCServiceTestInsertTabletsArgs + _args298.Req = req + var _result300 IClientRPCServiceTestInsertTabletsResult + var _meta299 thrift.ResponseMeta + _meta299, _err = p.Client_().Call(ctx, "testInsertTablets", &_args298, &_result300) + p.SetLastResponseMeta_(_meta299) if _err != nil { return } - return _result299.GetSuccess(), nil + return _result300.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) + var _args301 IClientRPCServiceTestInsertRecordArgs + _args301.Req = req + var _result303 IClientRPCServiceTestInsertRecordResult + var _meta302 thrift.ResponseMeta + _meta302, _err = p.Client_().Call(ctx, "testInsertRecord", &_args301, &_result303) + p.SetLastResponseMeta_(_meta302) if _err != nil { return } - return _result302.GetSuccess(), nil + return _result303.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) + var _args304 IClientRPCServiceTestInsertStringRecordArgs + _args304.Req = req + var _result306 IClientRPCServiceTestInsertStringRecordResult + var _meta305 thrift.ResponseMeta + _meta305, _err = p.Client_().Call(ctx, "testInsertStringRecord", &_args304, &_result306) + p.SetLastResponseMeta_(_meta305) if _err != nil { return } - return _result305.GetSuccess(), nil + return _result306.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) + var _args307 IClientRPCServiceTestInsertRecordsArgs + _args307.Req = req + var _result309 IClientRPCServiceTestInsertRecordsResult + var _meta308 thrift.ResponseMeta + _meta308, _err = p.Client_().Call(ctx, "testInsertRecords", &_args307, &_result309) + p.SetLastResponseMeta_(_meta308) if _err != nil { return } - return _result308.GetSuccess(), nil + return _result309.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) + var _args310 IClientRPCServiceTestInsertRecordsOfOneDeviceArgs + _args310.Req = req + var _result312 IClientRPCServiceTestInsertRecordsOfOneDeviceResult + var _meta311 thrift.ResponseMeta + _meta311, _err = p.Client_().Call(ctx, "testInsertRecordsOfOneDevice", &_args310, &_result312) + p.SetLastResponseMeta_(_meta311) if _err != nil { return } - return _result311.GetSuccess(), nil + return _result312.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) + var _args313 IClientRPCServiceTestInsertStringRecordsArgs + _args313.Req = req + var _result315 IClientRPCServiceTestInsertStringRecordsResult + var _meta314 thrift.ResponseMeta + _meta314, _err = p.Client_().Call(ctx, "testInsertStringRecords", &_args313, &_result315) + p.SetLastResponseMeta_(_meta314) if _err != nil { return } - return _result314.GetSuccess(), nil + return _result315.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) + var _args316 IClientRPCServiceDeleteDataArgs + _args316.Req = req + var _result318 IClientRPCServiceDeleteDataResult + var _meta317 thrift.ResponseMeta + _meta317, _err = p.Client_().Call(ctx, "deleteData", &_args316, &_result318) + p.SetLastResponseMeta_(_meta317) if _err != nil { return } - return _result317.GetSuccess(), nil + return _result318.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) + var _args319 IClientRPCServiceExecuteRawDataQueryArgs + _args319.Req = req + var _result321 IClientRPCServiceExecuteRawDataQueryResult + var _meta320 thrift.ResponseMeta + _meta320, _err = p.Client_().Call(ctx, "executeRawDataQuery", &_args319, &_result321) + p.SetLastResponseMeta_(_meta320) if _err != nil { return } - return _result320.GetSuccess(), nil + return _result321.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) + var _args322 IClientRPCServiceExecuteLastDataQueryArgs + _args322.Req = req + var _result324 IClientRPCServiceExecuteLastDataQueryResult + var _meta323 thrift.ResponseMeta + _meta323, _err = p.Client_().Call(ctx, "executeLastDataQuery", &_args322, &_result324) + p.SetLastResponseMeta_(_meta323) if _err != nil { return } - return _result323.GetSuccess(), nil + return _result324.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) + var _args325 IClientRPCServiceExecuteAggregationQueryArgs + _args325.Req = req + var _result327 IClientRPCServiceExecuteAggregationQueryResult + var _meta326 thrift.ResponseMeta + _meta326, _err = p.Client_().Call(ctx, "executeAggregationQuery", &_args325, &_result327) + p.SetLastResponseMeta_(_meta326) if _err != nil { return } - return _result326.GetSuccess(), nil + return _result327.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) + var _args328 IClientRPCServiceRequestStatementIdArgs + _args328.SessionId = sessionId + var _result330 IClientRPCServiceRequestStatementIdResult + var _meta329 thrift.ResponseMeta + _meta329, _err = p.Client_().Call(ctx, "requestStatementId", &_args328, &_result330) + p.SetLastResponseMeta_(_meta329) if _err != nil { return } - return _result329.GetSuccess(), nil + return _result330.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) + var _args331 IClientRPCServiceCreateSchemaTemplateArgs + _args331.Req = req + var _result333 IClientRPCServiceCreateSchemaTemplateResult + var _meta332 thrift.ResponseMeta + _meta332, _err = p.Client_().Call(ctx, "createSchemaTemplate", &_args331, &_result333) + p.SetLastResponseMeta_(_meta332) if _err != nil { return } - return _result332.GetSuccess(), nil + return _result333.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) + var _args334 IClientRPCServiceAppendSchemaTemplateArgs + _args334.Req = req + var _result336 IClientRPCServiceAppendSchemaTemplateResult + var _meta335 thrift.ResponseMeta + _meta335, _err = p.Client_().Call(ctx, "appendSchemaTemplate", &_args334, &_result336) + p.SetLastResponseMeta_(_meta335) if _err != nil { return } - return _result335.GetSuccess(), nil + return _result336.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) + var _args337 IClientRPCServicePruneSchemaTemplateArgs + _args337.Req = req + var _result339 IClientRPCServicePruneSchemaTemplateResult + var _meta338 thrift.ResponseMeta + _meta338, _err = p.Client_().Call(ctx, "pruneSchemaTemplate", &_args337, &_result339) + p.SetLastResponseMeta_(_meta338) if _err != nil { return } - return _result338.GetSuccess(), nil + return _result339.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) + var _args340 IClientRPCServiceQuerySchemaTemplateArgs + _args340.Req = req + var _result342 IClientRPCServiceQuerySchemaTemplateResult + var _meta341 thrift.ResponseMeta + _meta341, _err = p.Client_().Call(ctx, "querySchemaTemplate", &_args340, &_result342) + p.SetLastResponseMeta_(_meta341) + if _err != nil { + return + } + return _result342.GetSuccess(), nil +} + +func (p *IClientRPCServiceClient) ShowConfigurationTemplate(ctx context.Context) (_r *common.TShowConfigurationTemplateResp, _err error) { + var _args343 IClientRPCServiceShowConfigurationTemplateArgs + var _result345 IClientRPCServiceShowConfigurationTemplateResult + var _meta344 thrift.ResponseMeta + _meta344, _err = p.Client_().Call(ctx, "showConfigurationTemplate", &_args343, &_result345) + p.SetLastResponseMeta_(_meta344) if _err != nil { return } - return _result341.GetSuccess(), nil + return _result345.GetSuccess(), nil +} + +// Parameters: +// - NodeId +func (p *IClientRPCServiceClient) ShowConfiguration(ctx context.Context, nodeId int32) (_r *common.TShowConfigurationResp, _err error) { + var _args346 IClientRPCServiceShowConfigurationArgs + _args346.NodeId = nodeId + var _result348 IClientRPCServiceShowConfigurationResult + var _meta347 thrift.ResponseMeta + _meta347, _err = p.Client_().Call(ctx, "showConfiguration", &_args346, &_result348) + p.SetLastResponseMeta_(_meta347) + if _err != nil { + return + } + return _result348.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) + var _args349 IClientRPCServiceSetSchemaTemplateArgs + _args349.Req = req + var _result351 IClientRPCServiceSetSchemaTemplateResult + var _meta350 thrift.ResponseMeta + _meta350, _err = p.Client_().Call(ctx, "setSchemaTemplate", &_args349, &_result351) + p.SetLastResponseMeta_(_meta350) if _err != nil { return } - return _result344.GetSuccess(), nil + return _result351.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) + var _args352 IClientRPCServiceUnsetSchemaTemplateArgs + _args352.Req = req + var _result354 IClientRPCServiceUnsetSchemaTemplateResult + var _meta353 thrift.ResponseMeta + _meta353, _err = p.Client_().Call(ctx, "unsetSchemaTemplate", &_args352, &_result354) + p.SetLastResponseMeta_(_meta353) if _err != nil { return } - return _result347.GetSuccess(), nil + return _result354.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) + var _args355 IClientRPCServiceDropSchemaTemplateArgs + _args355.Req = req + var _result357 IClientRPCServiceDropSchemaTemplateResult + var _meta356 thrift.ResponseMeta + _meta356, _err = p.Client_().Call(ctx, "dropSchemaTemplate", &_args355, &_result357) + p.SetLastResponseMeta_(_meta356) if _err != nil { return } - return _result350.GetSuccess(), nil + return _result357.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) + var _args358 IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs + _args358.Req = req + var _result360 IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult + var _meta359 thrift.ResponseMeta + _meta359, _err = p.Client_().Call(ctx, "createTimeseriesUsingSchemaTemplate", &_args358, &_result360) + p.SetLastResponseMeta_(_meta359) if _err != nil { return } - return _result353.GetSuccess(), nil + return _result360.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) + var _args361 IClientRPCServiceHandshakeArgs + _args361.Info = info + var _result363 IClientRPCServiceHandshakeResult + var _meta362 thrift.ResponseMeta + _meta362, _err = p.Client_().Call(ctx, "handshake", &_args361, &_result363) + p.SetLastResponseMeta_(_meta362) if _err != nil { return } - return _result356.GetSuccess(), nil + return _result363.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) + var _args364 IClientRPCServiceSendPipeDataArgs + _args364.Buff = buff + var _result366 IClientRPCServiceSendPipeDataResult + var _meta365 thrift.ResponseMeta + _meta365, _err = p.Client_().Call(ctx, "sendPipeData", &_args364, &_result366) + p.SetLastResponseMeta_(_meta365) if _err != nil { return } - return _result359.GetSuccess(), nil + return _result366.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) + var _args367 IClientRPCServiceSendFileArgs + _args367.MetaInfo = metaInfo + _args367.Buff = buff + var _result369 IClientRPCServiceSendFileResult + var _meta368 thrift.ResponseMeta + _meta368, _err = p.Client_().Call(ctx, "sendFile", &_args367, &_result369) + p.SetLastResponseMeta_(_meta368) + if _err != nil { + return + } + return _result369.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) PipeTransfer(ctx context.Context, req *TPipeTransferReq) (_r *TPipeTransferResp, _err error) { + var _args370 IClientRPCServicePipeTransferArgs + _args370.Req = req + var _result372 IClientRPCServicePipeTransferResult + var _meta371 thrift.ResponseMeta + _meta371, _err = p.Client_().Call(ctx, "pipeTransfer", &_args370, &_result372) + p.SetLastResponseMeta_(_meta371) + if _err != nil { + return + } + return _result372.GetSuccess(), nil +} + +// Parameters: +// - Req +func (p *IClientRPCServiceClient) PipeSubscribe(ctx context.Context, req *TPipeSubscribeReq) (_r *TPipeSubscribeResp, _err error) { + var _args373 IClientRPCServicePipeSubscribeArgs + _args373.Req = req + var _result375 IClientRPCServicePipeSubscribeResult + var _meta374 thrift.ResponseMeta + _meta374, _err = p.Client_().Call(ctx, "pipeSubscribe", &_args373, &_result375) + p.SetLastResponseMeta_(_meta374) if _err != nil { return } - return _result362.GetSuccess(), nil + return _result375.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) + var _args376 IClientRPCServiceGetBackupConfigurationArgs + var _result378 IClientRPCServiceGetBackupConfigurationResult + var _meta377 thrift.ResponseMeta + _meta377, _err = p.Client_().Call(ctx, "getBackupConfiguration", &_args376, &_result378) + p.SetLastResponseMeta_(_meta377) if _err != nil { return } - return _result365.GetSuccess(), nil + return _result378.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) + var _args379 IClientRPCServiceFetchAllConnectionsInfoArgs + var _result381 IClientRPCServiceFetchAllConnectionsInfoResult + var _meta380 thrift.ResponseMeta + _meta380, _err = p.Client_().Call(ctx, "fetchAllConnectionsInfo", &_args379, &_result381) + p.SetLastResponseMeta_(_meta380) if _err != nil { return } - return _result368.GetSuccess(), nil + return _result381.GetSuccess(), nil +} + +// For other node's call +func (p *IClientRPCServiceClient) TestConnectionEmptyRPC(ctx context.Context) (_r *common.TSStatus, _err error) { + var _args382 IClientRPCServiceTestConnectionEmptyRPCArgs + var _result384 IClientRPCServiceTestConnectionEmptyRPCResult + var _meta383 thrift.ResponseMeta + _meta383, _err = p.Client_().Call(ctx, "testConnectionEmptyRPC", &_args382, &_result384) + p.SetLastResponseMeta_(_meta383) + if _err != nil { + return + } + return _result384.GetSuccess(), nil } type IClientRPCServiceProcessor struct { @@ -18217,68 +19793,74 @@ func (p *IClientRPCServiceProcessor) ProcessorMap() map[string]thrift.TProcessor 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 + self385 := &IClientRPCServiceProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} + self385.processorMap["executeQueryStatementV2"] = &iClientRPCServiceProcessorExecuteQueryStatementV2{handler:handler} + self385.processorMap["executeUpdateStatementV2"] = &iClientRPCServiceProcessorExecuteUpdateStatementV2{handler:handler} + self385.processorMap["executeStatementV2"] = &iClientRPCServiceProcessorExecuteStatementV2{handler:handler} + self385.processorMap["executeRawDataQueryV2"] = &iClientRPCServiceProcessorExecuteRawDataQueryV2{handler:handler} + self385.processorMap["executeLastDataQueryV2"] = &iClientRPCServiceProcessorExecuteLastDataQueryV2{handler:handler} + self385.processorMap["executeFastLastDataQueryForOneDeviceV2"] = &iClientRPCServiceProcessorExecuteFastLastDataQueryForOneDeviceV2{handler:handler} + self385.processorMap["executeAggregationQueryV2"] = &iClientRPCServiceProcessorExecuteAggregationQueryV2{handler:handler} + self385.processorMap["executeGroupByQueryIntervalQuery"] = &iClientRPCServiceProcessorExecuteGroupByQueryIntervalQuery{handler:handler} + self385.processorMap["fetchResultsV2"] = &iClientRPCServiceProcessorFetchResultsV2{handler:handler} + self385.processorMap["openSession"] = &iClientRPCServiceProcessorOpenSession{handler:handler} + self385.processorMap["closeSession"] = &iClientRPCServiceProcessorCloseSession{handler:handler} + self385.processorMap["executeStatement"] = &iClientRPCServiceProcessorExecuteStatement{handler:handler} + self385.processorMap["executeBatchStatement"] = &iClientRPCServiceProcessorExecuteBatchStatement{handler:handler} + self385.processorMap["executeQueryStatement"] = &iClientRPCServiceProcessorExecuteQueryStatement{handler:handler} + self385.processorMap["executeUpdateStatement"] = &iClientRPCServiceProcessorExecuteUpdateStatement{handler:handler} + self385.processorMap["fetchResults"] = &iClientRPCServiceProcessorFetchResults{handler:handler} + self385.processorMap["fetchMetadata"] = &iClientRPCServiceProcessorFetchMetadata{handler:handler} + self385.processorMap["cancelOperation"] = &iClientRPCServiceProcessorCancelOperation{handler:handler} + self385.processorMap["closeOperation"] = &iClientRPCServiceProcessorCloseOperation{handler:handler} + self385.processorMap["getTimeZone"] = &iClientRPCServiceProcessorGetTimeZone{handler:handler} + self385.processorMap["setTimeZone"] = &iClientRPCServiceProcessorSetTimeZone{handler:handler} + self385.processorMap["getProperties"] = &iClientRPCServiceProcessorGetProperties{handler:handler} + self385.processorMap["setStorageGroup"] = &iClientRPCServiceProcessorSetStorageGroup{handler:handler} + self385.processorMap["createTimeseries"] = &iClientRPCServiceProcessorCreateTimeseries{handler:handler} + self385.processorMap["createAlignedTimeseries"] = &iClientRPCServiceProcessorCreateAlignedTimeseries{handler:handler} + self385.processorMap["createMultiTimeseries"] = &iClientRPCServiceProcessorCreateMultiTimeseries{handler:handler} + self385.processorMap["deleteTimeseries"] = &iClientRPCServiceProcessorDeleteTimeseries{handler:handler} + self385.processorMap["deleteStorageGroups"] = &iClientRPCServiceProcessorDeleteStorageGroups{handler:handler} + self385.processorMap["insertRecord"] = &iClientRPCServiceProcessorInsertRecord{handler:handler} + self385.processorMap["insertStringRecord"] = &iClientRPCServiceProcessorInsertStringRecord{handler:handler} + self385.processorMap["insertTablet"] = &iClientRPCServiceProcessorInsertTablet{handler:handler} + self385.processorMap["insertTablets"] = &iClientRPCServiceProcessorInsertTablets{handler:handler} + self385.processorMap["insertRecords"] = &iClientRPCServiceProcessorInsertRecords{handler:handler} + self385.processorMap["insertRecordsOfOneDevice"] = &iClientRPCServiceProcessorInsertRecordsOfOneDevice{handler:handler} + self385.processorMap["insertStringRecordsOfOneDevice"] = &iClientRPCServiceProcessorInsertStringRecordsOfOneDevice{handler:handler} + self385.processorMap["insertStringRecords"] = &iClientRPCServiceProcessorInsertStringRecords{handler:handler} + self385.processorMap["testInsertTablet"] = &iClientRPCServiceProcessorTestInsertTablet{handler:handler} + self385.processorMap["testInsertTablets"] = &iClientRPCServiceProcessorTestInsertTablets{handler:handler} + self385.processorMap["testInsertRecord"] = &iClientRPCServiceProcessorTestInsertRecord{handler:handler} + self385.processorMap["testInsertStringRecord"] = &iClientRPCServiceProcessorTestInsertStringRecord{handler:handler} + self385.processorMap["testInsertRecords"] = &iClientRPCServiceProcessorTestInsertRecords{handler:handler} + self385.processorMap["testInsertRecordsOfOneDevice"] = &iClientRPCServiceProcessorTestInsertRecordsOfOneDevice{handler:handler} + self385.processorMap["testInsertStringRecords"] = &iClientRPCServiceProcessorTestInsertStringRecords{handler:handler} + self385.processorMap["deleteData"] = &iClientRPCServiceProcessorDeleteData{handler:handler} + self385.processorMap["executeRawDataQuery"] = &iClientRPCServiceProcessorExecuteRawDataQuery{handler:handler} + self385.processorMap["executeLastDataQuery"] = &iClientRPCServiceProcessorExecuteLastDataQuery{handler:handler} + self385.processorMap["executeAggregationQuery"] = &iClientRPCServiceProcessorExecuteAggregationQuery{handler:handler} + self385.processorMap["requestStatementId"] = &iClientRPCServiceProcessorRequestStatementId{handler:handler} + self385.processorMap["createSchemaTemplate"] = &iClientRPCServiceProcessorCreateSchemaTemplate{handler:handler} + self385.processorMap["appendSchemaTemplate"] = &iClientRPCServiceProcessorAppendSchemaTemplate{handler:handler} + self385.processorMap["pruneSchemaTemplate"] = &iClientRPCServiceProcessorPruneSchemaTemplate{handler:handler} + self385.processorMap["querySchemaTemplate"] = &iClientRPCServiceProcessorQuerySchemaTemplate{handler:handler} + self385.processorMap["showConfigurationTemplate"] = &iClientRPCServiceProcessorShowConfigurationTemplate{handler:handler} + self385.processorMap["showConfiguration"] = &iClientRPCServiceProcessorShowConfiguration{handler:handler} + self385.processorMap["setSchemaTemplate"] = &iClientRPCServiceProcessorSetSchemaTemplate{handler:handler} + self385.processorMap["unsetSchemaTemplate"] = &iClientRPCServiceProcessorUnsetSchemaTemplate{handler:handler} + self385.processorMap["dropSchemaTemplate"] = &iClientRPCServiceProcessorDropSchemaTemplate{handler:handler} + self385.processorMap["createTimeseriesUsingSchemaTemplate"] = &iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate{handler:handler} + self385.processorMap["handshake"] = &iClientRPCServiceProcessorHandshake{handler:handler} + self385.processorMap["sendPipeData"] = &iClientRPCServiceProcessorSendPipeData{handler:handler} + self385.processorMap["sendFile"] = &iClientRPCServiceProcessorSendFile{handler:handler} + self385.processorMap["pipeTransfer"] = &iClientRPCServiceProcessorPipeTransfer{handler:handler} + self385.processorMap["pipeSubscribe"] = &iClientRPCServiceProcessorPipeSubscribe{handler:handler} + self385.processorMap["getBackupConfiguration"] = &iClientRPCServiceProcessorGetBackupConfiguration{handler:handler} + self385.processorMap["fetchAllConnectionsInfo"] = &iClientRPCServiceProcessorFetchAllConnectionsInfo{handler:handler} + self385.processorMap["testConnectionEmptyRPC"] = &iClientRPCServiceProcessorTestConnectionEmptyRPC{handler:handler} +return self385 } func (p *IClientRPCServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { @@ -18289,12 +19871,12 @@ func (p *IClientRPCServiceProcessor) Process(ctx context.Context, iprot, oprot t } iprot.Skip(ctx, thrift.STRUCT) iprot.ReadMessageEnd(ctx) - x370 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) + x386 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) - x370.Write(ctx, oprot) + x386.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) - return false, x370 + return false, x386 } @@ -18693,6 +20275,85 @@ func (p *iClientRPCServiceProcessorExecuteLastDataQueryV2) Process(ctx context.C return true, err } +type iClientRPCServiceProcessorExecuteFastLastDataQueryForOneDeviceV2 struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteFastLastDataQueryForOneDeviceV2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args{} + 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, "executeFastLastDataQueryForOneDeviceV2", 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 := IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result{} + var retval *TSExecuteStatementResp + if retval, err2 = p.handler.ExecuteFastLastDataQueryForOneDeviceV2(ctx, args.Req); err2 != nil { + tickerCancel() + if err2 == thrift.ErrAbandonRequest { + return false, thrift.WrapTException(err2) + } + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeFastLastDataQueryForOneDeviceV2: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeFastLastDataQueryForOneDeviceV2", 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, "executeFastLastDataQueryForOneDeviceV2", 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 } @@ -18737,15 +20398,94 @@ func (p *iClientRPCServiceProcessorExecuteAggregationQueryV2) Process(ctx contex }(tickerCtx, cancel) } - result := IClientRPCServiceExecuteAggregationQueryV2Result{} + 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 iClientRPCServiceProcessorExecuteGroupByQueryIntervalQuery struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorExecuteGroupByQueryIntervalQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs{} + 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, "executeGroupByQueryIntervalQuery", 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 := IClientRPCServiceExecuteGroupByQueryIntervalQueryResult{} var retval *TSExecuteStatementResp - if retval, err2 = p.handler.ExecuteAggregationQueryV2(ctx, args.Req); err2 != nil { + if retval, err2 = p.handler.ExecuteGroupByQueryIntervalQuery(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 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeGroupByQueryIntervalQuery: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "executeGroupByQueryIntervalQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -18754,7 +20494,7 @@ func (p *iClientRPCServiceProcessorExecuteAggregationQueryV2) Process(ctx contex result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeAggregationQueryV2", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "executeGroupByQueryIntervalQuery", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -20747,17 +22487,17 @@ func (p *iClientRPCServiceProcessorInsertRecords) Process(ctx context.Context, s return true, err } -type iClientRPCServiceProcessorFastInsertRecords struct { +type iClientRPCServiceProcessorInsertRecordsOfOneDevice struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorFastInsertRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceFastInsertRecordsArgs{} +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, "fastInsertRecords", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -20791,15 +22531,15 @@ func (p *iClientRPCServiceProcessorFastInsertRecords) Process(ctx context.Contex }(tickerCtx, cancel) } - result := IClientRPCServiceFastInsertRecordsResult{} + result := IClientRPCServiceInsertRecordsOfOneDeviceResult{} var retval *common.TSStatus - if retval, err2 = p.handler.FastInsertRecords(ctx, args.Req); err2 != nil { + 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 fastInsertRecords: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "fastInsertRecords", 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) @@ -20808,7 +22548,7 @@ func (p *iClientRPCServiceProcessorFastInsertRecords) Process(ctx context.Contex result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "fastInsertRecords", 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 { @@ -20826,17 +22566,254 @@ func (p *iClientRPCServiceProcessorFastInsertRecords) Process(ctx context.Contex return true, err } -type iClientRPCServiceProcessorInsertRecordsOfOneDevice struct { +type iClientRPCServiceProcessorInsertStringRecordsOfOneDevice struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorInsertRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceInsertRecordsOfOneDeviceArgs{} +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, "insertRecordsOfOneDevice", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", 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 := 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 insertStringRecordsOfOneDevice: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", 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, "insertStringRecordsOfOneDevice", 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 iClientRPCServiceProcessorInsertStringRecords struct { + handler IClientRPCService +} + +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, "insertStringRecords", 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 := 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 insertStringRecords: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "insertStringRecords", 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, "insertStringRecords", 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 iClientRPCServiceProcessorTestInsertTablet struct { + handler IClientRPCService +} + +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, "testInsertTablet", 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 := 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 testInsertTablet: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "testInsertTablet", 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, "testInsertTablet", 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 iClientRPCServiceProcessorTestInsertTablets struct { + handler IClientRPCService +} + +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, "testInsertTablets", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -20870,15 +22847,15 @@ func (p *iClientRPCServiceProcessorInsertRecordsOfOneDevice) Process(ctx context }(tickerCtx, cancel) } - result := IClientRPCServiceInsertRecordsOfOneDeviceResult{} + result := IClientRPCServiceTestInsertTabletsResult{} var retval *common.TSStatus - if retval, err2 = p.handler.InsertRecordsOfOneDevice(ctx, args.Req); err2 != nil { + 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 insertRecordsOfOneDevice: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", 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) @@ -20887,7 +22864,7 @@ func (p *iClientRPCServiceProcessorInsertRecordsOfOneDevice) Process(ctx context result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertRecordsOfOneDevice", 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 { @@ -20905,17 +22882,17 @@ func (p *iClientRPCServiceProcessorInsertRecordsOfOneDevice) Process(ctx context return true, err } -type iClientRPCServiceProcessorInsertStringRecordsOfOneDevice struct { +type iClientRPCServiceProcessorTestInsertRecord struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceInsertStringRecordsOfOneDeviceArgs{} +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, "insertStringRecordsOfOneDevice", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertRecord", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -20949,15 +22926,15 @@ func (p *iClientRPCServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx c }(tickerCtx, cancel) } - result := IClientRPCServiceInsertStringRecordsOfOneDeviceResult{} + result := IClientRPCServiceTestInsertRecordResult{} var retval *common.TSStatus - if retval, err2 = p.handler.InsertStringRecordsOfOneDevice(ctx, args.Req); err2 != nil { + 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 insertStringRecordsOfOneDevice: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", 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) @@ -20966,7 +22943,7 @@ func (p *iClientRPCServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx c result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertStringRecordsOfOneDevice", 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 { @@ -20984,17 +22961,17 @@ func (p *iClientRPCServiceProcessorInsertStringRecordsOfOneDevice) Process(ctx c return true, err } -type iClientRPCServiceProcessorInsertStringRecords struct { +type iClientRPCServiceProcessorTestInsertStringRecord struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorInsertStringRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceInsertStringRecordsArgs{} +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, "insertStringRecords", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertStringRecord", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21028,15 +23005,15 @@ func (p *iClientRPCServiceProcessorInsertStringRecords) Process(ctx context.Cont }(tickerCtx, cancel) } - result := IClientRPCServiceInsertStringRecordsResult{} + result := IClientRPCServiceTestInsertStringRecordResult{} var retval *common.TSStatus - if retval, err2 = p.handler.InsertStringRecords(ctx, args.Req); err2 != nil { + 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 insertStringRecords: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "insertStringRecords", 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) @@ -21045,7 +23022,7 @@ func (p *iClientRPCServiceProcessorInsertStringRecords) Process(ctx context.Cont result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "insertStringRecords", 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 { @@ -21063,17 +23040,17 @@ func (p *iClientRPCServiceProcessorInsertStringRecords) Process(ctx context.Cont return true, err } -type iClientRPCServiceProcessorTestInsertTablet struct { +type iClientRPCServiceProcessorTestInsertRecords struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorTestInsertTablet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceTestInsertTabletArgs{} +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, "testInsertTablet", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertRecords", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21107,15 +23084,15 @@ func (p *iClientRPCServiceProcessorTestInsertTablet) Process(ctx context.Context }(tickerCtx, cancel) } - result := IClientRPCServiceTestInsertTabletResult{} + result := IClientRPCServiceTestInsertRecordsResult{} var retval *common.TSStatus - if retval, err2 = p.handler.TestInsertTablet(ctx, args.Req); err2 != nil { + 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 testInsertTablet: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertTablet", 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) @@ -21124,7 +23101,7 @@ func (p *iClientRPCServiceProcessorTestInsertTablet) Process(ctx context.Context result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertTablet", 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 { @@ -21142,17 +23119,17 @@ func (p *iClientRPCServiceProcessorTestInsertTablet) Process(ctx context.Context return true, err } -type iClientRPCServiceProcessorTestInsertTablets struct { +type iClientRPCServiceProcessorTestInsertRecordsOfOneDevice struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorTestInsertTablets) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceTestInsertTabletsArgs{} +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, "testInsertTablets", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21186,15 +23163,15 @@ func (p *iClientRPCServiceProcessorTestInsertTablets) Process(ctx context.Contex }(tickerCtx, cancel) } - result := IClientRPCServiceTestInsertTabletsResult{} + result := IClientRPCServiceTestInsertRecordsOfOneDeviceResult{} var retval *common.TSStatus - if retval, err2 = p.handler.TestInsertTablets(ctx, args.Req); err2 != nil { + 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 testInsertTablets: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertTablets", 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) @@ -21203,7 +23180,7 @@ func (p *iClientRPCServiceProcessorTestInsertTablets) Process(ctx context.Contex result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertTablets", 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 { @@ -21221,17 +23198,17 @@ func (p *iClientRPCServiceProcessorTestInsertTablets) Process(ctx context.Contex return true, err } -type iClientRPCServiceProcessorTestInsertRecord struct { +type iClientRPCServiceProcessorTestInsertStringRecords struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorTestInsertRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceTestInsertRecordArgs{} +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, "testInsertRecord", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "testInsertStringRecords", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21265,15 +23242,15 @@ func (p *iClientRPCServiceProcessorTestInsertRecord) Process(ctx context.Context }(tickerCtx, cancel) } - result := IClientRPCServiceTestInsertRecordResult{} + result := IClientRPCServiceTestInsertStringRecordsResult{} var retval *common.TSStatus - if retval, err2 = p.handler.TestInsertRecord(ctx, args.Req); err2 != nil { + 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 testInsertRecord: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertRecord", 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) @@ -21282,7 +23259,7 @@ func (p *iClientRPCServiceProcessorTestInsertRecord) Process(ctx context.Context result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertRecord", 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 { @@ -21300,17 +23277,17 @@ func (p *iClientRPCServiceProcessorTestInsertRecord) Process(ctx context.Context return true, err } -type iClientRPCServiceProcessorTestInsertStringRecord struct { +type iClientRPCServiceProcessorDeleteData struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorTestInsertStringRecord) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceTestInsertStringRecordArgs{} +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, "testInsertStringRecord", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "deleteData", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21344,15 +23321,15 @@ func (p *iClientRPCServiceProcessorTestInsertStringRecord) Process(ctx context.C }(tickerCtx, cancel) } - result := IClientRPCServiceTestInsertStringRecordResult{} + result := IClientRPCServiceDeleteDataResult{} var retval *common.TSStatus - if retval, err2 = p.handler.TestInsertStringRecord(ctx, args.Req); err2 != nil { + 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 testInsertStringRecord: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertStringRecord", 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) @@ -21361,7 +23338,7 @@ func (p *iClientRPCServiceProcessorTestInsertStringRecord) Process(ctx context.C result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertStringRecord", 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 { @@ -21379,17 +23356,17 @@ func (p *iClientRPCServiceProcessorTestInsertStringRecord) Process(ctx context.C return true, err } -type iClientRPCServiceProcessorTestInsertRecords struct { +type iClientRPCServiceProcessorExecuteRawDataQuery struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorTestInsertRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceTestInsertRecordsArgs{} +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, "testInsertRecords", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21423,15 +23400,15 @@ func (p *iClientRPCServiceProcessorTestInsertRecords) Process(ctx context.Contex }(tickerCtx, cancel) } - result := IClientRPCServiceTestInsertRecordsResult{} - var retval *common.TSStatus - if retval, err2 = p.handler.TestInsertRecords(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 testInsertRecords: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertRecords", 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) @@ -21440,7 +23417,7 @@ func (p *iClientRPCServiceProcessorTestInsertRecords) Process(ctx context.Contex result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertRecords", 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 { @@ -21458,17 +23435,17 @@ func (p *iClientRPCServiceProcessorTestInsertRecords) Process(ctx context.Contex return true, err } -type iClientRPCServiceProcessorTestInsertRecordsOfOneDevice struct { +type iClientRPCServiceProcessorExecuteLastDataQuery struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorTestInsertRecordsOfOneDevice) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceTestInsertRecordsOfOneDeviceArgs{} +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, "testInsertRecordsOfOneDevice", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "executeLastDataQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21502,15 +23479,15 @@ func (p *iClientRPCServiceProcessorTestInsertRecordsOfOneDevice) Process(ctx con }(tickerCtx, cancel) } - result := IClientRPCServiceTestInsertRecordsOfOneDeviceResult{} - var retval *common.TSStatus - if retval, err2 = p.handler.TestInsertRecordsOfOneDevice(ctx, args.Req); 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 testInsertRecordsOfOneDevice: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", 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) @@ -21519,7 +23496,7 @@ func (p *iClientRPCServiceProcessorTestInsertRecordsOfOneDevice) Process(ctx con result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertRecordsOfOneDevice", 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 { @@ -21537,17 +23514,17 @@ func (p *iClientRPCServiceProcessorTestInsertRecordsOfOneDevice) Process(ctx con return true, err } -type iClientRPCServiceProcessorTestInsertStringRecords struct { +type iClientRPCServiceProcessorExecuteAggregationQuery struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorTestInsertStringRecords) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceTestInsertStringRecordsArgs{} +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, "testInsertStringRecords", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "executeAggregationQuery", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21581,15 +23558,15 @@ func (p *iClientRPCServiceProcessorTestInsertStringRecords) Process(ctx context. }(tickerCtx, cancel) } - result := IClientRPCServiceTestInsertStringRecordsResult{} - var retval *common.TSStatus - if retval, err2 = p.handler.TestInsertStringRecords(ctx, args.Req); 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 testInsertStringRecords: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "testInsertStringRecords", 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) @@ -21598,7 +23575,7 @@ func (p *iClientRPCServiceProcessorTestInsertStringRecords) Process(ctx context. result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "testInsertStringRecords", 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 { @@ -21616,17 +23593,17 @@ func (p *iClientRPCServiceProcessorTestInsertStringRecords) Process(ctx context. return true, err } -type iClientRPCServiceProcessorDeleteData struct { +type iClientRPCServiceProcessorRequestStatementId struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorDeleteData) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceDeleteDataArgs{} +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, "deleteData", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "requestStatementId", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21660,24 +23637,24 @@ func (p *iClientRPCServiceProcessorDeleteData) Process(ctx context.Context, seqI }(tickerCtx, cancel) } - result := IClientRPCServiceDeleteDataResult{} - var retval *common.TSStatus - if retval, err2 = p.handler.DeleteData(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 deleteData: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "deleteData", 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, "deleteData", 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 { @@ -21695,17 +23672,17 @@ func (p *iClientRPCServiceProcessorDeleteData) Process(ctx context.Context, seqI return true, err } -type iClientRPCServiceProcessorExecuteRawDataQuery struct { +type iClientRPCServiceProcessorCreateSchemaTemplate struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorExecuteRawDataQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceExecuteRawDataQueryArgs{} +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, "executeRawDataQuery", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21739,15 +23716,15 @@ func (p *iClientRPCServiceProcessorExecuteRawDataQuery) Process(ctx context.Cont }(tickerCtx, cancel) } - result := IClientRPCServiceExecuteRawDataQueryResult{} - var retval *TSExecuteStatementResp - if retval, err2 = p.handler.ExecuteRawDataQuery(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 executeRawDataQuery: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeRawDataQuery", 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) @@ -21756,7 +23733,7 @@ func (p *iClientRPCServiceProcessorExecuteRawDataQuery) Process(ctx context.Cont result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeRawDataQuery", 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 { @@ -21774,17 +23751,17 @@ func (p *iClientRPCServiceProcessorExecuteRawDataQuery) Process(ctx context.Cont return true, err } -type iClientRPCServiceProcessorExecuteLastDataQuery struct { +type iClientRPCServiceProcessorAppendSchemaTemplate struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorExecuteLastDataQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceExecuteLastDataQueryArgs{} +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, "executeLastDataQuery", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21818,15 +23795,15 @@ func (p *iClientRPCServiceProcessorExecuteLastDataQuery) Process(ctx context.Con }(tickerCtx, cancel) } - result := IClientRPCServiceExecuteLastDataQueryResult{} - var retval *TSExecuteStatementResp - if retval, err2 = p.handler.ExecuteLastDataQuery(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 executeLastDataQuery: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeLastDataQuery", 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) @@ -21835,7 +23812,7 @@ func (p *iClientRPCServiceProcessorExecuteLastDataQuery) Process(ctx context.Con result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeLastDataQuery", 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 { @@ -21853,17 +23830,17 @@ func (p *iClientRPCServiceProcessorExecuteLastDataQuery) Process(ctx context.Con return true, err } -type iClientRPCServiceProcessorExecuteAggregationQuery struct { +type iClientRPCServiceProcessorPruneSchemaTemplate struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorExecuteAggregationQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceExecuteAggregationQueryArgs{} +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, "executeAggregationQuery", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21897,15 +23874,15 @@ func (p *iClientRPCServiceProcessorExecuteAggregationQuery) Process(ctx context. }(tickerCtx, cancel) } - result := IClientRPCServiceExecuteAggregationQueryResult{} - var retval *TSExecuteStatementResp - if retval, err2 = p.handler.ExecuteAggregationQuery(ctx, args.Req); 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 executeAggregationQuery: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "executeAggregationQuery", 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) @@ -21914,7 +23891,7 @@ func (p *iClientRPCServiceProcessorExecuteAggregationQuery) Process(ctx context. result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "executeAggregationQuery", 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 { @@ -21932,17 +23909,17 @@ func (p *iClientRPCServiceProcessorExecuteAggregationQuery) Process(ctx context. return true, err } -type iClientRPCServiceProcessorRequestStatementId struct { +type iClientRPCServiceProcessorQuerySchemaTemplate struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorRequestStatementId) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceRequestStatementIdArgs{} +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, "requestStatementId", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "querySchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -21976,24 +23953,24 @@ func (p *iClientRPCServiceProcessorRequestStatementId) Process(ctx context.Conte }(tickerCtx, cancel) } - result := IClientRPCServiceRequestStatementIdResult{} - var retval int64 - if retval, err2 = p.handler.RequestStatementId(ctx, args.SessionId); 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 requestStatementId: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "requestStatementId", 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) return true, thrift.WrapTException(err2) } else { - result.Success = &retval + result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "requestStatementId", 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 { @@ -22011,17 +23988,17 @@ func (p *iClientRPCServiceProcessorRequestStatementId) Process(ctx context.Conte return true, err } -type iClientRPCServiceProcessorCreateSchemaTemplate struct { +type iClientRPCServiceProcessorShowConfigurationTemplate struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorCreateSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceCreateSchemaTemplateArgs{} +func (p *iClientRPCServiceProcessorShowConfigurationTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceShowConfigurationTemplateArgs{} 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) + oprot.WriteMessageBegin(ctx, "showConfigurationTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22055,15 +24032,15 @@ func (p *iClientRPCServiceProcessorCreateSchemaTemplate) Process(ctx context.Con }(tickerCtx, cancel) } - result := IClientRPCServiceCreateSchemaTemplateResult{} - var retval *common.TSStatus - if retval, err2 = p.handler.CreateSchemaTemplate(ctx, args.Req); err2 != nil { + result := IClientRPCServiceShowConfigurationTemplateResult{} + var retval *common.TShowConfigurationTemplateResp + if retval, err2 = p.handler.ShowConfigurationTemplate(ctx); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing showConfigurationTemplate: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "showConfigurationTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22072,7 +24049,7 @@ func (p *iClientRPCServiceProcessorCreateSchemaTemplate) Process(ctx context.Con result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "createSchemaTemplate", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "showConfigurationTemplate", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -22090,17 +24067,17 @@ func (p *iClientRPCServiceProcessorCreateSchemaTemplate) Process(ctx context.Con return true, err } -type iClientRPCServiceProcessorAppendSchemaTemplate struct { +type iClientRPCServiceProcessorShowConfiguration struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorAppendSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceAppendSchemaTemplateArgs{} +func (p *iClientRPCServiceProcessorShowConfiguration) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceShowConfigurationArgs{} 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) + oprot.WriteMessageBegin(ctx, "showConfiguration", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22134,15 +24111,15 @@ func (p *iClientRPCServiceProcessorAppendSchemaTemplate) Process(ctx context.Con }(tickerCtx, cancel) } - result := IClientRPCServiceAppendSchemaTemplateResult{} - var retval *common.TSStatus - if retval, err2 = p.handler.AppendSchemaTemplate(ctx, args.Req); err2 != nil { + result := IClientRPCServiceShowConfigurationResult{} + var retval *common.TShowConfigurationResp + if retval, err2 = p.handler.ShowConfiguration(ctx, args.NodeId); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing appendSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing showConfiguration: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "showConfiguration", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22151,7 +24128,7 @@ func (p *iClientRPCServiceProcessorAppendSchemaTemplate) Process(ctx context.Con result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "appendSchemaTemplate", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "showConfiguration", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -22169,17 +24146,17 @@ func (p *iClientRPCServiceProcessorAppendSchemaTemplate) Process(ctx context.Con return true, err } -type iClientRPCServiceProcessorPruneSchemaTemplate struct { +type iClientRPCServiceProcessorSetSchemaTemplate struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorPruneSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServicePruneSchemaTemplateArgs{} +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, "pruneSchemaTemplate", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "setSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22213,15 +24190,15 @@ func (p *iClientRPCServiceProcessorPruneSchemaTemplate) Process(ctx context.Cont }(tickerCtx, cancel) } - result := IClientRPCServicePruneSchemaTemplateResult{} + result := IClientRPCServiceSetSchemaTemplateResult{} var retval *common.TSStatus - if retval, err2 = p.handler.PruneSchemaTemplate(ctx, args.Req); err2 != nil { + 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 pruneSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", 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) @@ -22230,7 +24207,7 @@ func (p *iClientRPCServiceProcessorPruneSchemaTemplate) Process(ctx context.Cont result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "pruneSchemaTemplate", 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 { @@ -22248,17 +24225,17 @@ func (p *iClientRPCServiceProcessorPruneSchemaTemplate) Process(ctx context.Cont return true, err } -type iClientRPCServiceProcessorQuerySchemaTemplate struct { +type iClientRPCServiceProcessorUnsetSchemaTemplate struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorQuerySchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceQuerySchemaTemplateArgs{} +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, "querySchemaTemplate", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22292,15 +24269,15 @@ func (p *iClientRPCServiceProcessorQuerySchemaTemplate) Process(ctx context.Cont }(tickerCtx, cancel) } - result := IClientRPCServiceQuerySchemaTemplateResult{} - var retval *TSQueryTemplateResp - if retval, err2 = p.handler.QuerySchemaTemplate(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 querySchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "querySchemaTemplate", 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) @@ -22309,7 +24286,7 @@ func (p *iClientRPCServiceProcessorQuerySchemaTemplate) Process(ctx context.Cont result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "querySchemaTemplate", 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 { @@ -22327,17 +24304,17 @@ func (p *iClientRPCServiceProcessorQuerySchemaTemplate) Process(ctx context.Cont return true, err } -type iClientRPCServiceProcessorSetSchemaTemplate struct { +type iClientRPCServiceProcessorDropSchemaTemplate struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorSetSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceSetSchemaTemplateArgs{} +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, "setSchemaTemplate", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22371,15 +24348,15 @@ func (p *iClientRPCServiceProcessorSetSchemaTemplate) Process(ctx context.Contex }(tickerCtx, cancel) } - result := IClientRPCServiceSetSchemaTemplateResult{} + result := IClientRPCServiceDropSchemaTemplateResult{} var retval *common.TSStatus - if retval, err2 = p.handler.SetSchemaTemplate(ctx, args.Req); err2 != nil { + 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 setSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "setSchemaTemplate", 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) @@ -22388,7 +24365,7 @@ func (p *iClientRPCServiceProcessorSetSchemaTemplate) Process(ctx context.Contex result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "setSchemaTemplate", 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 { @@ -22406,17 +24383,17 @@ func (p *iClientRPCServiceProcessorSetSchemaTemplate) Process(ctx context.Contex return true, err } -type iClientRPCServiceProcessorUnsetSchemaTemplate struct { +type iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorUnsetSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceUnsetSchemaTemplateArgs{} +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, "unsetSchemaTemplate", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "createTimeseriesUsingSchemaTemplate", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22450,15 +24427,15 @@ func (p *iClientRPCServiceProcessorUnsetSchemaTemplate) Process(ctx context.Cont }(tickerCtx, cancel) } - result := IClientRPCServiceUnsetSchemaTemplateResult{} + result := IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult{} var retval *common.TSStatus - if retval, err2 = p.handler.UnsetSchemaTemplate(ctx, args.Req); err2 != nil { + 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 unsetSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", 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) @@ -22467,7 +24444,7 @@ func (p *iClientRPCServiceProcessorUnsetSchemaTemplate) Process(ctx context.Cont result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "unsetSchemaTemplate", 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 { @@ -22485,17 +24462,17 @@ func (p *iClientRPCServiceProcessorUnsetSchemaTemplate) Process(ctx context.Cont return true, err } -type iClientRPCServiceProcessorDropSchemaTemplate struct { +type iClientRPCServiceProcessorHandshake struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorDropSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceDropSchemaTemplateArgs{} +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, "dropSchemaTemplate", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "handshake", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22529,15 +24506,15 @@ func (p *iClientRPCServiceProcessorDropSchemaTemplate) Process(ctx context.Conte }(tickerCtx, cancel) } - result := IClientRPCServiceDropSchemaTemplateResult{} + result := IClientRPCServiceHandshakeResult{} var retval *common.TSStatus - if retval, err2 = p.handler.DropSchemaTemplate(ctx, args.Req); err2 != nil { + 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 dropSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", 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) @@ -22546,7 +24523,7 @@ func (p *iClientRPCServiceProcessorDropSchemaTemplate) Process(ctx context.Conte result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "dropSchemaTemplate", 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 { @@ -22564,17 +24541,17 @@ func (p *iClientRPCServiceProcessorDropSchemaTemplate) Process(ctx context.Conte return true, err } -type iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate struct { +type iClientRPCServiceProcessorSendPipeData struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceCreateTimeseriesUsingSchemaTemplateArgs{} +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, "createTimeseriesUsingSchemaTemplate", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "sendPipeData", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22608,15 +24585,15 @@ func (p *iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate) Process( }(tickerCtx, cancel) } - result := IClientRPCServiceCreateTimeseriesUsingSchemaTemplateResult{} + result := IClientRPCServiceSendPipeDataResult{} var retval *common.TSStatus - if retval, err2 = p.handler.CreateTimeseriesUsingSchemaTemplate(ctx, args.Req); err2 != nil { + 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 createTimeseriesUsingSchemaTemplate: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "createTimeseriesUsingSchemaTemplate", 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) @@ -22625,7 +24602,7 @@ func (p *iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate) Process( result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "createTimeseriesUsingSchemaTemplate", 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 { @@ -22643,17 +24620,17 @@ func (p *iClientRPCServiceProcessorCreateTimeseriesUsingSchemaTemplate) Process( return true, err } -type iClientRPCServiceProcessorHandshake struct { +type iClientRPCServiceProcessorSendFile struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorHandshake) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceHandshakeArgs{} +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, "handshake", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "sendFile", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22687,15 +24664,15 @@ func (p *iClientRPCServiceProcessorHandshake) Process(ctx context.Context, seqId }(tickerCtx, cancel) } - result := IClientRPCServiceHandshakeResult{} + result := IClientRPCServiceSendFileResult{} var retval *common.TSStatus - if retval, err2 = p.handler.Handshake(ctx, args.Info); err2 != nil { + 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 handshake: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "handshake", 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) @@ -22704,7 +24681,7 @@ func (p *iClientRPCServiceProcessorHandshake) Process(ctx context.Context, seqId result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "handshake", 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 { @@ -22722,17 +24699,17 @@ func (p *iClientRPCServiceProcessorHandshake) Process(ctx context.Context, seqId return true, err } -type iClientRPCServiceProcessorSendPipeData struct { +type iClientRPCServiceProcessorPipeTransfer struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorSendPipeData) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceSendPipeDataArgs{} +func (p *iClientRPCServiceProcessorPipeTransfer) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServicePipeTransferArgs{} 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, "sendPipeData", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "pipeTransfer", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22766,15 +24743,15 @@ func (p *iClientRPCServiceProcessorSendPipeData) Process(ctx context.Context, se }(tickerCtx, cancel) } - result := IClientRPCServiceSendPipeDataResult{} - var retval *common.TSStatus - if retval, err2 = p.handler.SendPipeData(ctx, args.Buff); err2 != nil { + result := IClientRPCServicePipeTransferResult{} + var retval *TPipeTransferResp + if retval, err2 = p.handler.PipeTransfer(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sendPipeData: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "sendPipeData", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pipeTransfer: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "pipeTransfer", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22783,7 +24760,7 @@ func (p *iClientRPCServiceProcessorSendPipeData) Process(ctx context.Context, se result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "sendPipeData", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "pipeTransfer", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -22801,17 +24778,17 @@ func (p *iClientRPCServiceProcessorSendPipeData) Process(ctx context.Context, se return true, err } -type iClientRPCServiceProcessorSendFile struct { +type iClientRPCServiceProcessorPipeSubscribe struct { handler IClientRPCService } -func (p *iClientRPCServiceProcessorSendFile) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := IClientRPCServiceSendFileArgs{} +func (p *iClientRPCServiceProcessorPipeSubscribe) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServicePipeSubscribeArgs{} 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, "sendFile", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin(ctx, "pipeSubscribe", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22845,15 +24822,15 @@ func (p *iClientRPCServiceProcessorSendFile) Process(ctx context.Context, seqId }(tickerCtx, cancel) } - result := IClientRPCServiceSendFileResult{} - var retval *common.TSStatus - if retval, err2 = p.handler.SendFile(ctx, args.MetaInfo, args.Buff); err2 != nil { + result := IClientRPCServicePipeSubscribeResult{} + var retval *TPipeSubscribeResp + if retval, err2 = p.handler.PipeSubscribe(ctx, args.Req); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sendFile: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "sendFile", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pipeSubscribe: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "pipeSubscribe", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -22862,7 +24839,7 @@ func (p *iClientRPCServiceProcessorSendFile) Process(ctx context.Context, seqId result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "sendFile", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "pipeSubscribe", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -23003,15 +24980,94 @@ func (p *iClientRPCServiceProcessorFetchAllConnectionsInfo) Process(ctx context. }(tickerCtx, cancel) } - result := IClientRPCServiceFetchAllConnectionsInfoResult{} - var retval *TSConnectionInfoResp - if retval, err2 = p.handler.FetchAllConnectionsInfo(ctx); 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 fetchAllConnectionsInfo: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "fetchAllConnectionsInfo", 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, "fetchAllConnectionsInfo", 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 iClientRPCServiceProcessorTestConnectionEmptyRPC struct { + handler IClientRPCService +} + +func (p *iClientRPCServiceProcessorTestConnectionEmptyRPC) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := IClientRPCServiceTestConnectionEmptyRPCArgs{} + 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, "testConnectionEmptyRPC", 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 := IClientRPCServiceTestConnectionEmptyRPCResult{} + var retval *common.TSStatus + if retval, err2 = p.handler.TestConnectionEmptyRPC(ctx); err2 != nil { tickerCancel() if err2 == thrift.ErrAbandonRequest { return false, thrift.WrapTException(err2) } - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing fetchAllConnectionsInfo: " + err2.Error()) - oprot.WriteMessageBegin(ctx, "fetchAllConnectionsInfo", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing testConnectionEmptyRPC: " + err2.Error()) + oprot.WriteMessageBegin(ctx, "testConnectionEmptyRPC", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) @@ -23020,7 +25076,7 @@ func (p *iClientRPCServiceProcessorFetchAllConnectionsInfo) Process(ctx context. result.Success = retval } tickerCancel() - if err2 = oprot.WriteMessageBegin(ctx, "fetchAllConnectionsInfo", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin(ctx, "testConnectionEmptyRPC", thrift.REPLY, seqId); err2 != nil { err = thrift.WrapTException(err2) } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { @@ -23792,7 +25848,403 @@ func (p *IClientRPCServiceExecuteRawDataQueryV2Result) Read(ctx context.Context, return nil } -func (p *IClientRPCServiceExecuteRawDataQueryV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +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) + } + 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 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) } + } + return err +} + +func (p *IClientRPCServiceExecuteRawDataQueryV2Result) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryV2Result(%+v)", *p) +} + +// Attributes: +// - Req +type IClientRPCServiceExecuteLastDataQueryV2Args struct { + Req *TSLastDataQueryReq `thrift:"req,1" db:"req" json:"req"` +} + +func NewIClientRPCServiceExecuteLastDataQueryV2Args() *IClientRPCServiceExecuteLastDataQueryV2Args { + return &IClientRPCServiceExecuteLastDataQueryV2Args{} +} + +var IClientRPCServiceExecuteLastDataQueryV2Args_Req_DEFAULT *TSLastDataQueryReq +func (p *IClientRPCServiceExecuteLastDataQueryV2Args) GetReq() *TSLastDataQueryReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteLastDataQueryV2Args_Req_DEFAULT + } +return p.Req +} +func (p *IClientRPCServiceExecuteLastDataQueryV2Args) IsSetReq() bool { + return p.Req != nil +} + +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) + } + + + 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 *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) + } + 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 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 := 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 fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryV2Args(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServiceExecuteLastDataQueryV2Result struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewIClientRPCServiceExecuteLastDataQueryV2Result() *IClientRPCServiceExecuteLastDataQueryV2Result { + return &IClientRPCServiceExecuteLastDataQueryV2Result{} +} + +var IClientRPCServiceExecuteLastDataQueryV2Result_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) GetSuccess() *TSExecuteStatementResp { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteLastDataQueryV2Result_Success_DEFAULT + } +return p.Success +} +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) IsSetSuccess() bool { + return p.Success != nil +} + +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) + } + + + 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 *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) + } + 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 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) } + } + return err +} + +func (p *IClientRPCServiceExecuteLastDataQueryV2Result) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryV2Result(%+v)", *p) +} + +// Attributes: +// - Req +type IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args struct { + Req *TSFastLastDataQueryForOneDeviceReq `thrift:"req,1" db:"req" json:"req"` +} + +func NewIClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args() *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args { + return &IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args{} +} + +var IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args_Req_DEFAULT *TSFastLastDataQueryForOneDeviceReq +func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) GetReq() *TSFastLastDataQueryForOneDeviceReq { + if !p.IsSetReq() { + return IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args_Req_DEFAULT + } +return p.Req +} +func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) IsSetReq() bool { + return p.Req != nil +} + +func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) 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 *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSFastLastDataQueryForOneDeviceReq{} + 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 *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeFastLastDataQueryForOneDeviceV2_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 *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) 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 *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Args(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result struct { + Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewIClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result() *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result { + return &IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result{} +} + +var IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) GetSuccess() *TSExecuteStatementResp { + if !p.IsSetSuccess() { + return IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result_Success_DEFAULT + } +return p.Success +} +func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) 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 *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) 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) @@ -23800,8 +26252,8 @@ func (p *IClientRPCServiceExecuteRawDataQueryV2Result) ReadField0(ctx context.C return nil } -func (p *IClientRPCServiceExecuteRawDataQueryV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeRawDataQueryV2_result"); err != nil { +func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeFastLastDataQueryForOneDeviceV2_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 } @@ -23813,7 +26265,7 @@ func (p *IClientRPCServiceExecuteRawDataQueryV2Result) Write(ctx context.Context return nil } -func (p *IClientRPCServiceExecuteRawDataQueryV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) 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) } @@ -23826,35 +26278,35 @@ func (p *IClientRPCServiceExecuteRawDataQueryV2Result) writeField0(ctx context.C return err } -func (p *IClientRPCServiceExecuteRawDataQueryV2Result) String() string { +func (p *IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceExecuteRawDataQueryV2Result(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteFastLastDataQueryForOneDeviceV2Result(%+v)", *p) } // Attributes: // - Req -type IClientRPCServiceExecuteLastDataQueryV2Args struct { - Req *TSLastDataQueryReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceExecuteAggregationQueryV2Args struct { + Req *TSAggregationQueryReq `thrift:"req,1" db:"req" json:"req"` } -func NewIClientRPCServiceExecuteLastDataQueryV2Args() *IClientRPCServiceExecuteLastDataQueryV2Args { - return &IClientRPCServiceExecuteLastDataQueryV2Args{} +func NewIClientRPCServiceExecuteAggregationQueryV2Args() *IClientRPCServiceExecuteAggregationQueryV2Args { + return &IClientRPCServiceExecuteAggregationQueryV2Args{} } -var IClientRPCServiceExecuteLastDataQueryV2Args_Req_DEFAULT *TSLastDataQueryReq -func (p *IClientRPCServiceExecuteLastDataQueryV2Args) GetReq() *TSLastDataQueryReq { +var IClientRPCServiceExecuteAggregationQueryV2Args_Req_DEFAULT *TSAggregationQueryReq +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) GetReq() *TSAggregationQueryReq { if !p.IsSetReq() { - return IClientRPCServiceExecuteLastDataQueryV2Args_Req_DEFAULT + return IClientRPCServiceExecuteAggregationQueryV2Args_Req_DEFAULT } return p.Req } -func (p *IClientRPCServiceExecuteLastDataQueryV2Args) IsSetReq() bool { +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) IsSetReq() bool { return p.Req != nil } -func (p *IClientRPCServiceExecuteLastDataQueryV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { +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) } @@ -23892,16 +26344,16 @@ func (p *IClientRPCServiceExecuteLastDataQueryV2Args) Read(ctx context.Context, return nil } -func (p *IClientRPCServiceExecuteLastDataQueryV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSLastDataQueryReq{} +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) } return nil } -func (p *IClientRPCServiceExecuteLastDataQueryV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeLastDataQueryV2_args"); err != 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 } @@ -23913,7 +26365,7 @@ func (p *IClientRPCServiceExecuteLastDataQueryV2Args) Write(ctx context.Context, return nil } -func (p *IClientRPCServiceExecuteLastDataQueryV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +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 { @@ -23924,35 +26376,35 @@ func (p *IClientRPCServiceExecuteLastDataQueryV2Args) writeField1(ctx context.Co return err } -func (p *IClientRPCServiceExecuteLastDataQueryV2Args) String() string { +func (p *IClientRPCServiceExecuteAggregationQueryV2Args) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryV2Args(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryV2Args(%+v)", *p) } // Attributes: // - Success -type IClientRPCServiceExecuteLastDataQueryV2Result struct { +type IClientRPCServiceExecuteAggregationQueryV2Result struct { Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewIClientRPCServiceExecuteLastDataQueryV2Result() *IClientRPCServiceExecuteLastDataQueryV2Result { - return &IClientRPCServiceExecuteLastDataQueryV2Result{} +func NewIClientRPCServiceExecuteAggregationQueryV2Result() *IClientRPCServiceExecuteAggregationQueryV2Result { + return &IClientRPCServiceExecuteAggregationQueryV2Result{} } -var IClientRPCServiceExecuteLastDataQueryV2Result_Success_DEFAULT *TSExecuteStatementResp -func (p *IClientRPCServiceExecuteLastDataQueryV2Result) GetSuccess() *TSExecuteStatementResp { +var IClientRPCServiceExecuteAggregationQueryV2Result_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) GetSuccess() *TSExecuteStatementResp { if !p.IsSetSuccess() { - return IClientRPCServiceExecuteLastDataQueryV2Result_Success_DEFAULT + return IClientRPCServiceExecuteAggregationQueryV2Result_Success_DEFAULT } return p.Success } -func (p *IClientRPCServiceExecuteLastDataQueryV2Result) IsSetSuccess() bool { +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) IsSetSuccess() bool { return p.Success != nil } -func (p *IClientRPCServiceExecuteLastDataQueryV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { +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) } @@ -23990,7 +26442,7 @@ func (p *IClientRPCServiceExecuteLastDataQueryV2Result) Read(ctx context.Context return nil } -func (p *IClientRPCServiceExecuteLastDataQueryV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +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) @@ -23998,8 +26450,8 @@ func (p *IClientRPCServiceExecuteLastDataQueryV2Result) ReadField0(ctx context. return nil } -func (p *IClientRPCServiceExecuteLastDataQueryV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeLastDataQueryV2_result"); err != 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 } @@ -24011,7 +26463,7 @@ func (p *IClientRPCServiceExecuteLastDataQueryV2Result) Write(ctx context.Contex return nil } -func (p *IClientRPCServiceExecuteLastDataQueryV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +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) } @@ -24024,35 +26476,35 @@ func (p *IClientRPCServiceExecuteLastDataQueryV2Result) writeField0(ctx context. return err } -func (p *IClientRPCServiceExecuteLastDataQueryV2Result) String() string { +func (p *IClientRPCServiceExecuteAggregationQueryV2Result) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceExecuteLastDataQueryV2Result(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryV2Result(%+v)", *p) } // Attributes: // - Req -type IClientRPCServiceExecuteAggregationQueryV2Args struct { - Req *TSAggregationQueryReq `thrift:"req,1" db:"req" json:"req"` +type IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs struct { + Req *TSGroupByQueryIntervalReq `thrift:"req,1" db:"req" json:"req"` } -func NewIClientRPCServiceExecuteAggregationQueryV2Args() *IClientRPCServiceExecuteAggregationQueryV2Args { - return &IClientRPCServiceExecuteAggregationQueryV2Args{} +func NewIClientRPCServiceExecuteGroupByQueryIntervalQueryArgs() *IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs { + return &IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs{} } -var IClientRPCServiceExecuteAggregationQueryV2Args_Req_DEFAULT *TSAggregationQueryReq -func (p *IClientRPCServiceExecuteAggregationQueryV2Args) GetReq() *TSAggregationQueryReq { +var IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs_Req_DEFAULT *TSGroupByQueryIntervalReq +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs) GetReq() *TSGroupByQueryIntervalReq { if !p.IsSetReq() { - return IClientRPCServiceExecuteAggregationQueryV2Args_Req_DEFAULT + return IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs_Req_DEFAULT } return p.Req } -func (p *IClientRPCServiceExecuteAggregationQueryV2Args) IsSetReq() bool { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs) IsSetReq() bool { return p.Req != nil } -func (p *IClientRPCServiceExecuteAggregationQueryV2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs) 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) } @@ -24090,16 +26542,16 @@ func (p *IClientRPCServiceExecuteAggregationQueryV2Args) Read(ctx context.Contex return nil } -func (p *IClientRPCServiceExecuteAggregationQueryV2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { - p.Req = &TSAggregationQueryReq{} +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TSGroupByQueryIntervalReq{} 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 *IClientRPCServiceExecuteAggregationQueryV2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeAggregationQueryV2_args"); err != nil { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeGroupByQueryIntervalQuery_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 } @@ -24111,7 +26563,7 @@ func (p *IClientRPCServiceExecuteAggregationQueryV2Args) Write(ctx context.Conte return nil } -func (p *IClientRPCServiceExecuteAggregationQueryV2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs) 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 { @@ -24122,35 +26574,35 @@ func (p *IClientRPCServiceExecuteAggregationQueryV2Args) writeField1(ctx context return err } -func (p *IClientRPCServiceExecuteAggregationQueryV2Args) String() string { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryV2Args(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteGroupByQueryIntervalQueryArgs(%+v)", *p) } // Attributes: // - Success -type IClientRPCServiceExecuteAggregationQueryV2Result struct { +type IClientRPCServiceExecuteGroupByQueryIntervalQueryResult struct { Success *TSExecuteStatementResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewIClientRPCServiceExecuteAggregationQueryV2Result() *IClientRPCServiceExecuteAggregationQueryV2Result { - return &IClientRPCServiceExecuteAggregationQueryV2Result{} +func NewIClientRPCServiceExecuteGroupByQueryIntervalQueryResult() *IClientRPCServiceExecuteGroupByQueryIntervalQueryResult { + return &IClientRPCServiceExecuteGroupByQueryIntervalQueryResult{} } -var IClientRPCServiceExecuteAggregationQueryV2Result_Success_DEFAULT *TSExecuteStatementResp -func (p *IClientRPCServiceExecuteAggregationQueryV2Result) GetSuccess() *TSExecuteStatementResp { +var IClientRPCServiceExecuteGroupByQueryIntervalQueryResult_Success_DEFAULT *TSExecuteStatementResp +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryResult) GetSuccess() *TSExecuteStatementResp { if !p.IsSetSuccess() { - return IClientRPCServiceExecuteAggregationQueryV2Result_Success_DEFAULT + return IClientRPCServiceExecuteGroupByQueryIntervalQueryResult_Success_DEFAULT } return p.Success } -func (p *IClientRPCServiceExecuteAggregationQueryV2Result) IsSetSuccess() bool { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryResult) IsSetSuccess() bool { return p.Success != nil } -func (p *IClientRPCServiceExecuteAggregationQueryV2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryResult) 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) } @@ -24188,7 +26640,7 @@ func (p *IClientRPCServiceExecuteAggregationQueryV2Result) Read(ctx context.Cont return nil } -func (p *IClientRPCServiceExecuteAggregationQueryV2Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryResult) 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) @@ -24196,8 +26648,8 @@ func (p *IClientRPCServiceExecuteAggregationQueryV2Result) ReadField0(ctx conte return nil } -func (p *IClientRPCServiceExecuteAggregationQueryV2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "executeAggregationQueryV2_result"); err != nil { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "executeGroupByQueryIntervalQuery_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 } @@ -24209,7 +26661,7 @@ func (p *IClientRPCServiceExecuteAggregationQueryV2Result) Write(ctx context.Con return nil } -func (p *IClientRPCServiceExecuteAggregationQueryV2Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryResult) 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) } @@ -24222,11 +26674,11 @@ func (p *IClientRPCServiceExecuteAggregationQueryV2Result) writeField0(ctx conte return err } -func (p *IClientRPCServiceExecuteAggregationQueryV2Result) String() string { +func (p *IClientRPCServiceExecuteGroupByQueryIntervalQueryResult) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceExecuteAggregationQueryV2Result(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceExecuteGroupByQueryIntervalQueryResult(%+v)", *p) } // Attributes: @@ -27857,13 +30309,13 @@ func (p *IClientRPCServiceDeleteTimeseriesArgs) ReadField2(ctx context.Context, tSlice := make([]string, 0, size) p.Path = tSlice for i := 0; i < size; i ++ { -var _elem371 string +var _elem387 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem371 = v + _elem387 = v } - p.Path = append(p.Path, _elem371) + p.Path = append(p.Path, _elem387) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -28105,13 +30557,13 @@ func (p *IClientRPCServiceDeleteStorageGroupsArgs) ReadField2(ctx context.Conte tSlice := make([]string, 0, size) p.StorageGroup = tSlice for i := 0; i < size; i ++ { -var _elem372 string +var _elem388 string if v, err := iprot.ReadString(ctx); err != nil { return thrift.PrependError("error reading field 0: ", err) } else { - _elem372 = v + _elem388 = v } - p.StorageGroup = append(p.StorageGroup, _elem372) + p.StorageGroup = append(p.StorageGroup, _elem388) } if err := iprot.ReadListEnd(ctx); err != nil { return thrift.PrependError("error reading list end: ", err) @@ -29258,204 +31710,6 @@ func (p *IClientRPCServiceInsertRecordsResult) String() string { return fmt.Sprintf("IClientRPCServiceInsertRecordsResult(%+v)", *p) } -// Attributes: -// - Req -type IClientRPCServiceFastInsertRecordsArgs struct { - Req *TSFastInsertRecordsReq `thrift:"req,1" db:"req" json:"req"` -} - -func NewIClientRPCServiceFastInsertRecordsArgs() *IClientRPCServiceFastInsertRecordsArgs { - return &IClientRPCServiceFastInsertRecordsArgs{} -} - -var IClientRPCServiceFastInsertRecordsArgs_Req_DEFAULT *TSFastInsertRecordsReq -func (p *IClientRPCServiceFastInsertRecordsArgs) GetReq() *TSFastInsertRecordsReq { - if !p.IsSetReq() { - return IClientRPCServiceFastInsertRecordsArgs_Req_DEFAULT - } -return p.Req -} -func (p *IClientRPCServiceFastInsertRecordsArgs) IsSetReq() bool { - return p.Req != nil -} - -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) - } - - - 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 *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 *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 } - } - 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 *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 { - 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 *IClientRPCServiceFastInsertRecordsArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("IClientRPCServiceFastInsertRecordsArgs(%+v)", *p) -} - -// Attributes: -// - Success -type IClientRPCServiceFastInsertRecordsResult struct { - Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` -} - -func NewIClientRPCServiceFastInsertRecordsResult() *IClientRPCServiceFastInsertRecordsResult { - return &IClientRPCServiceFastInsertRecordsResult{} -} - -var IClientRPCServiceFastInsertRecordsResult_Success_DEFAULT *common.TSStatus -func (p *IClientRPCServiceFastInsertRecordsResult) GetSuccess() *common.TSStatus { - if !p.IsSetSuccess() { - return IClientRPCServiceFastInsertRecordsResult_Success_DEFAULT - } -return p.Success -} -func (p *IClientRPCServiceFastInsertRecordsResult) IsSetSuccess() bool { - return p.Success != nil -} - -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) - } - - - 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 *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 *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 } - } - 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 *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) } - 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 *IClientRPCServiceFastInsertRecordsResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("IClientRPCServiceFastInsertRecordsResult(%+v)", *p) -} - // Attributes: // - Req type IClientRPCServiceInsertRecordsOfOneDeviceArgs struct { @@ -33211,6 +35465,348 @@ func (p *IClientRPCServiceQuerySchemaTemplateResult) String() string { return fmt.Sprintf("IClientRPCServiceQuerySchemaTemplateResult(%+v)", *p) } +type IClientRPCServiceShowConfigurationTemplateArgs struct { +} + +func NewIClientRPCServiceShowConfigurationTemplateArgs() *IClientRPCServiceShowConfigurationTemplateArgs { + return &IClientRPCServiceShowConfigurationTemplateArgs{} +} + +func (p *IClientRPCServiceShowConfigurationTemplateArgs) 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; } + 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 *IClientRPCServiceShowConfigurationTemplateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "showConfigurationTemplate_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != 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 +} + +func (p *IClientRPCServiceShowConfigurationTemplateArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceShowConfigurationTemplateArgs(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServiceShowConfigurationTemplateResult struct { + Success *common.TShowConfigurationTemplateResp `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewIClientRPCServiceShowConfigurationTemplateResult() *IClientRPCServiceShowConfigurationTemplateResult { + return &IClientRPCServiceShowConfigurationTemplateResult{} +} + +var IClientRPCServiceShowConfigurationTemplateResult_Success_DEFAULT *common.TShowConfigurationTemplateResp +func (p *IClientRPCServiceShowConfigurationTemplateResult) GetSuccess() *common.TShowConfigurationTemplateResp { + if !p.IsSetSuccess() { + return IClientRPCServiceShowConfigurationTemplateResult_Success_DEFAULT + } +return p.Success +} +func (p *IClientRPCServiceShowConfigurationTemplateResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *IClientRPCServiceShowConfigurationTemplateResult) 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 *IClientRPCServiceShowConfigurationTemplateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TShowConfigurationTemplateResp{} + 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 *IClientRPCServiceShowConfigurationTemplateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "showConfigurationTemplate_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 *IClientRPCServiceShowConfigurationTemplateResult) 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 *IClientRPCServiceShowConfigurationTemplateResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceShowConfigurationTemplateResult(%+v)", *p) +} + +// Attributes: +// - NodeId +type IClientRPCServiceShowConfigurationArgs struct { + NodeId int32 `thrift:"nodeId,1" db:"nodeId" json:"nodeId"` +} + +func NewIClientRPCServiceShowConfigurationArgs() *IClientRPCServiceShowConfigurationArgs { + return &IClientRPCServiceShowConfigurationArgs{} +} + + +func (p *IClientRPCServiceShowConfigurationArgs) GetNodeId() int32 { + return p.NodeId +} +func (p *IClientRPCServiceShowConfigurationArgs) 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.I32 { + 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 *IClientRPCServiceShowConfigurationArgs) 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.NodeId = v +} + return nil +} + +func (p *IClientRPCServiceShowConfigurationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "showConfiguration_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 *IClientRPCServiceShowConfigurationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "nodeId", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:nodeId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.NodeId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.nodeId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:nodeId: ", p), err) } + return err +} + +func (p *IClientRPCServiceShowConfigurationArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceShowConfigurationArgs(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServiceShowConfigurationResult struct { + Success *common.TShowConfigurationResp `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewIClientRPCServiceShowConfigurationResult() *IClientRPCServiceShowConfigurationResult { + return &IClientRPCServiceShowConfigurationResult{} +} + +var IClientRPCServiceShowConfigurationResult_Success_DEFAULT *common.TShowConfigurationResp +func (p *IClientRPCServiceShowConfigurationResult) GetSuccess() *common.TShowConfigurationResp { + if !p.IsSetSuccess() { + return IClientRPCServiceShowConfigurationResult_Success_DEFAULT + } +return p.Success +} +func (p *IClientRPCServiceShowConfigurationResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *IClientRPCServiceShowConfigurationResult) 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 *IClientRPCServiceShowConfigurationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &common.TShowConfigurationResp{} + 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 *IClientRPCServiceShowConfigurationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "showConfiguration_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 *IClientRPCServiceShowConfigurationResult) 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 *IClientRPCServiceShowConfigurationResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceShowConfigurationResult(%+v)", *p) +} + // Attributes: // - Req type IClientRPCServiceSetSchemaTemplateArgs struct { @@ -34351,19 +36947,551 @@ func (p *IClientRPCServiceSendPipeDataResult) Read(ctx context.Context, iprot th return nil } -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) +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 *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 } + } + 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 *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) } + 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 *IClientRPCServiceSendPipeDataResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceSendPipeDataResult(%+v)", *p) +} + +// Attributes: +// - MetaInfo +// - Buff +type IClientRPCServiceSendFileArgs struct { + MetaInfo *TSyncTransportMetaInfo `thrift:"metaInfo,1" db:"metaInfo" json:"metaInfo"` + Buff []byte `thrift:"buff,2" db:"buff" json:"buff"` +} + +func NewIClientRPCServiceSendFileArgs() *IClientRPCServiceSendFileArgs { + return &IClientRPCServiceSendFileArgs{} +} + +var IClientRPCServiceSendFileArgs_MetaInfo_DEFAULT *TSyncTransportMetaInfo +func (p *IClientRPCServiceSendFileArgs) GetMetaInfo() *TSyncTransportMetaInfo { + if !p.IsSetMetaInfo() { + return IClientRPCServiceSendFileArgs_MetaInfo_DEFAULT + } +return p.MetaInfo +} + +func (p *IClientRPCServiceSendFileArgs) GetBuff() []byte { + return p.Buff +} +func (p *IClientRPCServiceSendFileArgs) IsSetMetaInfo() bool { + return p.MetaInfo != nil +} + +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) + } + + + 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 + } + } + 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 + } + } + 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 *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 *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.Buff = v +} + return 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 := 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 *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 1:metaInfo: ", p), err) } + return 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 2:buff: ", p), err) } + return err +} + +func (p *IClientRPCServiceSendFileArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceSendFileArgs(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServiceSendFileResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewIClientRPCServiceSendFileResult() *IClientRPCServiceSendFileResult { + return &IClientRPCServiceSendFileResult{} +} + +var IClientRPCServiceSendFileResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceSendFileResult) GetSuccess() *common.TSStatus { + if !p.IsSetSuccess() { + return IClientRPCServiceSendFileResult_Success_DEFAULT + } +return p.Success +} +func (p *IClientRPCServiceSendFileResult) IsSetSuccess() bool { + return p.Success != nil +} + +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) + } + + + 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 *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 *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 } + } + 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 *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) } + 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 *IClientRPCServiceSendFileResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServiceSendFileResult(%+v)", *p) +} + +// Attributes: +// - Req +type IClientRPCServicePipeTransferArgs struct { + Req *TPipeTransferReq +} + +func NewIClientRPCServicePipeTransferArgs() *IClientRPCServicePipeTransferArgs { + return &IClientRPCServicePipeTransferArgs{} +} + +var IClientRPCServicePipeTransferArgs_Req_DEFAULT *TPipeTransferReq +func (p *IClientRPCServicePipeTransferArgs) GetReq() *TPipeTransferReq { + if !p.IsSetReq() { + return IClientRPCServicePipeTransferArgs_Req_DEFAULT + } +return p.Req +} +func (p *IClientRPCServicePipeTransferArgs) IsSetReq() bool { + return p.Req != nil +} + +func (p *IClientRPCServicePipeTransferArgs) 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.ReadField_1(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 *IClientRPCServicePipeTransferArgs) ReadField_1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TPipeTransferReq{} + 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 *IClientRPCServicePipeTransferArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "pipeTransfer_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + 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) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *IClientRPCServicePipeTransferArgs) writeField_1(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 *IClientRPCServicePipeTransferArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServicePipeTransferArgs(%+v)", *p) +} + +// Attributes: +// - Success +type IClientRPCServicePipeTransferResult struct { + Success *TPipeTransferResp `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewIClientRPCServicePipeTransferResult() *IClientRPCServicePipeTransferResult { + return &IClientRPCServicePipeTransferResult{} +} + +var IClientRPCServicePipeTransferResult_Success_DEFAULT *TPipeTransferResp +func (p *IClientRPCServicePipeTransferResult) GetSuccess() *TPipeTransferResp { + if !p.IsSetSuccess() { + return IClientRPCServicePipeTransferResult_Success_DEFAULT + } +return p.Success +} +func (p *IClientRPCServicePipeTransferResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *IClientRPCServicePipeTransferResult) 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 *IClientRPCServicePipeTransferResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TPipeTransferResp{} + 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 *IClientRPCServicePipeTransferResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "pipeTransfer_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 *IClientRPCServicePipeTransferResult) 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 *IClientRPCServicePipeTransferResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServicePipeTransferResult(%+v)", *p) +} + +// Attributes: +// - Req +type IClientRPCServicePipeSubscribeArgs struct { + Req *TPipeSubscribeReq +} + +func NewIClientRPCServicePipeSubscribeArgs() *IClientRPCServicePipeSubscribeArgs { + return &IClientRPCServicePipeSubscribeArgs{} +} + +var IClientRPCServicePipeSubscribeArgs_Req_DEFAULT *TPipeSubscribeReq +func (p *IClientRPCServicePipeSubscribeArgs) GetReq() *TPipeSubscribeReq { + if !p.IsSetReq() { + return IClientRPCServicePipeSubscribeArgs_Req_DEFAULT + } +return p.Req +} +func (p *IClientRPCServicePipeSubscribeArgs) IsSetReq() bool { + return p.Req != nil +} + +func (p *IClientRPCServicePipeSubscribeArgs) 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.ReadField_1(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 *IClientRPCServicePipeSubscribeArgs) ReadField_1(ctx context.Context, iprot thrift.TProtocol) error { + p.Req = &TPipeSubscribeReq{} + 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 *IClientRPCServiceSendPipeDataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "sendPipeData_result"); err != nil { +func (p *IClientRPCServicePipeSubscribeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "pipeSubscribe_args"); 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 := p.writeField_1(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -34372,54 +37500,46 @@ func (p *IClientRPCServiceSendPipeDataResult) Write(ctx context.Context, oprot t return nil } -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) } - 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) } +func (p *IClientRPCServicePipeSubscribeArgs) writeField_1(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 *IClientRPCServiceSendPipeDataResult) String() string { +func (p *IClientRPCServicePipeSubscribeArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceSendPipeDataResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServicePipeSubscribeArgs(%+v)", *p) } // Attributes: -// - MetaInfo -// - Buff -type IClientRPCServiceSendFileArgs struct { - MetaInfo *TSyncTransportMetaInfo `thrift:"metaInfo,1" db:"metaInfo" json:"metaInfo"` - Buff []byte `thrift:"buff,2" db:"buff" json:"buff"` +// - Success +type IClientRPCServicePipeSubscribeResult struct { + Success *TPipeSubscribeResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewIClientRPCServiceSendFileArgs() *IClientRPCServiceSendFileArgs { - return &IClientRPCServiceSendFileArgs{} +func NewIClientRPCServicePipeSubscribeResult() *IClientRPCServicePipeSubscribeResult { + return &IClientRPCServicePipeSubscribeResult{} } -var IClientRPCServiceSendFileArgs_MetaInfo_DEFAULT *TSyncTransportMetaInfo -func (p *IClientRPCServiceSendFileArgs) GetMetaInfo() *TSyncTransportMetaInfo { - if !p.IsSetMetaInfo() { - return IClientRPCServiceSendFileArgs_MetaInfo_DEFAULT +var IClientRPCServicePipeSubscribeResult_Success_DEFAULT *TPipeSubscribeResp +func (p *IClientRPCServicePipeSubscribeResult) GetSuccess() *TPipeSubscribeResp { + if !p.IsSetSuccess() { + return IClientRPCServicePipeSubscribeResult_Success_DEFAULT } -return p.MetaInfo -} - -func (p *IClientRPCServiceSendFileArgs) GetBuff() []byte { - return p.Buff +return p.Success } -func (p *IClientRPCServiceSendFileArgs) IsSetMetaInfo() bool { - return p.MetaInfo != nil +func (p *IClientRPCServicePipeSubscribeResult) IsSetSuccess() bool { + return p.Success != nil } -func (p *IClientRPCServiceSendFileArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServicePipeSubscribeResult) 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) } @@ -34432,19 +37552,9 @@ func (p *IClientRPCServiceSendFileArgs) Read(ctx context.Context, iprot thrift.T } if fieldTypeId == thrift.STOP { break; } switch fieldId { - case 1: + case 0: 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 - } - } - case 2: - if fieldTypeId == thrift.STRING { - if err := p.ReadField2(ctx, iprot); err != nil { + if err := p.ReadField0(ctx, iprot); err != nil { return err } } else { @@ -34467,29 +37577,19 @@ func (p *IClientRPCServiceSendFileArgs) Read(ctx context.Context, iprot thrift.T return nil } -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) +func (p *IClientRPCServicePipeSubscribeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TPipeSubscribeResp{} + 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 *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.Buff = v -} - return nil -} - -func (p *IClientRPCServiceSendFileArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "sendFile_args"); err != nil { +func (p *IClientRPCServicePipeSubscribeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "pipeSubscribe_result"); 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.writeField0(ctx, oprot); err != nil { return err } } if err := oprot.WriteFieldStop(ctx); err != nil { return thrift.PrependError("write field stop error: ", err) } @@ -34498,56 +37598,99 @@ func (p *IClientRPCServiceSendFileArgs) Write(ctx context.Context, oprot thrift. return nil } -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) +func (p *IClientRPCServicePipeSubscribeResult) 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 := oprot.WriteFieldEnd(ctx); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:metaInfo: ", p), err) } return 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 2:buff: ", p), err) } - return err +func (p *IClientRPCServicePipeSubscribeResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("IClientRPCServicePipeSubscribeResult(%+v)", *p) } -func (p *IClientRPCServiceSendFileArgs) String() string { +type IClientRPCServiceGetBackupConfigurationArgs struct { +} + +func NewIClientRPCServiceGetBackupConfigurationArgs() *IClientRPCServiceGetBackupConfigurationArgs { + return &IClientRPCServiceGetBackupConfigurationArgs{} +} + +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) + } + + + 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; } + 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 *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 := 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 *IClientRPCServiceGetBackupConfigurationArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceSendFileArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceGetBackupConfigurationArgs(%+v)", *p) } // Attributes: // - Success -type IClientRPCServiceSendFileResult struct { - Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceGetBackupConfigurationResult struct { + Success *TSBackupConfigurationResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewIClientRPCServiceSendFileResult() *IClientRPCServiceSendFileResult { - return &IClientRPCServiceSendFileResult{} +func NewIClientRPCServiceGetBackupConfigurationResult() *IClientRPCServiceGetBackupConfigurationResult { + return &IClientRPCServiceGetBackupConfigurationResult{} } -var IClientRPCServiceSendFileResult_Success_DEFAULT *common.TSStatus -func (p *IClientRPCServiceSendFileResult) GetSuccess() *common.TSStatus { +var IClientRPCServiceGetBackupConfigurationResult_Success_DEFAULT *TSBackupConfigurationResp +func (p *IClientRPCServiceGetBackupConfigurationResult) GetSuccess() *TSBackupConfigurationResp { if !p.IsSetSuccess() { - return IClientRPCServiceSendFileResult_Success_DEFAULT + return IClientRPCServiceGetBackupConfigurationResult_Success_DEFAULT } return p.Success } -func (p *IClientRPCServiceSendFileResult) IsSetSuccess() bool { +func (p *IClientRPCServiceGetBackupConfigurationResult) IsSetSuccess() bool { return p.Success != nil } -func (p *IClientRPCServiceSendFileResult) 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) } @@ -34585,16 +37728,16 @@ func (p *IClientRPCServiceSendFileResult) Read(ctx context.Context, iprot thrift return nil } -func (p *IClientRPCServiceSendFileResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &common.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 *IClientRPCServiceSendFileResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "sendFile_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 } @@ -34606,7 +37749,7 @@ func (p *IClientRPCServiceSendFileResult) Write(ctx context.Context, oprot thrif return nil } -func (p *IClientRPCServiceSendFileResult) 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) } @@ -34619,21 +37762,21 @@ func (p *IClientRPCServiceSendFileResult) writeField0(ctx context.Context, oprot return err } -func (p *IClientRPCServiceSendFileResult) String() string { +func (p *IClientRPCServiceGetBackupConfigurationResult) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceSendFileResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceGetBackupConfigurationResult(%+v)", *p) } -type IClientRPCServiceGetBackupConfigurationArgs struct { +type IClientRPCServiceFetchAllConnectionsInfoArgs struct { } -func NewIClientRPCServiceGetBackupConfigurationArgs() *IClientRPCServiceGetBackupConfigurationArgs { - return &IClientRPCServiceGetBackupConfigurationArgs{} +func NewIClientRPCServiceFetchAllConnectionsInfoArgs() *IClientRPCServiceFetchAllConnectionsInfoArgs { + return &IClientRPCServiceFetchAllConnectionsInfoArgs{} } -func (p *IClientRPCServiceGetBackupConfigurationArgs) 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) } @@ -34658,8 +37801,8 @@ func (p *IClientRPCServiceGetBackupConfigurationArgs) Read(ctx context.Context, return nil } -func (p *IClientRPCServiceGetBackupConfigurationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getBackupConfiguration_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 { } @@ -34670,35 +37813,35 @@ func (p *IClientRPCServiceGetBackupConfigurationArgs) Write(ctx context.Context, return nil } -func (p *IClientRPCServiceGetBackupConfigurationArgs) String() string { +func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceGetBackupConfigurationArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFetchAllConnectionsInfoArgs(%+v)", *p) } // Attributes: // - Success -type IClientRPCServiceGetBackupConfigurationResult struct { - Success *TSBackupConfigurationResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceFetchAllConnectionsInfoResult struct { + Success *TSConnectionInfoResp `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewIClientRPCServiceGetBackupConfigurationResult() *IClientRPCServiceGetBackupConfigurationResult { - return &IClientRPCServiceGetBackupConfigurationResult{} +func NewIClientRPCServiceFetchAllConnectionsInfoResult() *IClientRPCServiceFetchAllConnectionsInfoResult { + return &IClientRPCServiceFetchAllConnectionsInfoResult{} } -var IClientRPCServiceGetBackupConfigurationResult_Success_DEFAULT *TSBackupConfigurationResp -func (p *IClientRPCServiceGetBackupConfigurationResult) GetSuccess() *TSBackupConfigurationResp { +var IClientRPCServiceFetchAllConnectionsInfoResult_Success_DEFAULT *TSConnectionInfoResp +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) GetSuccess() *TSConnectionInfoResp { if !p.IsSetSuccess() { - return IClientRPCServiceGetBackupConfigurationResult_Success_DEFAULT + return IClientRPCServiceFetchAllConnectionsInfoResult_Success_DEFAULT } return p.Success } -func (p *IClientRPCServiceGetBackupConfigurationResult) IsSetSuccess() bool { +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) IsSetSuccess() bool { return p.Success != nil } -func (p *IClientRPCServiceGetBackupConfigurationResult) 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) } @@ -34736,16 +37879,16 @@ func (p *IClientRPCServiceGetBackupConfigurationResult) Read(ctx context.Context return nil } -func (p *IClientRPCServiceGetBackupConfigurationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSBackupConfigurationResp{} +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 *IClientRPCServiceGetBackupConfigurationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "getBackupConfiguration_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 } @@ -34757,7 +37900,7 @@ func (p *IClientRPCServiceGetBackupConfigurationResult) Write(ctx context.Contex return nil } -func (p *IClientRPCServiceGetBackupConfigurationResult) 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) } @@ -34770,21 +37913,21 @@ func (p *IClientRPCServiceGetBackupConfigurationResult) writeField0(ctx context. return err } -func (p *IClientRPCServiceGetBackupConfigurationResult) String() string { +func (p *IClientRPCServiceFetchAllConnectionsInfoResult) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceGetBackupConfigurationResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceFetchAllConnectionsInfoResult(%+v)", *p) } -type IClientRPCServiceFetchAllConnectionsInfoArgs struct { +type IClientRPCServiceTestConnectionEmptyRPCArgs struct { } -func NewIClientRPCServiceFetchAllConnectionsInfoArgs() *IClientRPCServiceFetchAllConnectionsInfoArgs { - return &IClientRPCServiceFetchAllConnectionsInfoArgs{} +func NewIClientRPCServiceTestConnectionEmptyRPCArgs() *IClientRPCServiceTestConnectionEmptyRPCArgs { + return &IClientRPCServiceTestConnectionEmptyRPCArgs{} } -func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestConnectionEmptyRPCArgs) 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) } @@ -34809,8 +37952,8 @@ func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) Read(ctx context.Context, return nil } -func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "fetchAllConnectionsInfo_args"); err != nil { +func (p *IClientRPCServiceTestConnectionEmptyRPCArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testConnectionEmptyRPC_args"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if p != nil { } @@ -34821,35 +37964,35 @@ func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) Write(ctx context.Context return nil } -func (p *IClientRPCServiceFetchAllConnectionsInfoArgs) String() string { +func (p *IClientRPCServiceTestConnectionEmptyRPCArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceFetchAllConnectionsInfoArgs(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestConnectionEmptyRPCArgs(%+v)", *p) } // Attributes: // - Success -type IClientRPCServiceFetchAllConnectionsInfoResult struct { - Success *TSConnectionInfoResp `thrift:"success,0" db:"success" json:"success,omitempty"` +type IClientRPCServiceTestConnectionEmptyRPCResult struct { + Success *common.TSStatus `thrift:"success,0" db:"success" json:"success,omitempty"` } -func NewIClientRPCServiceFetchAllConnectionsInfoResult() *IClientRPCServiceFetchAllConnectionsInfoResult { - return &IClientRPCServiceFetchAllConnectionsInfoResult{} +func NewIClientRPCServiceTestConnectionEmptyRPCResult() *IClientRPCServiceTestConnectionEmptyRPCResult { + return &IClientRPCServiceTestConnectionEmptyRPCResult{} } -var IClientRPCServiceFetchAllConnectionsInfoResult_Success_DEFAULT *TSConnectionInfoResp -func (p *IClientRPCServiceFetchAllConnectionsInfoResult) GetSuccess() *TSConnectionInfoResp { +var IClientRPCServiceTestConnectionEmptyRPCResult_Success_DEFAULT *common.TSStatus +func (p *IClientRPCServiceTestConnectionEmptyRPCResult) GetSuccess() *common.TSStatus { if !p.IsSetSuccess() { - return IClientRPCServiceFetchAllConnectionsInfoResult_Success_DEFAULT + return IClientRPCServiceTestConnectionEmptyRPCResult_Success_DEFAULT } return p.Success } -func (p *IClientRPCServiceFetchAllConnectionsInfoResult) IsSetSuccess() bool { +func (p *IClientRPCServiceTestConnectionEmptyRPCResult) IsSetSuccess() bool { return p.Success != nil } -func (p *IClientRPCServiceFetchAllConnectionsInfoResult) Read(ctx context.Context, iprot thrift.TProtocol) error { +func (p *IClientRPCServiceTestConnectionEmptyRPCResult) 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) } @@ -34887,16 +38030,16 @@ func (p *IClientRPCServiceFetchAllConnectionsInfoResult) Read(ctx context.Contex return nil } -func (p *IClientRPCServiceFetchAllConnectionsInfoResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { - p.Success = &TSConnectionInfoResp{} +func (p *IClientRPCServiceTestConnectionEmptyRPCResult) 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 *IClientRPCServiceFetchAllConnectionsInfoResult) Write(ctx context.Context, oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin(ctx, "fetchAllConnectionsInfo_result"); err != nil { +func (p *IClientRPCServiceTestConnectionEmptyRPCResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "testConnectionEmptyRPC_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 } @@ -34908,7 +38051,7 @@ func (p *IClientRPCServiceFetchAllConnectionsInfoResult) Write(ctx context.Conte return nil } -func (p *IClientRPCServiceFetchAllConnectionsInfoResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { +func (p *IClientRPCServiceTestConnectionEmptyRPCResult) 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) } @@ -34921,11 +38064,11 @@ func (p *IClientRPCServiceFetchAllConnectionsInfoResult) writeField0(ctx context return err } -func (p *IClientRPCServiceFetchAllConnectionsInfoResult) String() string { +func (p *IClientRPCServiceTestConnectionEmptyRPCResult) String() string { if p == nil { return "" } - return fmt.Sprintf("IClientRPCServiceFetchAllConnectionsInfoResult(%+v)", *p) + return fmt.Sprintf("IClientRPCServiceTestConnectionEmptyRPCResult(%+v)", *p) }