diff --git a/admin/Admin.go b/admin/Admin.go index 39e2d69..f68ecc0 100644 --- a/admin/Admin.go +++ b/admin/Admin.go @@ -22,7 +22,7 @@ type Admin interface { ListTopics() ([]*topic.TopicInfo, error) ListTopicsByOrgId(orgId string) ([]*topic.Topic, error) ListTopicsInfo() ([]*topic.Topic, error) - LookupTopics(request *message.LookupTopicsRequest) (*message.LookupTopicsResponse, error) + LookupTopics(request *topic.LookupTopicsRequest) (*topic.LookupTopicsResponse, error) GetTopicOffset(request *message.GetTopicOffsetRequest) ([]*message.OffsetInfo, error) GetPartitionOffset(request *message.GetPartitionOffsetRequest) (*message.OffsetInfo, error) GetScheduleInfo(request *message.GetScheduleInfoRequest) (map[*topic.TopicAndPartition]string, error) diff --git a/admin/TalosAdmin.go b/admin/TalosAdmin.go index 378b2d1..ede1a5d 100644 --- a/admin/TalosAdmin.go +++ b/admin/TalosAdmin.go @@ -91,9 +91,9 @@ func (a *TalosAdmin) ListTopicsInfo() ([]*topic.Topic, error) { return listTopicsInfoResponse.GetTopicList(), err } -func (a *TalosAdmin) LookupTopics(request *message.LookupTopicsRequest) ( - *message.LookupTopicsResponse, error) { - return a.messageClient.LookupTopics(request) +func (a *TalosAdmin) LookupTopics(request *topic.LookupTopicsRequest) ( + *topic.LookupTopicsResponse, error) { + return a.topicClient.LookupTopics(request) } func (a *TalosAdmin) GetTopicOffset(request *message.GetTopicOffsetRequest) ( diff --git a/client/TalosClientFactory.go b/client/TalosClientFactory.go index f0d7d7d..29d0386 100644 --- a/client/TalosClientFactory.go +++ b/client/TalosClientFactory.go @@ -25,7 +25,7 @@ import ( "github.com/XiaoMi/talos-sdk-golang/thrift/thrift" ) -//interface for mock +// interface for mock type TalosClientFactoryInterface interface { NewTopicClient(url string) topic.TopicService NewMessageClient(url string) message.MessageService @@ -164,7 +164,6 @@ func (p *TopicClientProxy) CreateTopicGroup(request *topic.CreateTopicGroupReque client := topic.NewTopicServiceClientFactory(transport, thrift.NewTCompactProtocolFactory()) return client.CreateTopicGroup(request) - } func (p *TopicClientProxy) DescribeTopicGroup(request *topic.DescribeTopicGroupRequest) ( @@ -187,14 +186,40 @@ func (p *TopicClientProxy) DeleteTopicGroup( return client.DeleteTopicGroup(request) } -func (p *TopicClientProxy) ListTopicGroup(request *topic.ListTopicGroupRequest) ( - r *topic.ListTopicGroupResponse, err error) { +func (p *TopicClientProxy) UpdateTopicGroup(request *topic.UpdateTopicGroupRequest) (err error) { + transport := p.factory.GetTransportWithClockOffset(nil, + p.clockOffset, "type=updateTopicGroup") + defer transport.Close() + client := topic.NewTopicServiceClientFactory(transport, + thrift.NewTCompactProtocolFactory()) + return client.UpdateTopicGroup(request) +} + +func (p *TopicClientProxy) ListTopicGroup() (r *topic.ListTopicGroupResponse, err error) { transport := p.factory.GetTransportWithClockOffset(nil, p.clockOffset, "type=listTopicGroup") defer transport.Close() client := topic.NewTopicServiceClientFactory(transport, thrift.NewTCompactProtocolFactory()) - return client.ListTopicGroup(request) + return client.ListTopicGroup() +} + +func (p *TopicClientProxy) LookupTopics(request *topic.LookupTopicsRequest) (r *topic.LookupTopicsResponse, err error) { + transport := p.factory.GetTransportWithClockOffset(nil, + p.clockOffset, "type=lookupTopics") + defer transport.Close() + client := topic.NewTopicServiceClientFactory(transport, + thrift.NewTCompactProtocolFactory()) + return client.LookupTopics(request) +} + +func (p *TopicClientProxy) MatchTopics(request *topic.MatchTopicsRequest) (r *topic.MatchTopicsResponse, err error) { + transport := p.factory.GetTransportWithClockOffset(nil, + p.clockOffset, "type=matchTopics") + defer transport.Close() + client := topic.NewTopicServiceClientFactory(transport, + thrift.NewTCompactProtocolFactory()) + return client.MatchTopics(request) } func (p *TopicClientProxy) CreateReplicationTopic(request *topic.CreateReplicationTopicRequest) ( @@ -207,6 +232,15 @@ func (p *TopicClientProxy) CreateReplicationTopic(request *topic.CreateReplicati return client.CreateReplicationTopic(request) } +func (p *TopicClientProxy) ChangeReplicationTopicSourceInfo(request *topic.ChangeReplicationTopicSourceInfoRequest) (err error) { + transport := p.factory.GetTransportWithClockOffset(nil, + p.clockOffset, "type=changeReplicationTopicSourceInfo") + defer transport.Close() + client := topic.NewTopicServiceClientFactory(transport, + thrift.NewTCompactProtocolFactory()) + return client.ChangeReplicationTopicSourceInfo(request) +} + func (p *TopicClientProxy) GetTopicAttribute(request *topic.GetTopicAttributeRequest) ( r *topic.GetTopicAttributeResponse, err error) { transport := p.factory.GetTransportWithClockOffset(nil, @@ -217,6 +251,15 @@ func (p *TopicClientProxy) GetTopicAttribute(request *topic.GetTopicAttributeReq return client.GetTopicAttribute(request) } +func (p *TopicClientProxy) DeleteTopicAttribute(request *topic.DeleteTopicAttributeRequest) (err error) { + transport := p.factory.GetTransportWithClockOffset(nil, + p.clockOffset, "type=deleteTopicAttribute") + defer transport.Close() + client := topic.NewTopicServiceClientFactory(transport, + thrift.NewTCompactProtocolFactory()) + return client.DeleteTopicAttribute(request) +} + func (p *TopicClientProxy) GetServiceVersion() (r *common.Version, err error) { transport := p.factory.GetTransportWithClockOffset(nil, p.clockOffset, "type=getServerVersion") @@ -265,6 +308,15 @@ func (p *TopicClientProxy) ChangeTopicAttribute(request *topic. return client.ChangeTopicAttribute(request) } +func (p *TopicClientProxy) ChangeTopicOwnerInfo(request *topic.ChangeTopicOwnerInfoRequest) (err error) { + transport := p.factory.GetTransportWithClockOffset(nil, + p.clockOffset, "type=changeTopicOwnerInfo") + defer transport.Close() + client := topic.NewTopicServiceClientFactory(transport, + thrift.NewTCompactProtocolFactory()) + return client.ChangeTopicOwnerInfo(request) +} + func (p *TopicClientProxy) DescribeTopic(request *topic. DescribeTopicRequest) (r *topic.DescribeTopicResponse, err error) { transport := p.factory.GetTransportWithClockOffset(nil, @@ -400,6 +452,33 @@ type MessageClientProxy struct { clockOffset int64 } +func (p *MessageClientProxy) GetTopicCheckpoint(request *message.GetCheckpointRequest) (r *message.GetCheckpointResponse, err error) { + transport := p.factory.GetTransportWithClockOffset(nil, + p.clockOffset, "type=getTopicCheckpoint") + defer transport.Close() + client := message.NewMessageServiceClientFactory(transport, + thrift.NewTCompactProtocolFactory()) + return client.GetTopicCheckpoint(request) +} + +func (p *MessageClientProxy) GetPartitionCheckpoint(request *message.GetPartitionCheckpointRequest) (r *message.GetPartitionCheckpointResponse, err error) { + transport := p.factory.GetTransportWithClockOffset(nil, + p.clockOffset, "type=getPartitionCheckpoint") + defer transport.Close() + client := message.NewMessageServiceClientFactory(transport, + thrift.NewTCompactProtocolFactory()) + return client.GetPartitionCheckpoint(request) +} + +func (p *MessageClientProxy) DeleteMessageIndex(request *message.DeleteMessageIndexRequest) (err error) { + transport := p.factory.GetTransportWithClockOffset(nil, + p.clockOffset, "type=deleteMessageIndex") + defer transport.Close() + client := message.NewMessageServiceClientFactory(transport, + thrift.NewTCompactProtocolFactory()) + return client.DeleteMessageIndex(request) +} + func (p *MessageClientProxy) Prepare(request *message.PrepareRequest) ( r *message.PrepareResponse, err error) { transport := p.factory.GetTransportWithClockOffset(nil, @@ -440,16 +519,6 @@ func (p *MessageClientProxy) GetUnkownStateTransaction(request *message.GetUnkow return client.GetUnkownStateTransaction(request) } -func (p *MessageClientProxy) LookupTopics(request *message.LookupTopicsRequest) ( - r *message.LookupTopicsResponse, err error) { - transport := p.factory.GetTransportWithClockOffset(nil, - p.clockOffset, "type=lookupTopics") - defer transport.Close() - client := message.NewMessageServiceClientFactory(transport, - thrift.NewTCompactProtocolFactory()) - return client.LookupTopics(request) -} - func (p *MessageClientProxy) GetServiceVersion() (r *common.Version, err error) { transport := p.factory.GetTransportWithClockOffset(nil, p.clockOffset, "type=getServerVersion") @@ -536,35 +605,35 @@ type ConsumerClientProxy struct { clockOffset int64 } -func (p *ConsumerClientProxy) LockWorkerForMultiTopics(request *consumer.MultiTopicsLockWorkerRequest) (r *consumer.MultiTopicsLockWorkerResponse, err error) { +func (p *ConsumerClientProxy) LockWorkerForTopics(request *consumer.TopicsLockWorkerRequest) (r *consumer.TopicsLockWorkerResponse, err error) { transport := p.factory.GetTransportWithClockOffset(nil, - p.clockOffset, "type=lockWorkerForMultiTopics") + p.clockOffset, "type=lockWorkerForTopics") defer transport.Close() client := consumer.NewConsumerServiceClientFactory(transport, thrift.NewTCompactProtocolFactory()) - return client.LockWorkerForMultiTopics(request) + return client.LockWorkerForTopics(request) } func (p *ConsumerClientProxy) CheckRegister(request *consumer.CheckRegisterRequest) (r *consumer.CheckRegisterResponse, err error) { panic("implement me") } -func (p *ConsumerClientProxy) RenewForMultiTopics(request *consumer.MultiTopicsRenewRequest) (r *consumer.MultiTopicsRenewResponse, err error) { +func (p *ConsumerClientProxy) RenewForTopics(request *consumer.TopicsRenewRequest) (r *consumer.TopicsRenewResponse, err error) { transport := p.factory.GetTransportWithClockOffset(nil, - p.clockOffset, "type=renewForMultiTopics") + p.clockOffset, "type=renewForTopics") defer transport.Close() client := consumer.NewConsumerServiceClientFactory(transport, thrift.NewTCompactProtocolFactory()) - return client.RenewForMultiTopics(request) + return client.RenewForTopics(request) } -func (p *ConsumerClientProxy) QueryWorkerForMultiTopics(request *consumer.MultiTopicsQueryWorkerRequest) (r *consumer.MultiTopicsQueryWorkerResponse, err error) { +func (p *ConsumerClientProxy) QueryWorkerForTopics(request *consumer.TopicsQueryWorkerRequest) (r *consumer.TopicsQueryWorkerResponse, err error) { transport := p.factory.GetTransportWithClockOffset(nil, - p.clockOffset, "type=queryWorkerForMultiTopics") + p.clockOffset, "type=queryWorkerForTopics") defer transport.Close() client := consumer.NewConsumerServiceClientFactory(transport, thrift.NewTCompactProtocolFactory()) - return client.QueryWorkerForMultiTopics(request) + return client.QueryWorkerForTopics(request) } func (p *ConsumerClientProxy) DeleteConsumerGroup(request *consumer.DeleteConsumerGroupRequest) (err error) { diff --git a/consumer/TalosTopicsConsumer.go b/consumer/TalosTopicsConsumer.go index c458edf..9801cd3 100644 --- a/consumer/TalosTopicsConsumer.go +++ b/consumer/TalosTopicsConsumer.go @@ -18,7 +18,6 @@ import ( "github.com/XiaoMi/talos-sdk-golang/client" "github.com/XiaoMi/talos-sdk-golang/thrift/auth" "github.com/XiaoMi/talos-sdk-golang/thrift/consumer" - "github.com/XiaoMi/talos-sdk-golang/thrift/message" "github.com/XiaoMi/talos-sdk-golang/thrift/topic" "github.com/XiaoMi/talos-sdk-golang/utils" "github.com/sirupsen/logrus" @@ -76,11 +75,11 @@ type TalosTopicsConsumer struct { log *logrus.Logger } -func NewTalosMultiTopicsConsumerByProperties(properties *utils.Properties, +func NewTalosTopicsConsumerByProperties(properties *utils.Properties, messageProcessorFactory MessageProcessorFactory, abnormalCallback client.TopicAbnormalCallback) (*TalosTopicsConsumer, error) { - topicPattern := properties.Get("galaxy.talos.topic.pattern") + topicGroup := properties.Get("galaxy.talos.topic.group") consumerGroupName := properties.Get("galaxy.talos.group.name") clientIdPrefix := properties.Get("galaxy.talos.client.prefix") secretKeyId := properties.Get("galaxy.talos.access.key") @@ -94,17 +93,17 @@ func NewTalosMultiTopicsConsumerByProperties(properties *utils.Properties, } consumerConfig := NewTalosConsumerConfigByProperties(properties) - return NewDefaultTalosMultiTopicsConsumer(consumerGroupName, consumerConfig, credential, - topicPattern, NewTalosMessageReaderFactory(), messageProcessorFactory, + return NewDefaultTalosTopicsConsumer(consumerGroupName, consumerConfig, credential, + topicGroup, NewTalosMessageReaderFactory(), messageProcessorFactory, clientIdPrefix, abnormalCallback, make(map[*topic.TopicAndPartition]Long, 0), utils.InitLogger()) } -func NewTalosMultiTopicsConsumerByFilename(propertyFilename string, +func NewTalosTopicsConsumerByFilename(propertyFilename string, messageProcessorFactory MessageProcessorFactory, abnormalCallback client.TopicAbnormalCallback) (*TalosTopicsConsumer, error) { props := utils.LoadProperties(propertyFilename) - topicName := props.Get("galaxy.talos.topic.name") + topicGroup := props.Get("galaxy.talos.topic.group") consumerGroupName := props.Get("galaxy.talos.group.name") clientIdPrefix := props.Get("galaxy.talos.client.prefix") secretKeyId := props.Get("galaxy.talos.access.key") @@ -118,12 +117,12 @@ func NewTalosMultiTopicsConsumerByFilename(propertyFilename string, } consumerConfig := NewTalosConsumerConfigByProperties(props) - return NewDefaultTalosMultiTopicsConsumer(consumerGroupName, consumerConfig, credential, - topicName, NewTalosMessageReaderFactory(), messageProcessorFactory, + return NewDefaultTalosTopicsConsumer(consumerGroupName, consumerConfig, credential, + topicGroup, NewTalosMessageReaderFactory(), messageProcessorFactory, clientIdPrefix, abnormalCallback, make(map[*topic.TopicAndPartition]Long, 0), utils.InitLogger()) } -func NewTalosMultiTopicsConsumerWithLogger(propertyFilename string, +func NewTalosTopicsConsumerWithLogger(propertyFilename string, messageProcessorFactory MessageProcessorFactory, abnormalCallback client.TopicAbnormalCallback, logger *logrus.Logger) (*TalosTopicsConsumer, error) { @@ -142,21 +141,21 @@ func NewTalosMultiTopicsConsumerWithLogger(propertyFilename string, } consumerConfig := NewTalosConsumerConfigByProperties(props) - return NewDefaultTalosMultiTopicsConsumer(consumerGroupName, consumerConfig, credential, + return NewDefaultTalosTopicsConsumer(consumerGroupName, consumerConfig, credential, topicGroup, NewTalosMessageReaderFactory(), messageProcessorFactory, clientIdPrefix, abnormalCallback, make(map[*topic.TopicAndPartition]Long, 0), logger) } -func NewTalosMultiTopicsConsumer(consumerGroupName string, consumerConfig *TalosConsumerConfig, - credential *auth.Credential, topicName string, +func NewTalosTopicsConsumer(consumerGroupName string, consumerConfig *TalosConsumerConfig, + credential *auth.Credential, topicGroup string, messageProcessorFactory MessageProcessorFactory, clientIdPrefix string, abnormalCallback client.TopicAbnormalCallback, logger *logrus.Logger) (*TalosTopicsConsumer, error) { - return NewDefaultTalosMultiTopicsConsumer(consumerGroupName, consumerConfig, credential, - topicName, NewTalosMessageReaderFactory(), messageProcessorFactory, + return NewDefaultTalosTopicsConsumer(consumerGroupName, consumerConfig, credential, + topicGroup, NewTalosMessageReaderFactory(), messageProcessorFactory, clientIdPrefix, abnormalCallback, make(map[*topic.TopicAndPartition]Long, 0), logger) } -func NewDefaultTalosMultiTopicsConsumer(consumerGroupName string, consumerConfig *TalosConsumerConfig, +func NewDefaultTalosTopicsConsumer(consumerGroupName string, consumerConfig *TalosConsumerConfig, credential *auth.Credential, topicGroupName string, messageReaderFactory *TalosMessageReaderFactory, messageProcessorFactory MessageProcessorFactory, clientIdPrefix string, @@ -255,17 +254,17 @@ func NewDefaultTalosMultiTopicsConsumer(consumerGroupName string, consumerConfig } func (c *TalosTopicsConsumer) getTopicAndScheduleInfo() error { - response, err := c.talosAdmin.LookupTopics(&message.LookupTopicsRequest{TopicGroup: c.topicGroup}) + response, err := c.talosAdmin.LookupTopics(&topic.LookupTopicsRequest{TopicGroup: c.topicGroup}) if err != nil { return err } if len(response.Topics) == 0 { - return fmt.Errorf("no authorized topics match topic pattern: %s", c.topicPattern) + return fmt.Errorf("no authorized topics in topic group: %s", c.topicGroup) } c.setTopics(response.Topics) - c.log.Infof("The worker: %s check and get topic info done", c.workerId) + c.log.Infof("The worker: %s check and get topics info done", c.workerId) return nil } @@ -290,18 +289,18 @@ func (c *TalosTopicsConsumer) getTopicAndScheduleInfoByList(topicList []string) } func (c *TalosTopicsConsumer) registerSelf() error { - lockWorkerRequest := &consumer.MultiTopicsLockWorkerRequest{ + lockWorkerRequest := &consumer.TopicsLockWorkerRequest{ ConsumerGroup: c.consumerGroup, Topics: c.topicList, WorkerId: c.workerId, } - lockWorkerResponse := consumer.NewMultiTopicsLockWorkerResponse() + lockWorkerResponse := consumer.NewTopicsLockWorkerResponse() var err error tryCount := c.talosConsumerConfig.GetSelfRegisterMaxRetry() + 1 for tryCount > 0 { tryCount-- - lockWorkerResponse, err = c.consumerClient.LockWorkerForMultiTopics(lockWorkerRequest) + lockWorkerResponse, err = c.consumerClient.LockWorkerForTopics(lockWorkerRequest) if err != nil { continue } @@ -317,11 +316,11 @@ func (c *TalosTopicsConsumer) registerSelf() error { } func (c *TalosTopicsConsumer) getWorkerInfo() error { - queryWorkerRequest := &consumer.MultiTopicsQueryWorkerRequest{ + queryWorkerRequest := &consumer.TopicsQueryWorkerRequest{ ConsumerGroup: c.consumerGroup, TopicTalosResourceNames: c.topicList, } - queryWorkerResponse, err := c.consumerClient.QueryWorkerForMultiTopics(queryWorkerRequest) + queryWorkerResponse, err := c.consumerClient.QueryWorkerForTopics(queryWorkerRequest) if err != nil { return err } @@ -721,19 +720,8 @@ func (c *TalosTopicsConsumer) initConsumerMonitorTask() { * if topics number or partition number of any single topic change, invoke ReBalanceTask */ func (c *TalosTopicsConsumer) CheckTopicPatternTask() { - topicAndPartition := new(topic.TopicAndPartition) - if len(c.topicList) == 0 { - topicAndPartition = nil - } else { - topicName, _ := utils.GetTopicNameByResourceName(c.topicList[0].TopicTalosResourceName) - topicAndPartition = &topic.TopicAndPartition{ - TopicName: topicName, - TopicTalosResourceName: c.topicList[0], - PartitionId: 0, - } - } - response, err := c.scheduleInfoCache.GetOrCreateMessageClient(topicAndPartition).LookupTopics( - &message.LookupTopicsRequest{TopicGroup: c.topicGroup}) + response, err := c.talosAdmin.LookupTopics( + &topic.LookupTopicsRequest{TopicGroup: c.topicGroup}) if err != nil { c.log.Errorf("Exception in CheckTopicsTask: %s", err.Error()) return @@ -807,20 +795,20 @@ func (c *TalosTopicsConsumer) ReBalanceTask() { */ func (c *TalosTopicsConsumer) ReNewTask() { toRenewPartitionList := c.getRenewPartitionList() - consumeUnit := &consumer.MultiTopicsConsumeUnit{ + consumeUnit := &consumer.TopicsConsumeUnit{ ConsumerGroup: c.consumerGroup, TopicPartitions: toRenewPartitionList, WorkerId: c.workerId, } - renewRequest := &consumer.MultiTopicsRenewRequest{ConsumeUnit: consumeUnit} - var renewResponse *consumer.MultiTopicsRenewResponse + renewRequest := &consumer.TopicsRenewRequest{ConsumeUnit: consumeUnit} + var renewResponse *consumer.TopicsRenewResponse var err error // plus 1 to include the first renew operation maxRetry := c.talosConsumerConfig.GetRenewMaxRetry() + 1 for maxRetry > 0 { maxRetry-- - renewResponse, err = c.consumerClient.RenewForMultiTopics(renewRequest) + renewResponse, err = c.consumerClient.RenewForTopics(renewRequest) if err != nil { c.log.Errorf("Worker: %s renew error: %s", c.workerId, err.Error()) continue diff --git a/example/talos_topics_consumer/TalosTopicsConsumerDemo.go b/example/talos_topics_consumer/TalosTopicsConsumerDemo.go index 14ecb60..2c78361 100644 --- a/example/talos_topics_consumer/TalosTopicsConsumerDemo.go +++ b/example/talos_topics_consumer/TalosTopicsConsumerDemo.go @@ -63,20 +63,20 @@ func main() { galaxy.talos.service.endpoint=$talosServiceURI */ var propertyFilename string - flag.StringVar(&propertyFilename, "conf", "talosConsumer.txt", "conf: talosConsumer.txt'") + flag.StringVar(&propertyFilename, "conf", "talosTopicsConsumer.conf", "conf: talosTopicsConsumer.conf'") flag.Parse() // init talosConsumer - talosConsumer, err := consumer.NewTalosMultiTopicsConsumerWithLogger(propertyFilename, NewMyMessageProcessorFactory(log), + talosConsumer, err := consumer.NewTalosTopicsConsumerWithLogger(propertyFilename, NewMyMessageProcessorFactory(log), client.NewSimpleTopicAbnormalCallback(), log) if err != nil { - log.Errorf("init talosMultiTopicsConsumer failed: %s", err.Error()) + log.Errorf("init talosTopicsConsumer failed: %s", err.Error()) return } go func() { time.Sleep(5 * time.Second) - // talosConsumer.ShutDown() + talosConsumer.ShutDown() }() // block main function diff --git a/example/talos_topics_consumer/talosTopicsConsumer.conf b/example/talos_topics_consumer/talosTopicsConsumer.conf new file mode 100644 index 0000000..864c3d5 --- /dev/null +++ b/example/talos_topics_consumer/talosTopicsConsumer.conf @@ -0,0 +1,39 @@ +############################################################### +# 【请注意】所有的 value 值都不要加双引号"", 请仿照e.g.以及Wiki链接填写 +############################################################### + +# Talos域名 # Talos集群名字 +# 请参见 Wiki 集群信息 + +galaxy.talos.service.endpoint= + +galaxy.talos.topic.group= + +galaxy.talos.access.key= + +galaxy.talos.access.secret= + +# client的前缀(部门缩写) +# e.g. galaxy.talos.client.prefix=departmentName- + +galaxy.talos.client.prefix=departmentName- + +# consumer的groupName +# e.g. galaxy.talos.group.name=groupName + +galaxy.talos.group.name=groupName + +# 用户启动TalosConsumer的时候选择是否重置Offset +# 该项配置表示TalosConsumer启动时是否重置offset,取值空间为{true, false},默认值是false,即不重置 +# 如果需要从StartOffset,而不是LastCommitOffset读取消息,需要将whether.reset.offset改为true,同时把reset.offset.value改为-1 +# 如果需要从EndOffset读取消息,需要将whether.reset.offset改为true,同时把reset.offset.value改为-2 + +galaxy.talos.consumer.start.whether.reset.offset=false + +# 用户启动TalosConsumer的时候选择读取消息的Offset +# 该项配置有两个取值:-1,-2;分别表示从当前Partition的StartOffset和EndOffset开始读取消息,默认取值是-1 + +galaxy.talos.consumer.start.reset.offset.value=-1 + +# 如果需要talos自动进行commit,该项配置保持默认即可 +galaxy.talos.consumer.checkpoint.auto.commit=true diff --git a/thrift/consumer/consumer_service-remote/consumer_service-remote.go b/thrift/consumer/consumer_service-remote/consumer_service-remote.go old mode 100755 new mode 100644 index d6d71c5..32de01a --- a/thrift/consumer/consumer_service-remote/consumer_service-remote.go +++ b/thrift/consumer/consumer_service-remote/consumer_service-remote.go @@ -23,15 +23,15 @@ func Usage() { fmt.Fprintln(os.Stderr, "\nFunctions:") fmt.Fprintln(os.Stderr, " LockPartitionResponse lockPartition(LockPartitionRequest request)") fmt.Fprintln(os.Stderr, " LockWorkerResponse lockWorker(LockWorkerRequest request)") - fmt.Fprintln(os.Stderr, " MultiTopicsLockWorkerResponse lockWorkerForMultiTopics(MultiTopicsLockWorkerRequest request)") + fmt.Fprintln(os.Stderr, " TopicsLockWorkerResponse lockWorkerForTopics(TopicsLockWorkerRequest request)") fmt.Fprintln(os.Stderr, " CheckRegisterResponse checkRegister(CheckRegisterRequest request)") fmt.Fprintln(os.Stderr, " void unlockPartition(UnlockPartitionRequest request)") fmt.Fprintln(os.Stderr, " RenewResponse renew(RenewRequest request)") - fmt.Fprintln(os.Stderr, " MultiTopicsRenewResponse renewForMultiTopics(MultiTopicsRenewRequest request)") + fmt.Fprintln(os.Stderr, " TopicsRenewResponse renewForTopics(TopicsRenewRequest request)") fmt.Fprintln(os.Stderr, " UpdateOffsetResponse updateOffset(UpdateOffsetRequest request)") fmt.Fprintln(os.Stderr, " QueryOffsetResponse queryOffset(QueryOffsetRequest request)") fmt.Fprintln(os.Stderr, " QueryWorkerResponse queryWorker(QueryWorkerRequest request)") - fmt.Fprintln(os.Stderr, " MultiTopicsQueryWorkerResponse queryWorkerForMultiTopics(MultiTopicsQueryWorkerRequest request)") + fmt.Fprintln(os.Stderr, " TopicsQueryWorkerResponse queryWorkerForTopics(TopicsQueryWorkerRequest request)") fmt.Fprintln(os.Stderr, " QueryOrgOffsetResponse queryOrgOffset(QueryOrgOffsetRequest request)") fmt.Fprintln(os.Stderr, " GetWorkerIdResponse getWorkerId(GetWorkerIdRequest request)") fmt.Fprintln(os.Stderr, " void deleteConsumerGroup(DeleteConsumerGroupRequest request)") @@ -181,9 +181,9 @@ func main() { fmt.Print(client.LockWorker(value0)) fmt.Print("\n") break - case "lockWorkerForMultiTopics": + case "lockWorkerForTopics": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "LockWorkerForMultiTopics requires 1 args") + fmt.Fprintln(os.Stderr, "LockWorkerForTopics requires 1 args") flag.Usage() } arg59 := flag.Arg(1) @@ -196,14 +196,14 @@ func main() { } factory62 := thrift.NewTSimpleJSONProtocolFactory() jsProt63 := factory62.GetProtocol(mbTrans60) - argvalue0 := consumer.NewMultiTopicsLockWorkerRequest() + argvalue0 := consumer.NewTopicsLockWorkerRequest() err64 := argvalue0.Read(jsProt63) if err64 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.LockWorkerForMultiTopics(value0)) + fmt.Print(client.LockWorkerForTopics(value0)) fmt.Print("\n") break case "checkRegister": @@ -281,9 +281,9 @@ func main() { fmt.Print(client.Renew(value0)) fmt.Print("\n") break - case "renewForMultiTopics": + case "renewForTopics": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "RenewForMultiTopics requires 1 args") + fmt.Fprintln(os.Stderr, "RenewForTopics requires 1 args") flag.Usage() } arg83 := flag.Arg(1) @@ -296,14 +296,14 @@ func main() { } factory86 := thrift.NewTSimpleJSONProtocolFactory() jsProt87 := factory86.GetProtocol(mbTrans84) - argvalue0 := consumer.NewMultiTopicsRenewRequest() + argvalue0 := consumer.NewTopicsRenewRequest() err88 := argvalue0.Read(jsProt87) if err88 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.RenewForMultiTopics(value0)) + fmt.Print(client.RenewForTopics(value0)) fmt.Print("\n") break case "updateOffset": @@ -381,9 +381,9 @@ func main() { fmt.Print(client.QueryWorker(value0)) fmt.Print("\n") break - case "queryWorkerForMultiTopics": + case "queryWorkerForTopics": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "QueryWorkerForMultiTopics requires 1 args") + fmt.Fprintln(os.Stderr, "QueryWorkerForTopics requires 1 args") flag.Usage() } arg107 := flag.Arg(1) @@ -396,14 +396,14 @@ func main() { } factory110 := thrift.NewTSimpleJSONProtocolFactory() jsProt111 := factory110.GetProtocol(mbTrans108) - argvalue0 := consumer.NewMultiTopicsQueryWorkerRequest() + argvalue0 := consumer.NewTopicsQueryWorkerRequest() err112 := argvalue0.Read(jsProt111) if err112 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.QueryWorkerForMultiTopics(value0)) + fmt.Print(client.QueryWorkerForTopics(value0)) fmt.Print("\n") break case "queryOrgOffset": diff --git a/thrift/consumer/consumerservice.go b/thrift/consumer/consumerservice.go index be2c008..a665879 100644 --- a/thrift/consumer/consumerservice.go +++ b/thrift/consumer/consumerservice.go @@ -40,7 +40,7 @@ type ConsumerService interface { // // Parameters: // - Request - LockWorkerForMultiTopics(request *MultiTopicsLockWorkerRequest) (r *MultiTopicsLockWorkerResponse, err error) + LockWorkerForTopics(request *TopicsLockWorkerRequest) (r *TopicsLockWorkerResponse, err error) // check if worker can register // // @@ -64,7 +64,7 @@ type ConsumerService interface { // // Parameters: // - Request - RenewForMultiTopics(request *MultiTopicsRenewRequest) (r *MultiTopicsRenewResponse, err error) + RenewForTopics(request *TopicsRenewRequest) (r *TopicsRenewResponse, err error) // update offset for a consuming consumeUnit task // // @@ -88,7 +88,7 @@ type ConsumerService interface { // // Parameters: // - Request - QueryWorkerForMultiTopics(request *MultiTopicsQueryWorkerRequest) (r *MultiTopicsQueryWorkerResponse, err error) + QueryWorkerForTopics(request *TopicsQueryWorkerRequest) (r *TopicsQueryWorkerResponse, err error) // query consumer group and partition offset // // @@ -123,9 +123,8 @@ func NewConsumerServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtoco // lock a consume unit for specified worker // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) LockPartition(request *LockPartitionRequest) (r *LockPartitionResponse, err error) { if err = p.sendLockPartition(request); err != nil { return @@ -199,9 +198,8 @@ func (p *ConsumerServiceClient) recvLockPartition() (value *LockPartitionRespons // lock a worker heartbeat // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) LockWorker(request *LockWorkerRequest) (r *LockWorkerResponse, err error) { if err = p.sendLockWorker(request); err != nil { return @@ -275,27 +273,26 @@ func (p *ConsumerServiceClient) recvLockWorker() (value *LockWorkerResponse, err // lock a worker heartbeat for multi topics // -// // Parameters: -// - Request -func (p *ConsumerServiceClient) LockWorkerForMultiTopics(request *MultiTopicsLockWorkerRequest) (r *MultiTopicsLockWorkerResponse, err error) { - if err = p.sendLockWorkerForMultiTopics(request); err != nil { +// - Request +func (p *ConsumerServiceClient) LockWorkerForTopics(request *TopicsLockWorkerRequest) (r *TopicsLockWorkerResponse, err error) { + if err = p.sendLockWorkerForTopics(request); err != nil { return } - return p.recvLockWorkerForMultiTopics() + return p.recvLockWorkerForTopics() } -func (p *ConsumerServiceClient) sendLockWorkerForMultiTopics(request *MultiTopicsLockWorkerRequest) (err error) { +func (p *ConsumerServiceClient) sendLockWorkerForTopics(request *TopicsLockWorkerRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("lockWorkerForMultiTopics", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("lockWorkerForTopics", thrift.CALL, p.SeqId); err != nil { return } - args := LockWorkerForMultiTopicsArgs{ + args := LockWorkerForTopicsArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -307,7 +304,7 @@ func (p *ConsumerServiceClient) sendLockWorkerForMultiTopics(request *MultiTopic return oprot.Flush() } -func (p *ConsumerServiceClient) recvLockWorkerForMultiTopics() (value *MultiTopicsLockWorkerResponse, err error) { +func (p *ConsumerServiceClient) recvLockWorkerForTopics() (value *TopicsLockWorkerResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -331,10 +328,10 @@ func (p *ConsumerServiceClient) recvLockWorkerForMultiTopics() (value *MultiTopi return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "lockWorkerForMultiTopics failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "lockWorkerForTopics failed: out of sequence response") return } - result := LockWorkerForMultiTopicsResult{} + result := LockWorkerForTopicsResult{} if err = result.Read(iprot); err != nil { return } @@ -351,9 +348,8 @@ func (p *ConsumerServiceClient) recvLockWorkerForMultiTopics() (value *MultiTopi // check if worker can register // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) CheckRegister(request *CheckRegisterRequest) (r *CheckRegisterResponse, err error) { if err = p.sendCheckRegister(request); err != nil { return @@ -427,9 +423,8 @@ func (p *ConsumerServiceClient) recvCheckRegister() (value *CheckRegisterRespons // unlock a consume unit for specified worker // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) UnlockPartition(request *UnlockPartitionRequest) (err error) { if err = p.sendUnlockPartition(request); err != nil { return @@ -502,9 +497,8 @@ func (p *ConsumerServiceClient) recvUnlockPartition() (err error) { // renew worker heartbeat and serving partitions // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) Renew(request *RenewRequest) (r *RenewResponse, err error) { if err = p.sendRenew(request); err != nil { return @@ -578,27 +572,26 @@ func (p *ConsumerServiceClient) recvRenew() (value *RenewResponse, err error) { // renew worker heartbeat and serving partitions for multi topics // -// // Parameters: -// - Request -func (p *ConsumerServiceClient) RenewForMultiTopics(request *MultiTopicsRenewRequest) (r *MultiTopicsRenewResponse, err error) { - if err = p.sendRenewForMultiTopics(request); err != nil { +// - Request +func (p *ConsumerServiceClient) RenewForTopics(request *TopicsRenewRequest) (r *TopicsRenewResponse, err error) { + if err = p.sendRenewForTopics(request); err != nil { return } - return p.recvRenewForMultiTopics() + return p.recvRenewForTopics() } -func (p *ConsumerServiceClient) sendRenewForMultiTopics(request *MultiTopicsRenewRequest) (err error) { +func (p *ConsumerServiceClient) sendRenewForTopics(request *TopicsRenewRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("renewForMultiTopics", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("renewForTopics", thrift.CALL, p.SeqId); err != nil { return } - args := RenewForMultiTopicsArgs{ + args := RenewForTopicsArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -610,7 +603,7 @@ func (p *ConsumerServiceClient) sendRenewForMultiTopics(request *MultiTopicsRene return oprot.Flush() } -func (p *ConsumerServiceClient) recvRenewForMultiTopics() (value *MultiTopicsRenewResponse, err error) { +func (p *ConsumerServiceClient) recvRenewForTopics() (value *TopicsRenewResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -634,10 +627,10 @@ func (p *ConsumerServiceClient) recvRenewForMultiTopics() (value *MultiTopicsRen return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "renewForMultiTopics failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "renewForTopics failed: out of sequence response") return } - result := RenewForMultiTopicsResult{} + result := RenewForTopicsResult{} if err = result.Read(iprot); err != nil { return } @@ -654,9 +647,8 @@ func (p *ConsumerServiceClient) recvRenewForMultiTopics() (value *MultiTopicsRen // update offset for a consuming consumeUnit task // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) UpdateOffset(request *UpdateOffsetRequest) (r *UpdateOffsetResponse, err error) { if err = p.sendUpdateOffset(request); err != nil { return @@ -730,9 +722,8 @@ func (p *ConsumerServiceClient) recvUpdateOffset() (value *UpdateOffsetResponse, // query offset for a consumed consumeUnit task // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) QueryOffset(request *QueryOffsetRequest) (r *QueryOffsetResponse, err error) { if err = p.sendQueryOffset(request); err != nil { return @@ -806,9 +797,8 @@ func (p *ConsumerServiceClient) recvQueryOffset() (value *QueryOffsetResponse, e // query worker for a consuming topic by specified consumer group // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) QueryWorker(request *QueryWorkerRequest) (r *QueryWorkerResponse, err error) { if err = p.sendQueryWorker(request); err != nil { return @@ -882,27 +872,26 @@ func (p *ConsumerServiceClient) recvQueryWorker() (value *QueryWorkerResponse, e // query worker for a consuming topic by specified consumer group for multi topics // -// // Parameters: -// - Request -func (p *ConsumerServiceClient) QueryWorkerForMultiTopics(request *MultiTopicsQueryWorkerRequest) (r *MultiTopicsQueryWorkerResponse, err error) { - if err = p.sendQueryWorkerForMultiTopics(request); err != nil { +// - Request +func (p *ConsumerServiceClient) QueryWorkerForTopics(request *TopicsQueryWorkerRequest) (r *TopicsQueryWorkerResponse, err error) { + if err = p.sendQueryWorkerForTopics(request); err != nil { return } - return p.recvQueryWorkerForMultiTopics() + return p.recvQueryWorkerForTopics() } -func (p *ConsumerServiceClient) sendQueryWorkerForMultiTopics(request *MultiTopicsQueryWorkerRequest) (err error) { +func (p *ConsumerServiceClient) sendQueryWorkerForTopics(request *TopicsQueryWorkerRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("queryWorkerForMultiTopics", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("queryWorkerForTopics", thrift.CALL, p.SeqId); err != nil { return } - args := QueryWorkerForMultiTopicsArgs{ + args := QueryWorkerForTopicsArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -914,7 +903,7 @@ func (p *ConsumerServiceClient) sendQueryWorkerForMultiTopics(request *MultiTopi return oprot.Flush() } -func (p *ConsumerServiceClient) recvQueryWorkerForMultiTopics() (value *MultiTopicsQueryWorkerResponse, err error) { +func (p *ConsumerServiceClient) recvQueryWorkerForTopics() (value *TopicsQueryWorkerResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -938,10 +927,10 @@ func (p *ConsumerServiceClient) recvQueryWorkerForMultiTopics() (value *MultiTop return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "queryWorkerForMultiTopics failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "queryWorkerForTopics failed: out of sequence response") return } - result := QueryWorkerForMultiTopicsResult{} + result := QueryWorkerForTopicsResult{} if err = result.Read(iprot); err != nil { return } @@ -958,9 +947,8 @@ func (p *ConsumerServiceClient) recvQueryWorkerForMultiTopics() (value *MultiTop // query consumer group and partition offset // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) QueryOrgOffset(request *QueryOrgOffsetRequest) (r *QueryOrgOffsetResponse, err error) { if err = p.sendQueryOrgOffset(request); err != nil { return @@ -1034,9 +1022,8 @@ func (p *ConsumerServiceClient) recvQueryOrgOffset() (value *QueryOrgOffsetRespo // Get workerId // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) GetWorkerId(request *GetWorkerIdRequest) (r *GetWorkerIdResponse, err error) { if err = p.sendGetWorkerId(request); err != nil { return @@ -1110,9 +1097,8 @@ func (p *ConsumerServiceClient) recvGetWorkerId() (value *GetWorkerIdResponse, e // Delete consumerGroup for specific topic // -// // Parameters: -// - Request +// - Request func (p *ConsumerServiceClient) DeleteConsumerGroup(request *DeleteConsumerGroupRequest) (err error) { if err = p.sendDeleteConsumerGroup(request); err != nil { return @@ -1191,15 +1177,15 @@ func NewConsumerServiceProcessor(handler ConsumerService) *ConsumerServiceProces self46 := &ConsumerServiceProcessor{common.NewTalosBaseServiceProcessor(handler)} self46.AddToProcessorMap("lockPartition", &consumerServiceProcessorLockPartition{handler: handler}) self46.AddToProcessorMap("lockWorker", &consumerServiceProcessorLockWorker{handler: handler}) - self46.AddToProcessorMap("lockWorkerForMultiTopics", &consumerServiceProcessorLockWorkerForMultiTopics{handler: handler}) + self46.AddToProcessorMap("lockWorkerForTopics", &consumerServiceProcessorLockWorkerForTopics{handler: handler}) self46.AddToProcessorMap("checkRegister", &consumerServiceProcessorCheckRegister{handler: handler}) self46.AddToProcessorMap("unlockPartition", &consumerServiceProcessorUnlockPartition{handler: handler}) self46.AddToProcessorMap("renew", &consumerServiceProcessorRenew{handler: handler}) - self46.AddToProcessorMap("renewForMultiTopics", &consumerServiceProcessorRenewForMultiTopics{handler: handler}) + self46.AddToProcessorMap("renewForTopics", &consumerServiceProcessorRenewForTopics{handler: handler}) self46.AddToProcessorMap("updateOffset", &consumerServiceProcessorUpdateOffset{handler: handler}) self46.AddToProcessorMap("queryOffset", &consumerServiceProcessorQueryOffset{handler: handler}) self46.AddToProcessorMap("queryWorker", &consumerServiceProcessorQueryWorker{handler: handler}) - self46.AddToProcessorMap("queryWorkerForMultiTopics", &consumerServiceProcessorQueryWorkerForMultiTopics{handler: handler}) + self46.AddToProcessorMap("queryWorkerForTopics", &consumerServiceProcessorQueryWorkerForTopics{handler: handler}) self46.AddToProcessorMap("queryOrgOffset", &consumerServiceProcessorQueryOrgOffset{handler: handler}) self46.AddToProcessorMap("getWorkerId", &consumerServiceProcessorGetWorkerId{handler: handler}) self46.AddToProcessorMap("deleteConsumerGroup", &consumerServiceProcessorDeleteConsumerGroup{handler: handler}) @@ -1312,16 +1298,16 @@ func (p *consumerServiceProcessorLockWorker) Process(seqId int32, iprot, oprot t return true, err } -type consumerServiceProcessorLockWorkerForMultiTopics struct { +type consumerServiceProcessorLockWorkerForTopics struct { handler ConsumerService } -func (p *consumerServiceProcessorLockWorkerForMultiTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := LockWorkerForMultiTopicsArgs{} +func (p *consumerServiceProcessorLockWorkerForTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := LockWorkerForTopicsArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("lockWorkerForMultiTopics", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("lockWorkerForTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -1329,16 +1315,16 @@ func (p *consumerServiceProcessorLockWorkerForMultiTopics) Process(seqId int32, } iprot.ReadMessageEnd() - result := LockWorkerForMultiTopicsResult{} - var retval *MultiTopicsLockWorkerResponse + result := LockWorkerForTopicsResult{} + var retval *TopicsLockWorkerResponse var err2 error - if retval, err2 = p.handler.LockWorkerForMultiTopics(args.Request); err2 != nil { + if retval, err2 = p.handler.LockWorkerForTopics(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing lockWorkerForMultiTopics: "+err2.Error()) - oprot.WriteMessageBegin("lockWorkerForMultiTopics", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing lockWorkerForTopics: "+err2.Error()) + oprot.WriteMessageBegin("lockWorkerForTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -1347,7 +1333,7 @@ func (p *consumerServiceProcessorLockWorkerForMultiTopics) Process(seqId int32, } else { result.Success = retval } - if err2 = oprot.WriteMessageBegin("lockWorkerForMultiTopics", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("lockWorkerForTopics", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -1521,16 +1507,16 @@ func (p *consumerServiceProcessorRenew) Process(seqId int32, iprot, oprot thrift return true, err } -type consumerServiceProcessorRenewForMultiTopics struct { +type consumerServiceProcessorRenewForTopics struct { handler ConsumerService } -func (p *consumerServiceProcessorRenewForMultiTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := RenewForMultiTopicsArgs{} +func (p *consumerServiceProcessorRenewForTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := RenewForTopicsArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("renewForMultiTopics", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("renewForTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -1538,16 +1524,16 @@ func (p *consumerServiceProcessorRenewForMultiTopics) Process(seqId int32, iprot } iprot.ReadMessageEnd() - result := RenewForMultiTopicsResult{} - var retval *MultiTopicsRenewResponse + result := RenewForTopicsResult{} + var retval *TopicsRenewResponse var err2 error - if retval, err2 = p.handler.RenewForMultiTopics(args.Request); err2 != nil { + if retval, err2 = p.handler.RenewForTopics(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing renewForMultiTopics: "+err2.Error()) - oprot.WriteMessageBegin("renewForMultiTopics", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing renewForTopics: "+err2.Error()) + oprot.WriteMessageBegin("renewForTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -1556,7 +1542,7 @@ func (p *consumerServiceProcessorRenewForMultiTopics) Process(seqId int32, iprot } else { result.Success = retval } - if err2 = oprot.WriteMessageBegin("renewForMultiTopics", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("renewForTopics", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -1733,16 +1719,16 @@ func (p *consumerServiceProcessorQueryWorker) Process(seqId int32, iprot, oprot return true, err } -type consumerServiceProcessorQueryWorkerForMultiTopics struct { +type consumerServiceProcessorQueryWorkerForTopics struct { handler ConsumerService } -func (p *consumerServiceProcessorQueryWorkerForMultiTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := QueryWorkerForMultiTopicsArgs{} +func (p *consumerServiceProcessorQueryWorkerForTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := QueryWorkerForTopicsArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("queryWorkerForMultiTopics", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("queryWorkerForTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -1750,16 +1736,16 @@ func (p *consumerServiceProcessorQueryWorkerForMultiTopics) Process(seqId int32, } iprot.ReadMessageEnd() - result := QueryWorkerForMultiTopicsResult{} - var retval *MultiTopicsQueryWorkerResponse + result := QueryWorkerForTopicsResult{} + var retval *TopicsQueryWorkerResponse var err2 error - if retval, err2 = p.handler.QueryWorkerForMultiTopics(args.Request); err2 != nil { + if retval, err2 = p.handler.QueryWorkerForTopics(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing queryWorkerForMultiTopics: "+err2.Error()) - oprot.WriteMessageBegin("queryWorkerForMultiTopics", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing queryWorkerForTopics: "+err2.Error()) + oprot.WriteMessageBegin("queryWorkerForTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -1768,7 +1754,7 @@ func (p *consumerServiceProcessorQueryWorkerForMultiTopics) Process(seqId int32, } else { result.Success = retval } - if err2 = oprot.WriteMessageBegin("queryWorkerForMultiTopics", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("queryWorkerForTopics", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2420,27 +2406,27 @@ func (p *LockWorkerResult) String() string { return fmt.Sprintf("LockWorkerResult(%+v)", *p) } -type LockWorkerForMultiTopicsArgs struct { - Request *MultiTopicsLockWorkerRequest `thrift:"request,1" json:"request"` +type LockWorkerForTopicsArgs struct { + Request *TopicsLockWorkerRequest `thrift:"request,1" json:"request"` } -func NewLockWorkerForMultiTopicsArgs() *LockWorkerForMultiTopicsArgs { - return &LockWorkerForMultiTopicsArgs{} +func NewLockWorkerForTopicsArgs() *LockWorkerForTopicsArgs { + return &LockWorkerForTopicsArgs{} } -var LockWorkerForMultiTopicsArgs_Request_DEFAULT *MultiTopicsLockWorkerRequest +var LockWorkerForTopicsArgs_Request_DEFAULT *TopicsLockWorkerRequest -func (p *LockWorkerForMultiTopicsArgs) GetRequest() *MultiTopicsLockWorkerRequest { +func (p *LockWorkerForTopicsArgs) GetRequest() *TopicsLockWorkerRequest { if !p.IsSetRequest() { - return LockWorkerForMultiTopicsArgs_Request_DEFAULT + return LockWorkerForTopicsArgs_Request_DEFAULT } return p.Request } -func (p *LockWorkerForMultiTopicsArgs) IsSetRequest() bool { +func (p *LockWorkerForTopicsArgs) IsSetRequest() bool { return p.Request != nil } -func (p *LockWorkerForMultiTopicsArgs) Read(iprot thrift.TProtocol) error { +func (p *LockWorkerForTopicsArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -2472,16 +2458,16 @@ func (p *LockWorkerForMultiTopicsArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *LockWorkerForMultiTopicsArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &MultiTopicsLockWorkerRequest{} +func (p *LockWorkerForTopicsArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &TopicsLockWorkerRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *LockWorkerForMultiTopicsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("lockWorkerForMultiTopics_args"); err != nil { +func (p *LockWorkerForTopicsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("lockWorkerForTopics_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -2496,7 +2482,7 @@ func (p *LockWorkerForMultiTopicsArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *LockWorkerForMultiTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *LockWorkerForTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -2509,48 +2495,48 @@ func (p *LockWorkerForMultiTopicsArgs) writeField1(oprot thrift.TProtocol) (err return err } -func (p *LockWorkerForMultiTopicsArgs) String() string { +func (p *LockWorkerForTopicsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("LockWorkerForMultiTopicsArgs(%+v)", *p) + return fmt.Sprintf("LockWorkerForTopicsArgs(%+v)", *p) } -type LockWorkerForMultiTopicsResult struct { - Success *MultiTopicsLockWorkerResponse `thrift:"success,0" json:"success"` - E *common.GalaxyTalosException `thrift:"e,1" json:"e"` +type LockWorkerForTopicsResult struct { + Success *TopicsLockWorkerResponse `thrift:"success,0" json:"success"` + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -func NewLockWorkerForMultiTopicsResult() *LockWorkerForMultiTopicsResult { - return &LockWorkerForMultiTopicsResult{} +func NewLockWorkerForTopicsResult() *LockWorkerForTopicsResult { + return &LockWorkerForTopicsResult{} } -var LockWorkerForMultiTopicsResult_Success_DEFAULT *MultiTopicsLockWorkerResponse +var LockWorkerForTopicsResult_Success_DEFAULT *TopicsLockWorkerResponse -func (p *LockWorkerForMultiTopicsResult) GetSuccess() *MultiTopicsLockWorkerResponse { +func (p *LockWorkerForTopicsResult) GetSuccess() *TopicsLockWorkerResponse { if !p.IsSetSuccess() { - return LockWorkerForMultiTopicsResult_Success_DEFAULT + return LockWorkerForTopicsResult_Success_DEFAULT } return p.Success } -var LockWorkerForMultiTopicsResult_E_DEFAULT *common.GalaxyTalosException +var LockWorkerForTopicsResult_E_DEFAULT *common.GalaxyTalosException -func (p *LockWorkerForMultiTopicsResult) GetE() *common.GalaxyTalosException { +func (p *LockWorkerForTopicsResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return LockWorkerForMultiTopicsResult_E_DEFAULT + return LockWorkerForTopicsResult_E_DEFAULT } return p.E } -func (p *LockWorkerForMultiTopicsResult) IsSetSuccess() bool { +func (p *LockWorkerForTopicsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *LockWorkerForMultiTopicsResult) IsSetE() bool { +func (p *LockWorkerForTopicsResult) IsSetE() bool { return p.E != nil } -func (p *LockWorkerForMultiTopicsResult) Read(iprot thrift.TProtocol) error { +func (p *LockWorkerForTopicsResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -2586,15 +2572,15 @@ func (p *LockWorkerForMultiTopicsResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *LockWorkerForMultiTopicsResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = &MultiTopicsLockWorkerResponse{} +func (p *LockWorkerForTopicsResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &TopicsLockWorkerResponse{} if err := p.Success.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Success, err) } return nil } -func (p *LockWorkerForMultiTopicsResult) ReadField1(iprot thrift.TProtocol) error { +func (p *LockWorkerForTopicsResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -2602,8 +2588,8 @@ func (p *LockWorkerForMultiTopicsResult) ReadField1(iprot thrift.TProtocol) erro return nil } -func (p *LockWorkerForMultiTopicsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("lockWorkerForMultiTopics_result"); err != nil { +func (p *LockWorkerForTopicsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("lockWorkerForTopics_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField0(oprot); err != nil { @@ -2621,7 +2607,7 @@ func (p *LockWorkerForMultiTopicsResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *LockWorkerForMultiTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *LockWorkerForTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) @@ -2636,7 +2622,7 @@ func (p *LockWorkerForMultiTopicsResult) writeField0(oprot thrift.TProtocol) (er return err } -func (p *LockWorkerForMultiTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *LockWorkerForTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -2651,11 +2637,11 @@ func (p *LockWorkerForMultiTopicsResult) writeField1(oprot thrift.TProtocol) (er return err } -func (p *LockWorkerForMultiTopicsResult) String() string { +func (p *LockWorkerForTopicsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("LockWorkerForMultiTopicsResult(%+v)", *p) + return fmt.Sprintf("LockWorkerForTopicsResult(%+v)", *p) } type CheckRegisterArgs struct { @@ -3328,27 +3314,27 @@ func (p *RenewResult) String() string { return fmt.Sprintf("RenewResult(%+v)", *p) } -type RenewForMultiTopicsArgs struct { - Request *MultiTopicsRenewRequest `thrift:"request,1" json:"request"` +type RenewForTopicsArgs struct { + Request *TopicsRenewRequest `thrift:"request,1" json:"request"` } -func NewRenewForMultiTopicsArgs() *RenewForMultiTopicsArgs { - return &RenewForMultiTopicsArgs{} +func NewRenewForTopicsArgs() *RenewForTopicsArgs { + return &RenewForTopicsArgs{} } -var RenewForMultiTopicsArgs_Request_DEFAULT *MultiTopicsRenewRequest +var RenewForTopicsArgs_Request_DEFAULT *TopicsRenewRequest -func (p *RenewForMultiTopicsArgs) GetRequest() *MultiTopicsRenewRequest { +func (p *RenewForTopicsArgs) GetRequest() *TopicsRenewRequest { if !p.IsSetRequest() { - return RenewForMultiTopicsArgs_Request_DEFAULT + return RenewForTopicsArgs_Request_DEFAULT } return p.Request } -func (p *RenewForMultiTopicsArgs) IsSetRequest() bool { +func (p *RenewForTopicsArgs) IsSetRequest() bool { return p.Request != nil } -func (p *RenewForMultiTopicsArgs) Read(iprot thrift.TProtocol) error { +func (p *RenewForTopicsArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3380,16 +3366,16 @@ func (p *RenewForMultiTopicsArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *RenewForMultiTopicsArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &MultiTopicsRenewRequest{} +func (p *RenewForTopicsArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &TopicsRenewRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *RenewForMultiTopicsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("renewForMultiTopics_args"); err != nil { +func (p *RenewForTopicsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("renewForTopics_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3404,7 +3390,7 @@ func (p *RenewForMultiTopicsArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *RenewForMultiTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *RenewForTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -3417,48 +3403,48 @@ func (p *RenewForMultiTopicsArgs) writeField1(oprot thrift.TProtocol) (err error return err } -func (p *RenewForMultiTopicsArgs) String() string { +func (p *RenewForTopicsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("RenewForMultiTopicsArgs(%+v)", *p) + return fmt.Sprintf("RenewForTopicsArgs(%+v)", *p) } -type RenewForMultiTopicsResult struct { - Success *MultiTopicsRenewResponse `thrift:"success,0" json:"success"` +type RenewForTopicsResult struct { + Success *TopicsRenewResponse `thrift:"success,0" json:"success"` E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -func NewRenewForMultiTopicsResult() *RenewForMultiTopicsResult { - return &RenewForMultiTopicsResult{} +func NewRenewForTopicsResult() *RenewForTopicsResult { + return &RenewForTopicsResult{} } -var RenewForMultiTopicsResult_Success_DEFAULT *MultiTopicsRenewResponse +var RenewForTopicsResult_Success_DEFAULT *TopicsRenewResponse -func (p *RenewForMultiTopicsResult) GetSuccess() *MultiTopicsRenewResponse { +func (p *RenewForTopicsResult) GetSuccess() *TopicsRenewResponse { if !p.IsSetSuccess() { - return RenewForMultiTopicsResult_Success_DEFAULT + return RenewForTopicsResult_Success_DEFAULT } return p.Success } -var RenewForMultiTopicsResult_E_DEFAULT *common.GalaxyTalosException +var RenewForTopicsResult_E_DEFAULT *common.GalaxyTalosException -func (p *RenewForMultiTopicsResult) GetE() *common.GalaxyTalosException { +func (p *RenewForTopicsResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return RenewForMultiTopicsResult_E_DEFAULT + return RenewForTopicsResult_E_DEFAULT } return p.E } -func (p *RenewForMultiTopicsResult) IsSetSuccess() bool { +func (p *RenewForTopicsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *RenewForMultiTopicsResult) IsSetE() bool { +func (p *RenewForTopicsResult) IsSetE() bool { return p.E != nil } -func (p *RenewForMultiTopicsResult) Read(iprot thrift.TProtocol) error { +func (p *RenewForTopicsResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3494,15 +3480,15 @@ func (p *RenewForMultiTopicsResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *RenewForMultiTopicsResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = &MultiTopicsRenewResponse{} +func (p *RenewForTopicsResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &TopicsRenewResponse{} if err := p.Success.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Success, err) } return nil } -func (p *RenewForMultiTopicsResult) ReadField1(iprot thrift.TProtocol) error { +func (p *RenewForTopicsResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -3510,8 +3496,8 @@ func (p *RenewForMultiTopicsResult) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *RenewForMultiTopicsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("renewForMultiTopics_result"); err != nil { +func (p *RenewForTopicsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("renewForTopics_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField0(oprot); err != nil { @@ -3529,7 +3515,7 @@ func (p *RenewForMultiTopicsResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *RenewForMultiTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *RenewForTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) @@ -3544,7 +3530,7 @@ func (p *RenewForMultiTopicsResult) writeField0(oprot thrift.TProtocol) (err err return err } -func (p *RenewForMultiTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *RenewForTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -3559,11 +3545,11 @@ func (p *RenewForMultiTopicsResult) writeField1(oprot thrift.TProtocol) (err err return err } -func (p *RenewForMultiTopicsResult) String() string { +func (p *RenewForTopicsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("RenewForMultiTopicsResult(%+v)", *p) + return fmt.Sprintf("RenewForTopicsResult(%+v)", *p) } type UpdateOffsetArgs struct { @@ -4280,27 +4266,27 @@ func (p *QueryWorkerResult) String() string { return fmt.Sprintf("QueryWorkerResult(%+v)", *p) } -type QueryWorkerForMultiTopicsArgs struct { - Request *MultiTopicsQueryWorkerRequest `thrift:"request,1" json:"request"` +type QueryWorkerForTopicsArgs struct { + Request *TopicsQueryWorkerRequest `thrift:"request,1" json:"request"` } -func NewQueryWorkerForMultiTopicsArgs() *QueryWorkerForMultiTopicsArgs { - return &QueryWorkerForMultiTopicsArgs{} +func NewQueryWorkerForTopicsArgs() *QueryWorkerForTopicsArgs { + return &QueryWorkerForTopicsArgs{} } -var QueryWorkerForMultiTopicsArgs_Request_DEFAULT *MultiTopicsQueryWorkerRequest +var QueryWorkerForTopicsArgs_Request_DEFAULT *TopicsQueryWorkerRequest -func (p *QueryWorkerForMultiTopicsArgs) GetRequest() *MultiTopicsQueryWorkerRequest { +func (p *QueryWorkerForTopicsArgs) GetRequest() *TopicsQueryWorkerRequest { if !p.IsSetRequest() { - return QueryWorkerForMultiTopicsArgs_Request_DEFAULT + return QueryWorkerForTopicsArgs_Request_DEFAULT } return p.Request } -func (p *QueryWorkerForMultiTopicsArgs) IsSetRequest() bool { +func (p *QueryWorkerForTopicsArgs) IsSetRequest() bool { return p.Request != nil } -func (p *QueryWorkerForMultiTopicsArgs) Read(iprot thrift.TProtocol) error { +func (p *QueryWorkerForTopicsArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4332,16 +4318,16 @@ func (p *QueryWorkerForMultiTopicsArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *QueryWorkerForMultiTopicsArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &MultiTopicsQueryWorkerRequest{} +func (p *QueryWorkerForTopicsArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &TopicsQueryWorkerRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *QueryWorkerForMultiTopicsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("queryWorkerForMultiTopics_args"); err != nil { +func (p *QueryWorkerForTopicsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("queryWorkerForTopics_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4356,7 +4342,7 @@ func (p *QueryWorkerForMultiTopicsArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *QueryWorkerForMultiTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *QueryWorkerForTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -4369,48 +4355,48 @@ func (p *QueryWorkerForMultiTopicsArgs) writeField1(oprot thrift.TProtocol) (err return err } -func (p *QueryWorkerForMultiTopicsArgs) String() string { +func (p *QueryWorkerForTopicsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("QueryWorkerForMultiTopicsArgs(%+v)", *p) + return fmt.Sprintf("QueryWorkerForTopicsArgs(%+v)", *p) } -type QueryWorkerForMultiTopicsResult struct { - Success *MultiTopicsQueryWorkerResponse `thrift:"success,0" json:"success"` - E *common.GalaxyTalosException `thrift:"e,1" json:"e"` +type QueryWorkerForTopicsResult struct { + Success *TopicsQueryWorkerResponse `thrift:"success,0" json:"success"` + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -func NewQueryWorkerForMultiTopicsResult() *QueryWorkerForMultiTopicsResult { - return &QueryWorkerForMultiTopicsResult{} +func NewQueryWorkerForTopicsResult() *QueryWorkerForTopicsResult { + return &QueryWorkerForTopicsResult{} } -var QueryWorkerForMultiTopicsResult_Success_DEFAULT *MultiTopicsQueryWorkerResponse +var QueryWorkerForTopicsResult_Success_DEFAULT *TopicsQueryWorkerResponse -func (p *QueryWorkerForMultiTopicsResult) GetSuccess() *MultiTopicsQueryWorkerResponse { +func (p *QueryWorkerForTopicsResult) GetSuccess() *TopicsQueryWorkerResponse { if !p.IsSetSuccess() { - return QueryWorkerForMultiTopicsResult_Success_DEFAULT + return QueryWorkerForTopicsResult_Success_DEFAULT } return p.Success } -var QueryWorkerForMultiTopicsResult_E_DEFAULT *common.GalaxyTalosException +var QueryWorkerForTopicsResult_E_DEFAULT *common.GalaxyTalosException -func (p *QueryWorkerForMultiTopicsResult) GetE() *common.GalaxyTalosException { +func (p *QueryWorkerForTopicsResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return QueryWorkerForMultiTopicsResult_E_DEFAULT + return QueryWorkerForTopicsResult_E_DEFAULT } return p.E } -func (p *QueryWorkerForMultiTopicsResult) IsSetSuccess() bool { +func (p *QueryWorkerForTopicsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *QueryWorkerForMultiTopicsResult) IsSetE() bool { +func (p *QueryWorkerForTopicsResult) IsSetE() bool { return p.E != nil } -func (p *QueryWorkerForMultiTopicsResult) Read(iprot thrift.TProtocol) error { +func (p *QueryWorkerForTopicsResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4446,15 +4432,15 @@ func (p *QueryWorkerForMultiTopicsResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *QueryWorkerForMultiTopicsResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = &MultiTopicsQueryWorkerResponse{} +func (p *QueryWorkerForTopicsResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &TopicsQueryWorkerResponse{} if err := p.Success.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Success, err) } return nil } -func (p *QueryWorkerForMultiTopicsResult) ReadField1(iprot thrift.TProtocol) error { +func (p *QueryWorkerForTopicsResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -4462,8 +4448,8 @@ func (p *QueryWorkerForMultiTopicsResult) ReadField1(iprot thrift.TProtocol) err return nil } -func (p *QueryWorkerForMultiTopicsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("queryWorkerForMultiTopics_result"); err != nil { +func (p *QueryWorkerForTopicsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("queryWorkerForTopics_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField0(oprot); err != nil { @@ -4481,7 +4467,7 @@ func (p *QueryWorkerForMultiTopicsResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *QueryWorkerForMultiTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *QueryWorkerForTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) @@ -4496,7 +4482,7 @@ func (p *QueryWorkerForMultiTopicsResult) writeField0(oprot thrift.TProtocol) (e return err } -func (p *QueryWorkerForMultiTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *QueryWorkerForTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -4511,11 +4497,11 @@ func (p *QueryWorkerForMultiTopicsResult) writeField1(oprot thrift.TProtocol) (e return err } -func (p *QueryWorkerForMultiTopicsResult) String() string { +func (p *QueryWorkerForTopicsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("QueryWorkerForMultiTopicsResult(%+v)", *p) + return fmt.Sprintf("QueryWorkerForTopicsResult(%+v)", *p) } type QueryOrgOffsetArgs struct { diff --git a/thrift/consumer/ttypes.go b/thrift/consumer/ttypes.go index a156d26..08e1535 100644 --- a/thrift/consumer/ttypes.go +++ b/thrift/consumer/ttypes.go @@ -240,28 +240,33 @@ func (p *ConsumeUnit) String() string { return fmt.Sprintf("ConsumeUnit(%+v)", *p) } -type MultiTopicsConsumeUnit struct { +type TopicsConsumeUnit struct { ConsumerGroup string `thrift:"consumerGroup,1,required" json:"consumerGroup"` TopicPartitions map[string][]int32 `thrift:"topicPartitions,2,required" json:"topicPartitions"` WorkerId string `thrift:"workerId,3,required" json:"workerId"` + TopicGroup string `thrift:"topicGroup,4,required" json:"topicGroup"` } -func NewMultiTopicsConsumeUnit() *MultiTopicsConsumeUnit { - return &MultiTopicsConsumeUnit{} +func NewTopicsConsumeUnit() *TopicsConsumeUnit { + return &TopicsConsumeUnit{} } -func (p *MultiTopicsConsumeUnit) GetConsumerGroup() string { +func (p *TopicsConsumeUnit) GetConsumerGroup() string { return p.ConsumerGroup } -func (p *MultiTopicsConsumeUnit) GetTopicPartitions() map[string][]int32 { +func (p *TopicsConsumeUnit) GetTopicPartitions() map[string][]int32 { return p.TopicPartitions } -func (p *MultiTopicsConsumeUnit) GetWorkerId() string { +func (p *TopicsConsumeUnit) GetWorkerId() string { return p.WorkerId } -func (p *MultiTopicsConsumeUnit) Read(iprot thrift.TProtocol) error { + +func (p *TopicsConsumeUnit) GetTopicGroup() string { + return p.TopicGroup +} +func (p *TopicsConsumeUnit) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -286,6 +291,10 @@ func (p *MultiTopicsConsumeUnit) Read(iprot thrift.TProtocol) error { if err := p.ReadField3(iprot); err != nil { return err } + case 4: + if err := p.ReadField4(iprot); err != nil { + return err + } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -301,7 +310,7 @@ func (p *MultiTopicsConsumeUnit) Read(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsConsumeUnit) ReadField1(iprot thrift.TProtocol) error { +func (p *TopicsConsumeUnit) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { @@ -310,7 +319,7 @@ func (p *MultiTopicsConsumeUnit) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsConsumeUnit) ReadField2(iprot thrift.TProtocol) error { +func (p *TopicsConsumeUnit) ReadField2(iprot thrift.TProtocol) error { _, _, size, err := iprot.ReadMapBegin() if err != nil { return fmt.Errorf("error reading map begin: %s", err) @@ -350,7 +359,7 @@ func (p *MultiTopicsConsumeUnit) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsConsumeUnit) ReadField3(iprot thrift.TProtocol) error { +func (p *TopicsConsumeUnit) ReadField3(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 3: %s", err) } else { @@ -359,8 +368,17 @@ func (p *MultiTopicsConsumeUnit) ReadField3(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsConsumeUnit) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MultiTopicsConsumeUnit"); err != nil { +func (p *TopicsConsumeUnit) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 4: %s", err) + } else { + p.TopicGroup = v + } + return nil +} + +func (p *TopicsConsumeUnit) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TopicsConsumeUnit"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -372,6 +390,9 @@ func (p *MultiTopicsConsumeUnit) Write(oprot thrift.TProtocol) error { if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField4(oprot); err != nil { + return err + } if err := oprot.WriteFieldStop(); err != nil { return fmt.Errorf("write field stop error: %s", err) } @@ -381,7 +402,7 @@ func (p *MultiTopicsConsumeUnit) Write(oprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsConsumeUnit) writeField1(oprot thrift.TProtocol) (err error) { +func (p *TopicsConsumeUnit) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("consumerGroup", thrift.STRING, 1); err != nil { return fmt.Errorf("%T write field begin error 1:consumerGroup: %s", p, err) } @@ -394,7 +415,7 @@ func (p *MultiTopicsConsumeUnit) writeField1(oprot thrift.TProtocol) (err error) return err } -func (p *MultiTopicsConsumeUnit) writeField2(oprot thrift.TProtocol) (err error) { +func (p *TopicsConsumeUnit) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("topicPartitions", thrift.MAP, 2); err != nil { return fmt.Errorf("%T write field begin error 2:topicPartitions: %s", p, err) } @@ -426,7 +447,7 @@ func (p *MultiTopicsConsumeUnit) writeField2(oprot thrift.TProtocol) (err error) return err } -func (p *MultiTopicsConsumeUnit) writeField3(oprot thrift.TProtocol) (err error) { +func (p *TopicsConsumeUnit) writeField3(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("workerId", thrift.STRING, 3); err != nil { return fmt.Errorf("%T write field begin error 3:workerId: %s", p, err) } @@ -439,11 +460,24 @@ func (p *MultiTopicsConsumeUnit) writeField3(oprot thrift.TProtocol) (err error) return err } -func (p *MultiTopicsConsumeUnit) String() string { +func (p *TopicsConsumeUnit) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroup", thrift.STRING, 4); err != nil { + return fmt.Errorf("%T write field begin error 4:topicGroup: %s", p, err) + } + if err := oprot.WriteString(string(p.TopicGroup)); err != nil { + return fmt.Errorf("%T.topicGroup (4) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 4:topicGroup: %s", p, err) + } + return err +} + +func (p *TopicsConsumeUnit) String() string { if p == nil { return "" } - return fmt.Sprintf("MultiTopicsConsumeUnit(%+v)", *p) + return fmt.Sprintf("TopicsConsumeUnit(%+v)", *p) } type CheckPoint struct { @@ -1317,28 +1351,33 @@ func (p *LockWorkerResponse) String() string { return fmt.Sprintf("LockWorkerResponse(%+v)", *p) } -type MultiTopicsLockWorkerRequest struct { +type TopicsLockWorkerRequest struct { ConsumerGroup string `thrift:"consumerGroup,1,required" json:"consumerGroup"` Topics []*topic.TopicTalosResourceName `thrift:"topics,2,required" json:"topics"` WorkerId string `thrift:"workerId,3,required" json:"workerId"` + TopicGroup string `thrift:"topicGroup,4,required" json:"topicGroup"` } -func NewMultiTopicsLockWorkerRequest() *MultiTopicsLockWorkerRequest { - return &MultiTopicsLockWorkerRequest{} +func NewTopicsLockWorkerRequest() *TopicsLockWorkerRequest { + return &TopicsLockWorkerRequest{} } -func (p *MultiTopicsLockWorkerRequest) GetConsumerGroup() string { +func (p *TopicsLockWorkerRequest) GetConsumerGroup() string { return p.ConsumerGroup } -func (p *MultiTopicsLockWorkerRequest) GetTopics() []*topic.TopicTalosResourceName { +func (p *TopicsLockWorkerRequest) GetTopics() []*topic.TopicTalosResourceName { return p.Topics } -func (p *MultiTopicsLockWorkerRequest) GetWorkerId() string { +func (p *TopicsLockWorkerRequest) GetWorkerId() string { return p.WorkerId } -func (p *MultiTopicsLockWorkerRequest) Read(iprot thrift.TProtocol) error { + +func (p *TopicsLockWorkerRequest) GetTopicGroup() string { + return p.TopicGroup +} +func (p *TopicsLockWorkerRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -1363,6 +1402,10 @@ func (p *MultiTopicsLockWorkerRequest) Read(iprot thrift.TProtocol) error { if err := p.ReadField3(iprot); err != nil { return err } + case 4: + if err := p.ReadField4(iprot); err != nil { + return err + } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -1378,7 +1421,7 @@ func (p *MultiTopicsLockWorkerRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsLockWorkerRequest) ReadField1(iprot thrift.TProtocol) error { +func (p *TopicsLockWorkerRequest) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { @@ -1387,7 +1430,7 @@ func (p *MultiTopicsLockWorkerRequest) ReadField1(iprot thrift.TProtocol) error return nil } -func (p *MultiTopicsLockWorkerRequest) ReadField2(iprot thrift.TProtocol) error { +func (p *TopicsLockWorkerRequest) ReadField2(iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin() if err != nil { return fmt.Errorf("error reading list begin: %s", err) @@ -1407,7 +1450,7 @@ func (p *MultiTopicsLockWorkerRequest) ReadField2(iprot thrift.TProtocol) error return nil } -func (p *MultiTopicsLockWorkerRequest) ReadField3(iprot thrift.TProtocol) error { +func (p *TopicsLockWorkerRequest) ReadField3(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 3: %s", err) } else { @@ -1416,8 +1459,17 @@ func (p *MultiTopicsLockWorkerRequest) ReadField3(iprot thrift.TProtocol) error return nil } -func (p *MultiTopicsLockWorkerRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MultiTopicsLockWorkerRequest"); err != nil { +func (p *TopicsLockWorkerRequest) ReadField4(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 4: %s", err) + } else { + p.TopicGroup = v + } + return nil +} + +func (p *TopicsLockWorkerRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TopicsLockWorkerRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -1429,6 +1481,9 @@ func (p *MultiTopicsLockWorkerRequest) Write(oprot thrift.TProtocol) error { if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField4(oprot); err != nil { + return err + } if err := oprot.WriteFieldStop(); err != nil { return fmt.Errorf("write field stop error: %s", err) } @@ -1438,7 +1493,7 @@ func (p *MultiTopicsLockWorkerRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsLockWorkerRequest) writeField1(oprot thrift.TProtocol) (err error) { +func (p *TopicsLockWorkerRequest) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("consumerGroup", thrift.STRING, 1); err != nil { return fmt.Errorf("%T write field begin error 1:consumerGroup: %s", p, err) } @@ -1451,7 +1506,7 @@ func (p *MultiTopicsLockWorkerRequest) writeField1(oprot thrift.TProtocol) (err return err } -func (p *MultiTopicsLockWorkerRequest) writeField2(oprot thrift.TProtocol) (err error) { +func (p *TopicsLockWorkerRequest) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("topics", thrift.LIST, 2); err != nil { return fmt.Errorf("%T write field begin error 2:topics: %s", p, err) } @@ -1472,7 +1527,7 @@ func (p *MultiTopicsLockWorkerRequest) writeField2(oprot thrift.TProtocol) (err return err } -func (p *MultiTopicsLockWorkerRequest) writeField3(oprot thrift.TProtocol) (err error) { +func (p *TopicsLockWorkerRequest) writeField3(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("workerId", thrift.STRING, 3); err != nil { return fmt.Errorf("%T write field begin error 3:workerId: %s", p, err) } @@ -1485,25 +1540,38 @@ func (p *MultiTopicsLockWorkerRequest) writeField3(oprot thrift.TProtocol) (err return err } -func (p *MultiTopicsLockWorkerRequest) String() string { +func (p *TopicsLockWorkerRequest) writeField4(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroup", thrift.STRING, 4); err != nil { + return fmt.Errorf("%T write field begin error 4:topicGroup: %s", p, err) + } + if err := oprot.WriteString(string(p.TopicGroup)); err != nil { + return fmt.Errorf("%T.topicGroup (4) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 4:topicGroup: %s", p, err) + } + return err +} + +func (p *TopicsLockWorkerRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("MultiTopicsLockWorkerRequest(%+v)", *p) + return fmt.Sprintf("TopicsLockWorkerRequest(%+v)", *p) } -type MultiTopicsLockWorkerResponse struct { +type TopicsLockWorkerResponse struct { RegisterSuccess bool `thrift:"registerSuccess,1,required" json:"registerSuccess"` } -func NewMultiTopicsLockWorkerResponse() *MultiTopicsLockWorkerResponse { - return &MultiTopicsLockWorkerResponse{} +func NewTopicsLockWorkerResponse() *TopicsLockWorkerResponse { + return &TopicsLockWorkerResponse{} } -func (p *MultiTopicsLockWorkerResponse) GetRegisterSuccess() bool { +func (p *TopicsLockWorkerResponse) GetRegisterSuccess() bool { return p.RegisterSuccess } -func (p *MultiTopicsLockWorkerResponse) Read(iprot thrift.TProtocol) error { +func (p *TopicsLockWorkerResponse) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -1535,7 +1603,7 @@ func (p *MultiTopicsLockWorkerResponse) Read(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsLockWorkerResponse) ReadField1(iprot thrift.TProtocol) error { +func (p *TopicsLockWorkerResponse) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadBool(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { @@ -1544,8 +1612,8 @@ func (p *MultiTopicsLockWorkerResponse) ReadField1(iprot thrift.TProtocol) error return nil } -func (p *MultiTopicsLockWorkerResponse) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MultiTopicsLockWorkerResponse"); err != nil { +func (p *TopicsLockWorkerResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TopicsLockWorkerResponse"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -1560,7 +1628,7 @@ func (p *MultiTopicsLockWorkerResponse) Write(oprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsLockWorkerResponse) writeField1(oprot thrift.TProtocol) (err error) { +func (p *TopicsLockWorkerResponse) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("registerSuccess", thrift.BOOL, 1); err != nil { return fmt.Errorf("%T write field begin error 1:registerSuccess: %s", p, err) } @@ -1573,11 +1641,11 @@ func (p *MultiTopicsLockWorkerResponse) writeField1(oprot thrift.TProtocol) (err return err } -func (p *MultiTopicsLockWorkerResponse) String() string { +func (p *TopicsLockWorkerResponse) String() string { if p == nil { return "" } - return fmt.Sprintf("MultiTopicsLockWorkerResponse(%+v)", *p) + return fmt.Sprintf("TopicsLockWorkerResponse(%+v)", *p) } type UnlockPartitionRequest struct { @@ -1915,27 +1983,27 @@ func (p *RenewResponse) String() string { return fmt.Sprintf("RenewResponse(%+v)", *p) } -type MultiTopicsRenewRequest struct { - ConsumeUnit *MultiTopicsConsumeUnit `thrift:"consumeUnit,1,required" json:"consumeUnit"` +type TopicsRenewRequest struct { + ConsumeUnit *TopicsConsumeUnit `thrift:"consumeUnit,1,required" json:"consumeUnit"` } -func NewMultiTopicsRenewRequest() *MultiTopicsRenewRequest { - return &MultiTopicsRenewRequest{} +func NewTopicsRenewRequest() *TopicsRenewRequest { + return &TopicsRenewRequest{} } -var MultiTopicsRenewRequest_ConsumeUnit_DEFAULT *MultiTopicsConsumeUnit +var TopicsRenewRequest_ConsumeUnit_DEFAULT *TopicsConsumeUnit -func (p *MultiTopicsRenewRequest) GetConsumeUnit() *MultiTopicsConsumeUnit { +func (p *TopicsRenewRequest) GetConsumeUnit() *TopicsConsumeUnit { if !p.IsSetConsumeUnit() { - return MultiTopicsRenewRequest_ConsumeUnit_DEFAULT + return TopicsRenewRequest_ConsumeUnit_DEFAULT } return p.ConsumeUnit } -func (p *MultiTopicsRenewRequest) IsSetConsumeUnit() bool { +func (p *TopicsRenewRequest) IsSetConsumeUnit() bool { return p.ConsumeUnit != nil } -func (p *MultiTopicsRenewRequest) Read(iprot thrift.TProtocol) error { +func (p *TopicsRenewRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -1967,16 +2035,16 @@ func (p *MultiTopicsRenewRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsRenewRequest) ReadField1(iprot thrift.TProtocol) error { - p.ConsumeUnit = &MultiTopicsConsumeUnit{} +func (p *TopicsRenewRequest) ReadField1(iprot thrift.TProtocol) error { + p.ConsumeUnit = &TopicsConsumeUnit{} if err := p.ConsumeUnit.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.ConsumeUnit, err) } return nil } -func (p *MultiTopicsRenewRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MultiTopicsRenewRequest"); err != nil { +func (p *TopicsRenewRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TopicsRenewRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -1991,7 +2059,7 @@ func (p *MultiTopicsRenewRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsRenewRequest) writeField1(oprot thrift.TProtocol) (err error) { +func (p *TopicsRenewRequest) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("consumeUnit", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:consumeUnit: %s", p, err) } @@ -2004,30 +2072,30 @@ func (p *MultiTopicsRenewRequest) writeField1(oprot thrift.TProtocol) (err error return err } -func (p *MultiTopicsRenewRequest) String() string { +func (p *TopicsRenewRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("MultiTopicsRenewRequest(%+v)", *p) + return fmt.Sprintf("TopicsRenewRequest(%+v)", *p) } -type MultiTopicsRenewResponse struct { +type TopicsRenewResponse struct { HeartbeatSuccess bool `thrift:"heartbeatSuccess,1,required" json:"heartbeatSuccess"` FailedPartitionList []*topic.TopicAndPartition `thrift:"failedPartitionList,2,required" json:"failedPartitionList"` } -func NewMultiTopicsRenewResponse() *MultiTopicsRenewResponse { - return &MultiTopicsRenewResponse{} +func NewTopicsRenewResponse() *TopicsRenewResponse { + return &TopicsRenewResponse{} } -func (p *MultiTopicsRenewResponse) GetHeartbeatSuccess() bool { +func (p *TopicsRenewResponse) GetHeartbeatSuccess() bool { return p.HeartbeatSuccess } -func (p *MultiTopicsRenewResponse) GetFailedPartitionList() []*topic.TopicAndPartition { +func (p *TopicsRenewResponse) GetFailedPartitionList() []*topic.TopicAndPartition { return p.FailedPartitionList } -func (p *MultiTopicsRenewResponse) Read(iprot thrift.TProtocol) error { +func (p *TopicsRenewResponse) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -2063,7 +2131,7 @@ func (p *MultiTopicsRenewResponse) Read(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsRenewResponse) ReadField1(iprot thrift.TProtocol) error { +func (p *TopicsRenewResponse) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadBool(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { @@ -2072,7 +2140,7 @@ func (p *MultiTopicsRenewResponse) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsRenewResponse) ReadField2(iprot thrift.TProtocol) error { +func (p *TopicsRenewResponse) ReadField2(iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin() if err != nil { return fmt.Errorf("error reading list begin: %s", err) @@ -2092,8 +2160,8 @@ func (p *MultiTopicsRenewResponse) ReadField2(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsRenewResponse) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MultiTopicsRenewResponse"); err != nil { +func (p *TopicsRenewResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TopicsRenewResponse"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -2111,7 +2179,7 @@ func (p *MultiTopicsRenewResponse) Write(oprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsRenewResponse) writeField1(oprot thrift.TProtocol) (err error) { +func (p *TopicsRenewResponse) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("heartbeatSuccess", thrift.BOOL, 1); err != nil { return fmt.Errorf("%T write field begin error 1:heartbeatSuccess: %s", p, err) } @@ -2124,7 +2192,7 @@ func (p *MultiTopicsRenewResponse) writeField1(oprot thrift.TProtocol) (err erro return err } -func (p *MultiTopicsRenewResponse) writeField2(oprot thrift.TProtocol) (err error) { +func (p *TopicsRenewResponse) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("failedPartitionList", thrift.LIST, 2); err != nil { return fmt.Errorf("%T write field begin error 2:failedPartitionList: %s", p, err) } @@ -2145,11 +2213,11 @@ func (p *MultiTopicsRenewResponse) writeField2(oprot thrift.TProtocol) (err erro return err } -func (p *MultiTopicsRenewResponse) String() string { +func (p *TopicsRenewResponse) String() string { if p == nil { return "" } - return fmt.Sprintf("MultiTopicsRenewResponse(%+v)", *p) + return fmt.Sprintf("TopicsRenewResponse(%+v)", *p) } type UpdateOffsetRequest struct { @@ -2822,23 +2890,28 @@ func (p *QueryWorkerResponse) String() string { return fmt.Sprintf("QueryWorkerResponse(%+v)", *p) } -type MultiTopicsQueryWorkerRequest struct { +type TopicsQueryWorkerRequest struct { ConsumerGroup string `thrift:"consumerGroup,1,required" json:"consumerGroup"` TopicTalosResourceNames []*topic.TopicTalosResourceName `thrift:"topicTalosResourceNames,2,required" json:"topicTalosResourceNames"` + TopicGroup string `thrift:"topicGroup,3,required" json:"topicGroup"` } -func NewMultiTopicsQueryWorkerRequest() *MultiTopicsQueryWorkerRequest { - return &MultiTopicsQueryWorkerRequest{} +func NewTopicsQueryWorkerRequest() *TopicsQueryWorkerRequest { + return &TopicsQueryWorkerRequest{} } -func (p *MultiTopicsQueryWorkerRequest) GetConsumerGroup() string { +func (p *TopicsQueryWorkerRequest) GetConsumerGroup() string { return p.ConsumerGroup } -func (p *MultiTopicsQueryWorkerRequest) GetTopicTalosResourceNames() []*topic.TopicTalosResourceName { +func (p *TopicsQueryWorkerRequest) GetTopicTalosResourceNames() []*topic.TopicTalosResourceName { return p.TopicTalosResourceNames } -func (p *MultiTopicsQueryWorkerRequest) Read(iprot thrift.TProtocol) error { + +func (p *TopicsQueryWorkerRequest) GetTopicGroup() string { + return p.TopicGroup +} +func (p *TopicsQueryWorkerRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -2859,6 +2932,10 @@ func (p *MultiTopicsQueryWorkerRequest) Read(iprot thrift.TProtocol) error { if err := p.ReadField2(iprot); err != nil { return err } + case 3: + if err := p.ReadField3(iprot); err != nil { + return err + } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -2874,7 +2951,7 @@ func (p *MultiTopicsQueryWorkerRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsQueryWorkerRequest) ReadField1(iprot thrift.TProtocol) error { +func (p *TopicsQueryWorkerRequest) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { @@ -2883,7 +2960,7 @@ func (p *MultiTopicsQueryWorkerRequest) ReadField1(iprot thrift.TProtocol) error return nil } -func (p *MultiTopicsQueryWorkerRequest) ReadField2(iprot thrift.TProtocol) error { +func (p *TopicsQueryWorkerRequest) ReadField2(iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin() if err != nil { return fmt.Errorf("error reading list begin: %s", err) @@ -2903,8 +2980,17 @@ func (p *MultiTopicsQueryWorkerRequest) ReadField2(iprot thrift.TProtocol) error return nil } -func (p *MultiTopicsQueryWorkerRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MultiTopicsQueryWorkerRequest"); err != nil { +func (p *TopicsQueryWorkerRequest) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 3: %s", err) + } else { + p.TopicGroup = v + } + return nil +} + +func (p *TopicsQueryWorkerRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TopicsQueryWorkerRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -2913,6 +2999,9 @@ func (p *MultiTopicsQueryWorkerRequest) Write(oprot thrift.TProtocol) error { if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField3(oprot); err != nil { + return err + } if err := oprot.WriteFieldStop(); err != nil { return fmt.Errorf("write field stop error: %s", err) } @@ -2922,7 +3011,7 @@ func (p *MultiTopicsQueryWorkerRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsQueryWorkerRequest) writeField1(oprot thrift.TProtocol) (err error) { +func (p *TopicsQueryWorkerRequest) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("consumerGroup", thrift.STRING, 1); err != nil { return fmt.Errorf("%T write field begin error 1:consumerGroup: %s", p, err) } @@ -2935,7 +3024,7 @@ func (p *MultiTopicsQueryWorkerRequest) writeField1(oprot thrift.TProtocol) (err return err } -func (p *MultiTopicsQueryWorkerRequest) writeField2(oprot thrift.TProtocol) (err error) { +func (p *TopicsQueryWorkerRequest) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("topicTalosResourceNames", thrift.LIST, 2); err != nil { return fmt.Errorf("%T write field begin error 2:topicTalosResourceNames: %s", p, err) } @@ -2956,25 +3045,38 @@ func (p *MultiTopicsQueryWorkerRequest) writeField2(oprot thrift.TProtocol) (err return err } -func (p *MultiTopicsQueryWorkerRequest) String() string { +func (p *TopicsQueryWorkerRequest) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroup", thrift.STRING, 3); err != nil { + return fmt.Errorf("%T write field begin error 3:topicGroup: %s", p, err) + } + if err := oprot.WriteString(string(p.TopicGroup)); err != nil { + return fmt.Errorf("%T.topicGroup (3) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 3:topicGroup: %s", p, err) + } + return err +} + +func (p *TopicsQueryWorkerRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("MultiTopicsQueryWorkerRequest(%+v)", *p) + return fmt.Sprintf("TopicsQueryWorkerRequest(%+v)", *p) } -type MultiTopicsQueryWorkerResponse struct { +type TopicsQueryWorkerResponse struct { WorkerMap map[string][]*topic.TopicAndPartition `thrift:"workerMap,1,required" json:"workerMap"` } -func NewMultiTopicsQueryWorkerResponse() *MultiTopicsQueryWorkerResponse { - return &MultiTopicsQueryWorkerResponse{} +func NewTopicsQueryWorkerResponse() *TopicsQueryWorkerResponse { + return &TopicsQueryWorkerResponse{} } -func (p *MultiTopicsQueryWorkerResponse) GetWorkerMap() map[string][]*topic.TopicAndPartition { +func (p *TopicsQueryWorkerResponse) GetWorkerMap() map[string][]*topic.TopicAndPartition { return p.WorkerMap } -func (p *MultiTopicsQueryWorkerResponse) Read(iprot thrift.TProtocol) error { +func (p *TopicsQueryWorkerResponse) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3006,7 +3108,7 @@ func (p *MultiTopicsQueryWorkerResponse) Read(iprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsQueryWorkerResponse) ReadField1(iprot thrift.TProtocol) error { +func (p *TopicsQueryWorkerResponse) ReadField1(iprot thrift.TProtocol) error { _, _, size, err := iprot.ReadMapBegin() if err != nil { return fmt.Errorf("error reading map begin: %s", err) @@ -3044,8 +3146,8 @@ func (p *MultiTopicsQueryWorkerResponse) ReadField1(iprot thrift.TProtocol) erro return nil } -func (p *MultiTopicsQueryWorkerResponse) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("MultiTopicsQueryWorkerResponse"); err != nil { +func (p *TopicsQueryWorkerResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("TopicsQueryWorkerResponse"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3060,7 +3162,7 @@ func (p *MultiTopicsQueryWorkerResponse) Write(oprot thrift.TProtocol) error { return nil } -func (p *MultiTopicsQueryWorkerResponse) writeField1(oprot thrift.TProtocol) (err error) { +func (p *TopicsQueryWorkerResponse) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("workerMap", thrift.MAP, 1); err != nil { return fmt.Errorf("%T write field begin error 1:workerMap: %s", p, err) } @@ -3092,11 +3194,11 @@ func (p *MultiTopicsQueryWorkerResponse) writeField1(oprot thrift.TProtocol) (er return err } -func (p *MultiTopicsQueryWorkerResponse) String() string { +func (p *TopicsQueryWorkerResponse) String() string { if p == nil { return "" } - return fmt.Sprintf("MultiTopicsQueryWorkerResponse(%+v)", *p) + return fmt.Sprintf("TopicsQueryWorkerResponse(%+v)", *p) } type ConsumerGroupAndPartition struct { diff --git a/thrift/message/message_service-remote/message_service-remote.go b/thrift/message/message_service-remote/message_service-remote.go index 06c0896..e839316 100755 --- a/thrift/message/message_service-remote/message_service-remote.go +++ b/thrift/message/message_service-remote/message_service-remote.go @@ -30,7 +30,9 @@ func Usage() { fmt.Fprintln(os.Stderr, " CommitResponse commit(CommitRequest request)") fmt.Fprintln(os.Stderr, " RollbackResponse rollback(RollbackRequest request)") fmt.Fprintln(os.Stderr, " GetUnkownStateTransactionResponse getUnkownStateTransaction(GetUnkownStateTransactionRequest request)") - fmt.Fprintln(os.Stderr, " LookupTopicsResponse lookupTopics(LookupTopicsRequest request)") + fmt.Fprintln(os.Stderr, " GetCheckpointResponse getTopicCheckpoint(GetCheckpointRequest request)") + fmt.Fprintln(os.Stderr, " GetPartitionCheckpointResponse getPartitionCheckpoint(GetPartitionCheckpointRequest request)") + fmt.Fprintln(os.Stderr, " void deleteMessageIndex(DeleteMessageIndexRequest request)") fmt.Fprintln(os.Stderr, " Version getServiceVersion()") fmt.Fprintln(os.Stderr, " void validClientVersion(Version clientVersion)") fmt.Fprintln(os.Stderr) @@ -132,31 +134,6 @@ func main() { fmt.Fprintln(os.Stderr, "PutMessage requires 1 args") flag.Usage() } - arg37 := flag.Arg(1) - mbTrans38 := thrift.NewTMemoryBufferLen(len(arg37)) - defer mbTrans38.Close() - _, err39 := mbTrans38.WriteString(arg37) - if err39 != nil { - Usage() - return - } - factory40 := thrift.NewTSimpleJSONProtocolFactory() - jsProt41 := factory40.GetProtocol(mbTrans38) - argvalue0 := message.NewPutMessageRequest() - err42 := argvalue0.Read(jsProt41) - if err42 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.PutMessage(value0)) - fmt.Print("\n") - break - case "getMessage": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "GetMessage requires 1 args") - flag.Usage() - } arg43 := flag.Arg(1) mbTrans44 := thrift.NewTMemoryBufferLen(len(arg43)) defer mbTrans44.Close() @@ -167,19 +144,19 @@ func main() { } factory46 := thrift.NewTSimpleJSONProtocolFactory() jsProt47 := factory46.GetProtocol(mbTrans44) - argvalue0 := message.NewGetMessageRequest() + argvalue0 := message.NewPutMessageRequest() err48 := argvalue0.Read(jsProt47) if err48 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.GetMessage(value0)) + fmt.Print(client.PutMessage(value0)) fmt.Print("\n") break - case "getTopicOffset": + case "getMessage": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "GetTopicOffset requires 1 args") + fmt.Fprintln(os.Stderr, "GetMessage requires 1 args") flag.Usage() } arg49 := flag.Arg(1) @@ -192,19 +169,19 @@ func main() { } factory52 := thrift.NewTSimpleJSONProtocolFactory() jsProt53 := factory52.GetProtocol(mbTrans50) - argvalue0 := message.NewGetTopicOffsetRequest() + argvalue0 := message.NewGetMessageRequest() err54 := argvalue0.Read(jsProt53) if err54 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.GetTopicOffset(value0)) + fmt.Print(client.GetMessage(value0)) fmt.Print("\n") break - case "getPartitionOffset": + case "getTopicOffset": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "GetPartitionOffset requires 1 args") + fmt.Fprintln(os.Stderr, "GetTopicOffset requires 1 args") flag.Usage() } arg55 := flag.Arg(1) @@ -217,19 +194,19 @@ func main() { } factory58 := thrift.NewTSimpleJSONProtocolFactory() jsProt59 := factory58.GetProtocol(mbTrans56) - argvalue0 := message.NewGetPartitionOffsetRequest() + argvalue0 := message.NewGetTopicOffsetRequest() err60 := argvalue0.Read(jsProt59) if err60 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.GetPartitionOffset(value0)) + fmt.Print(client.GetTopicOffset(value0)) fmt.Print("\n") break - case "getPartitionsOffset": + case "getPartitionOffset": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "GetPartitionsOffset requires 1 args") + fmt.Fprintln(os.Stderr, "GetPartitionOffset requires 1 args") flag.Usage() } arg61 := flag.Arg(1) @@ -242,19 +219,19 @@ func main() { } factory64 := thrift.NewTSimpleJSONProtocolFactory() jsProt65 := factory64.GetProtocol(mbTrans62) - argvalue0 := message.NewGetPartitionsOffsetRequest() + argvalue0 := message.NewGetPartitionOffsetRequest() err66 := argvalue0.Read(jsProt65) if err66 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.GetPartitionsOffset(value0)) + fmt.Print(client.GetPartitionOffset(value0)) fmt.Print("\n") break - case "getScheduleInfo": + case "getPartitionsOffset": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "GetScheduleInfo requires 1 args") + fmt.Fprintln(os.Stderr, "GetPartitionsOffset requires 1 args") flag.Usage() } arg67 := flag.Arg(1) @@ -267,19 +244,19 @@ func main() { } factory70 := thrift.NewTSimpleJSONProtocolFactory() jsProt71 := factory70.GetProtocol(mbTrans68) - argvalue0 := message.NewGetScheduleInfoRequest() + argvalue0 := message.NewGetPartitionsOffsetRequest() err72 := argvalue0.Read(jsProt71) if err72 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.GetScheduleInfo(value0)) + fmt.Print(client.GetPartitionsOffset(value0)) fmt.Print("\n") break - case "prepare": + case "getScheduleInfo": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "Prepare requires 1 args") + fmt.Fprintln(os.Stderr, "GetScheduleInfo requires 1 args") flag.Usage() } arg73 := flag.Arg(1) @@ -292,19 +269,19 @@ func main() { } factory76 := thrift.NewTSimpleJSONProtocolFactory() jsProt77 := factory76.GetProtocol(mbTrans74) - argvalue0 := message.NewPrepareRequest() + argvalue0 := message.NewGetScheduleInfoRequest() err78 := argvalue0.Read(jsProt77) if err78 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.Prepare(value0)) + fmt.Print(client.GetScheduleInfo(value0)) fmt.Print("\n") break - case "commit": + case "prepare": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "Commit requires 1 args") + fmt.Fprintln(os.Stderr, "Prepare requires 1 args") flag.Usage() } arg79 := flag.Arg(1) @@ -317,19 +294,19 @@ func main() { } factory82 := thrift.NewTSimpleJSONProtocolFactory() jsProt83 := factory82.GetProtocol(mbTrans80) - argvalue0 := message.NewCommitRequest() + argvalue0 := message.NewPrepareRequest() err84 := argvalue0.Read(jsProt83) if err84 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.Commit(value0)) + fmt.Print(client.Prepare(value0)) fmt.Print("\n") break - case "rollback": + case "commit": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "Rollback requires 1 args") + fmt.Fprintln(os.Stderr, "Commit requires 1 args") flag.Usage() } arg85 := flag.Arg(1) @@ -342,19 +319,19 @@ func main() { } factory88 := thrift.NewTSimpleJSONProtocolFactory() jsProt89 := factory88.GetProtocol(mbTrans86) - argvalue0 := message.NewRollbackRequest() + argvalue0 := message.NewCommitRequest() err90 := argvalue0.Read(jsProt89) if err90 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.Rollback(value0)) + fmt.Print(client.Commit(value0)) fmt.Print("\n") break - case "getUnkownStateTransaction": + case "rollback": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "GetUnkownStateTransaction requires 1 args") + fmt.Fprintln(os.Stderr, "Rollback requires 1 args") flag.Usage() } arg91 := flag.Arg(1) @@ -367,19 +344,19 @@ func main() { } factory94 := thrift.NewTSimpleJSONProtocolFactory() jsProt95 := factory94.GetProtocol(mbTrans92) - argvalue0 := message.NewGetUnkownStateTransactionRequest() + argvalue0 := message.NewRollbackRequest() err96 := argvalue0.Read(jsProt95) if err96 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.GetUnkownStateTransaction(value0)) + fmt.Print(client.Rollback(value0)) fmt.Print("\n") break - case "lookupTopics": + case "getUnkownStateTransaction": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "LookupTopics requires 1 args") + fmt.Fprintln(os.Stderr, "GetUnkownStateTransaction requires 1 args") flag.Usage() } arg97 := flag.Arg(1) @@ -392,14 +369,89 @@ func main() { } factory100 := thrift.NewTSimpleJSONProtocolFactory() jsProt101 := factory100.GetProtocol(mbTrans98) - argvalue0 := message.NewLookupTopicsRequest() + argvalue0 := message.NewGetUnkownStateTransactionRequest() err102 := argvalue0.Read(jsProt101) if err102 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.LookupTopics(value0)) + fmt.Print(client.GetUnkownStateTransaction(value0)) + fmt.Print("\n") + break + case "getTopicCheckpoint": + if flag.NArg()-1 != 1 { + fmt.Fprintln(os.Stderr, "GetTopicCheckpoint requires 1 args") + flag.Usage() + } + arg103 := flag.Arg(1) + mbTrans104 := thrift.NewTMemoryBufferLen(len(arg103)) + defer mbTrans104.Close() + _, err105 := mbTrans104.WriteString(arg103) + if err105 != nil { + Usage() + return + } + factory106 := thrift.NewTSimpleJSONProtocolFactory() + jsProt107 := factory106.GetProtocol(mbTrans104) + argvalue0 := message.NewGetCheckpointRequest() + err108 := argvalue0.Read(jsProt107) + if err108 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.GetTopicCheckpoint(value0)) + fmt.Print("\n") + break + case "getPartitionCheckpoint": + if flag.NArg()-1 != 1 { + fmt.Fprintln(os.Stderr, "GetPartitionCheckpoint requires 1 args") + flag.Usage() + } + arg109 := flag.Arg(1) + mbTrans110 := thrift.NewTMemoryBufferLen(len(arg109)) + defer mbTrans110.Close() + _, err111 := mbTrans110.WriteString(arg109) + if err111 != nil { + Usage() + return + } + factory112 := thrift.NewTSimpleJSONProtocolFactory() + jsProt113 := factory112.GetProtocol(mbTrans110) + argvalue0 := message.NewGetPartitionCheckpointRequest() + err114 := argvalue0.Read(jsProt113) + if err114 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.GetPartitionCheckpoint(value0)) + fmt.Print("\n") + break + case "deleteMessageIndex": + if flag.NArg()-1 != 1 { + fmt.Fprintln(os.Stderr, "DeleteMessageIndex requires 1 args") + flag.Usage() + } + arg115 := flag.Arg(1) + mbTrans116 := thrift.NewTMemoryBufferLen(len(arg115)) + defer mbTrans116.Close() + _, err117 := mbTrans116.WriteString(arg115) + if err117 != nil { + Usage() + return + } + factory118 := thrift.NewTSimpleJSONProtocolFactory() + jsProt119 := factory118.GetProtocol(mbTrans116) + argvalue0 := message.NewDeleteMessageIndexRequest() + err120 := argvalue0.Read(jsProt119) + if err120 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.DeleteMessageIndex(value0)) fmt.Print("\n") break case "getServiceVersion": @@ -415,19 +467,19 @@ func main() { fmt.Fprintln(os.Stderr, "ValidClientVersion requires 1 args") flag.Usage() } - arg103 := flag.Arg(1) - mbTrans104 := thrift.NewTMemoryBufferLen(len(arg103)) - defer mbTrans104.Close() - _, err105 := mbTrans104.WriteString(arg103) - if err105 != nil { + arg121 := flag.Arg(1) + mbTrans122 := thrift.NewTMemoryBufferLen(len(arg121)) + defer mbTrans122.Close() + _, err123 := mbTrans122.WriteString(arg121) + if err123 != nil { Usage() return } - factory106 := thrift.NewTSimpleJSONProtocolFactory() - jsProt107 := factory106.GetProtocol(mbTrans104) + factory124 := thrift.NewTSimpleJSONProtocolFactory() + jsProt125 := factory124.GetProtocol(mbTrans122) argvalue0 := message.NewVersion() - err108 := argvalue0.Read(jsProt107) - if err108 != nil { + err126 := argvalue0.Read(jsProt125) + if err126 != nil { Usage() return } diff --git a/thrift/message/messageservice.go b/thrift/message/messageservice.go index b581b42..cc2812a 100644 --- a/thrift/message/messageservice.go +++ b/thrift/message/messageservice.go @@ -83,12 +83,24 @@ type MessageService interface { // Parameters: // - Request GetUnkownStateTransaction(request *GetUnkownStateTransactionRequest) (r *GetUnkownStateTransactionResponse, err error) - // look up all topics and partition number that match topic pattern + // get partition offsets for time index // // // Parameters: // - Request - LookupTopics(request *LookupTopicsRequest) (r *LookupTopicsResponse, err error) + GetTopicCheckpoint(request *GetCheckpointRequest) (r *GetCheckpointResponse, err error) + // getPartitionCheckpoint by timeIndex + // + // + // Parameters: + // - Request + GetPartitionCheckpoint(request *GetPartitionCheckpointRequest) (r *GetPartitionCheckpointResponse, err error) + // deleteMessageIndex from startOffset to endOffset + // + // + // Parameters: + // - Request + DeleteMessageIndex(request *DeleteMessageIndexRequest) (err error) } type MessageServiceClient struct { @@ -105,9 +117,8 @@ func NewMessageServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol // Put message to talos; // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) PutMessage(request *PutMessageRequest) (r *PutMessageResponse, err error) { if err = p.sendPutMessage(request); err != nil { return @@ -148,16 +159,16 @@ func (p *MessageServiceClient) recvPutMessage() (value *PutMessageResponse, err return } if mTypeId == thrift.EXCEPTION { - error14 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error15 error - error15, err = error14.Read(iprot) + error16 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error17 error + error17, err = error16.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error15 + err = error17 return } if p.SeqId != seqId { @@ -181,9 +192,8 @@ func (p *MessageServiceClient) recvPutMessage() (value *PutMessageResponse, err // Get message from talos; // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) GetMessage(request *GetMessageRequest) (r *GetMessageResponse, err error) { if err = p.sendGetMessage(request); err != nil { return @@ -224,16 +234,16 @@ func (p *MessageServiceClient) recvGetMessage() (value *GetMessageResponse, err return } if mTypeId == thrift.EXCEPTION { - error16 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error17 error - error17, err = error16.Read(iprot) + error18 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error19 error + error19, err = error18.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error17 + err = error19 return } if p.SeqId != seqId { @@ -258,9 +268,8 @@ func (p *MessageServiceClient) recvGetMessage() (value *GetMessageResponse, err // getTopicOffset for all partitions of specified topic, which will return all // current available message offset range. // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) GetTopicOffset(request *GetTopicOffsetRequest) (r *GetTopicOffsetResponse, err error) { if err = p.sendGetTopicOffset(request); err != nil { return @@ -301,16 +310,16 @@ func (p *MessageServiceClient) recvGetTopicOffset() (value *GetTopicOffsetRespon return } if mTypeId == thrift.EXCEPTION { - error18 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error19 error - error19, err = error18.Read(iprot) + error20 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error21 error + error21, err = error20.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error19 + err = error21 return } if p.SeqId != seqId { @@ -334,9 +343,8 @@ func (p *MessageServiceClient) recvGetTopicOffset() (value *GetTopicOffsetRespon // getPartitionOffset for specified topicAndPartition // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) GetPartitionOffset(request *GetPartitionOffsetRequest) (r *GetPartitionOffsetResponse, err error) { if err = p.sendGetPartitionOffset(request); err != nil { return @@ -377,16 +385,16 @@ func (p *MessageServiceClient) recvGetPartitionOffset() (value *GetPartitionOffs return } if mTypeId == thrift.EXCEPTION { - error20 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error21 error - error21, err = error20.Read(iprot) + error22 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error23 error + error23, err = error22.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error21 + err = error23 return } if p.SeqId != seqId { @@ -410,9 +418,8 @@ func (p *MessageServiceClient) recvGetPartitionOffset() (value *GetPartitionOffs // getPartitionsOffset list for specified partitions in the same restServer // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) GetPartitionsOffset(request *GetPartitionsOffsetRequest) (r *GetPartitionsOffsetResponse, err error) { if err = p.sendGetPartitionsOffset(request); err != nil { return @@ -453,16 +460,16 @@ func (p *MessageServiceClient) recvGetPartitionsOffset() (value *GetPartitionsOf return } if mTypeId == thrift.EXCEPTION { - error22 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error23 error - error23, err = error22.Read(iprot) + error24 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error25 error + error25, err = error24.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error23 + err = error25 return } if p.SeqId != seqId { @@ -482,9 +489,8 @@ func (p *MessageServiceClient) recvGetPartitionsOffset() (value *GetPartitionsOf // getScheduleInfo return all partitions and server which serving it of specified topic. // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) GetScheduleInfo(request *GetScheduleInfoRequest) (r *GetScheduleInfoResponse, err error) { if err = p.sendGetScheduleInfo(request); err != nil { return @@ -525,16 +531,16 @@ func (p *MessageServiceClient) recvGetScheduleInfo() (value *GetScheduleInfoResp return } if mTypeId == thrift.EXCEPTION { - error24 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error25 error - error25, err = error24.Read(iprot) + error26 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error27 error + error27, err = error26.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error25 + err = error27 return } if p.SeqId != seqId { @@ -558,9 +564,8 @@ func (p *MessageServiceClient) recvGetScheduleInfo() (value *GetScheduleInfoResp // Prepare transaction message; // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) Prepare(request *PrepareRequest) (r *PrepareResponse, err error) { if err = p.sendPrepare(request); err != nil { return @@ -601,16 +606,16 @@ func (p *MessageServiceClient) recvPrepare() (value *PrepareResponse, err error) return } if mTypeId == thrift.EXCEPTION { - error26 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error27 error - error27, err = error26.Read(iprot) + error28 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error29 error + error29, err = error28.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error27 + err = error29 return } if p.SeqId != seqId { @@ -634,9 +639,8 @@ func (p *MessageServiceClient) recvPrepare() (value *PrepareResponse, err error) // Commit transaction message; // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) Commit(request *CommitRequest) (r *CommitResponse, err error) { if err = p.sendCommit(request); err != nil { return @@ -677,16 +681,16 @@ func (p *MessageServiceClient) recvCommit() (value *CommitResponse, err error) { return } if mTypeId == thrift.EXCEPTION { - error28 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error29 error - error29, err = error28.Read(iprot) + error30 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error31 error + error31, err = error30.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error29 + err = error31 return } if p.SeqId != seqId { @@ -710,9 +714,8 @@ func (p *MessageServiceClient) recvCommit() (value *CommitResponse, err error) { // Rollback transaction message; // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) Rollback(request *RollbackRequest) (r *RollbackResponse, err error) { if err = p.sendRollback(request); err != nil { return @@ -753,16 +756,16 @@ func (p *MessageServiceClient) recvRollback() (value *RollbackResponse, err erro return } if mTypeId == thrift.EXCEPTION { - error30 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error31 error - error31, err = error30.Read(iprot) + error32 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error33 error + error33, err = error32.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error31 + err = error33 return } if p.SeqId != seqId { @@ -786,9 +789,8 @@ func (p *MessageServiceClient) recvRollback() (value *RollbackResponse, err erro // get list of unkown status transaction for callback // -// // Parameters: -// - Request +// - Request func (p *MessageServiceClient) GetUnkownStateTransaction(request *GetUnkownStateTransactionRequest) (r *GetUnkownStateTransactionResponse, err error) { if err = p.sendGetUnkownStateTransaction(request); err != nil { return @@ -829,16 +831,16 @@ func (p *MessageServiceClient) recvGetUnkownStateTransaction() (value *GetUnkown return } if mTypeId == thrift.EXCEPTION { - error32 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error33 error - error33, err = error32.Read(iprot) + error34 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error35 error + error35, err = error34.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error33 + err = error35 return } if p.SeqId != seqId { @@ -860,29 +862,103 @@ func (p *MessageServiceClient) recvGetUnkownStateTransaction() (value *GetUnkown return } -// look up all topics and partition number that match topic pattern +// get partition offsets for time index // +// Parameters: +// - Request +func (p *MessageServiceClient) GetTopicCheckpoint(request *GetCheckpointRequest) (r *GetCheckpointResponse, err error) { + if err = p.sendGetTopicCheckpoint(request); err != nil { + return + } + return p.recvGetTopicCheckpoint() +} + +func (p *MessageServiceClient) sendGetTopicCheckpoint(request *GetCheckpointRequest) (err error) { + oprot := p.OutputProtocol + if oprot == nil { + oprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.OutputProtocol = oprot + } + p.SeqId++ + if err = oprot.WriteMessageBegin("getTopicCheckpoint", thrift.CALL, p.SeqId); err != nil { + return + } + args := GetTopicCheckpointArgs{ + Request: request, + } + if err = args.Write(oprot); err != nil { + return + } + if err = oprot.WriteMessageEnd(); err != nil { + return + } + return oprot.Flush() +} + +func (p *MessageServiceClient) recvGetTopicCheckpoint() (value *GetCheckpointResponse, err error) { + iprot := p.InputProtocol + if iprot == nil { + iprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.InputProtocol = iprot + } + _, mTypeId, seqId, err := iprot.ReadMessageBegin() + if err != nil { + return + } + if mTypeId == thrift.EXCEPTION { + error36 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error37 error + error37, err = error36.Read(iprot) + if err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + err = error37 + return + } + if p.SeqId != seqId { + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getTopicCheckpoint failed: out of sequence response") + return + } + result := GetTopicCheckpointResult{} + if err = result.Read(iprot); err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + if result.E != nil { + err = result.E + return + } + value = result.GetSuccess() + return +} + +// getPartitionCheckpoint by timeIndex // // Parameters: -// - Request -func (p *MessageServiceClient) LookupTopics(request *LookupTopicsRequest) (r *LookupTopicsResponse, err error) { - if err = p.sendLookupTopics(request); err != nil { +// - Request +func (p *MessageServiceClient) GetPartitionCheckpoint(request *GetPartitionCheckpointRequest) (r *GetPartitionCheckpointResponse, err error) { + if err = p.sendGetPartitionCheckpoint(request); err != nil { return } - return p.recvLookupTopics() + return p.recvGetPartitionCheckpoint() } -func (p *MessageServiceClient) sendLookupTopics(request *LookupTopicsRequest) (err error) { +func (p *MessageServiceClient) sendGetPartitionCheckpoint(request *GetPartitionCheckpointRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("lookupTopics", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("getPartitionCheckpoint", thrift.CALL, p.SeqId); err != nil { return } - args := LookupTopicsArgs{ + args := GetPartitionCheckpointArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -894,7 +970,7 @@ func (p *MessageServiceClient) sendLookupTopics(request *LookupTopicsRequest) (e return oprot.Flush() } -func (p *MessageServiceClient) recvLookupTopics() (value *LookupTopicsResponse, err error) { +func (p *MessageServiceClient) recvGetPartitionCheckpoint() (value *GetPartitionCheckpointResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -905,23 +981,23 @@ func (p *MessageServiceClient) recvLookupTopics() (value *LookupTopicsResponse, return } if mTypeId == thrift.EXCEPTION { - error34 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error35 error - error35, err = error34.Read(iprot) + error38 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error39 error + error39, err = error38.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error35 + err = error39 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "lookupTopics failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getPartitionCheckpoint failed: out of sequence response") return } - result := LookupTopicsResult{} + result := GetPartitionCheckpointResult{} if err = result.Read(iprot); err != nil { return } @@ -936,24 +1012,100 @@ func (p *MessageServiceClient) recvLookupTopics() (value *LookupTopicsResponse, return } +// deleteMessageIndex from startOffset to endOffset +// +// Parameters: +// - Request +func (p *MessageServiceClient) DeleteMessageIndex(request *DeleteMessageIndexRequest) (err error) { + if err = p.sendDeleteMessageIndex(request); err != nil { + return + } + return p.recvDeleteMessageIndex() +} + +func (p *MessageServiceClient) sendDeleteMessageIndex(request *DeleteMessageIndexRequest) (err error) { + oprot := p.OutputProtocol + if oprot == nil { + oprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.OutputProtocol = oprot + } + p.SeqId++ + if err = oprot.WriteMessageBegin("deleteMessageIndex", thrift.CALL, p.SeqId); err != nil { + return + } + args := DeleteMessageIndexArgs{ + Request: request, + } + if err = args.Write(oprot); err != nil { + return + } + if err = oprot.WriteMessageEnd(); err != nil { + return + } + return oprot.Flush() +} + +func (p *MessageServiceClient) recvDeleteMessageIndex() (err error) { + iprot := p.InputProtocol + if iprot == nil { + iprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.InputProtocol = iprot + } + _, mTypeId, seqId, err := iprot.ReadMessageBegin() + if err != nil { + return + } + if mTypeId == thrift.EXCEPTION { + error40 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error41 error + error41, err = error40.Read(iprot) + if err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + err = error41 + return + } + if p.SeqId != seqId { + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "deleteMessageIndex failed: out of sequence response") + return + } + result := DeleteMessageIndexResult{} + if err = result.Read(iprot); err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + if result.E != nil { + err = result.E + return + } + return +} + type MessageServiceProcessor struct { *common.TalosBaseServiceProcessor } func NewMessageServiceProcessor(handler MessageService) *MessageServiceProcessor { - self36 := &MessageServiceProcessor{common.NewTalosBaseServiceProcessor(handler)} - self36.AddToProcessorMap("putMessage", &messageServiceProcessorPutMessage{handler: handler}) - self36.AddToProcessorMap("getMessage", &messageServiceProcessorGetMessage{handler: handler}) - self36.AddToProcessorMap("getTopicOffset", &messageServiceProcessorGetTopicOffset{handler: handler}) - self36.AddToProcessorMap("getPartitionOffset", &messageServiceProcessorGetPartitionOffset{handler: handler}) - self36.AddToProcessorMap("getPartitionsOffset", &messageServiceProcessorGetPartitionsOffset{handler: handler}) - self36.AddToProcessorMap("getScheduleInfo", &messageServiceProcessorGetScheduleInfo{handler: handler}) - self36.AddToProcessorMap("prepare", &messageServiceProcessorPrepare{handler: handler}) - self36.AddToProcessorMap("commit", &messageServiceProcessorCommit{handler: handler}) - self36.AddToProcessorMap("rollback", &messageServiceProcessorRollback{handler: handler}) - self36.AddToProcessorMap("getUnkownStateTransaction", &messageServiceProcessorGetUnkownStateTransaction{handler: handler}) - self36.AddToProcessorMap("lookupTopics", &messageServiceProcessorLookupTopics{handler: handler}) - return self36 + self42 := &MessageServiceProcessor{common.NewTalosBaseServiceProcessor(handler)} + self42.AddToProcessorMap("putMessage", &messageServiceProcessorPutMessage{handler: handler}) + self42.AddToProcessorMap("getMessage", &messageServiceProcessorGetMessage{handler: handler}) + self42.AddToProcessorMap("getTopicOffset", &messageServiceProcessorGetTopicOffset{handler: handler}) + self42.AddToProcessorMap("getPartitionOffset", &messageServiceProcessorGetPartitionOffset{handler: handler}) + self42.AddToProcessorMap("getPartitionsOffset", &messageServiceProcessorGetPartitionsOffset{handler: handler}) + self42.AddToProcessorMap("getScheduleInfo", &messageServiceProcessorGetScheduleInfo{handler: handler}) + self42.AddToProcessorMap("prepare", &messageServiceProcessorPrepare{handler: handler}) + self42.AddToProcessorMap("commit", &messageServiceProcessorCommit{handler: handler}) + self42.AddToProcessorMap("rollback", &messageServiceProcessorRollback{handler: handler}) + self42.AddToProcessorMap("getUnkownStateTransaction", &messageServiceProcessorGetUnkownStateTransaction{handler: handler}) + self42.AddToProcessorMap("getTopicCheckpoint", &messageServiceProcessorGetTopicCheckpoint{handler: handler}) + self42.AddToProcessorMap("getPartitionCheckpoint", &messageServiceProcessorGetPartitionCheckpoint{handler: handler}) + self42.AddToProcessorMap("deleteMessageIndex", &messageServiceProcessorDeleteMessageIndex{handler: handler}) + return self42 } type messageServiceProcessorPutMessage struct { @@ -1481,16 +1633,16 @@ func (p *messageServiceProcessorGetUnkownStateTransaction) Process(seqId int32, return true, err } -type messageServiceProcessorLookupTopics struct { +type messageServiceProcessorGetTopicCheckpoint struct { handler MessageService } -func (p *messageServiceProcessorLookupTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := LookupTopicsArgs{} +func (p *messageServiceProcessorGetTopicCheckpoint) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := GetTopicCheckpointArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("lookupTopics", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("getTopicCheckpoint", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -1498,16 +1650,16 @@ func (p *messageServiceProcessorLookupTopics) Process(seqId int32, iprot, oprot } iprot.ReadMessageEnd() - result := LookupTopicsResult{} - var retval *LookupTopicsResponse + result := GetTopicCheckpointResult{} + var retval *GetCheckpointResponse var err2 error - if retval, err2 = p.handler.LookupTopics(args.Request); err2 != nil { + if retval, err2 = p.handler.GetTopicCheckpoint(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing lookupTopics: "+err2.Error()) - oprot.WriteMessageBegin("lookupTopics", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTopicCheckpoint: "+err2.Error()) + oprot.WriteMessageBegin("getTopicCheckpoint", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -1516,7 +1668,7 @@ func (p *messageServiceProcessorLookupTopics) Process(seqId int32, iprot, oprot } else { result.Success = retval } - if err2 = oprot.WriteMessageBegin("lookupTopics", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("getTopicCheckpoint", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -1534,42 +1686,145 @@ func (p *messageServiceProcessorLookupTopics) Process(seqId int32, iprot, oprot return true, err } -// HELPER FUNCTIONS AND STRUCTURES - -type PutMessageArgs struct { - Request *PutMessageRequest `thrift:"request,1" json:"request"` -} - -func NewPutMessageArgs() *PutMessageArgs { - return &PutMessageArgs{} +type messageServiceProcessorGetPartitionCheckpoint struct { + handler MessageService } -var PutMessageArgs_Request_DEFAULT *PutMessageRequest - -func (p *PutMessageArgs) GetRequest() *PutMessageRequest { - if !p.IsSetRequest() { - return PutMessageArgs_Request_DEFAULT +func (p *messageServiceProcessorGetPartitionCheckpoint) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := GetPartitionCheckpointArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("getPartitionCheckpoint", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err } - return p.Request -} -func (p *PutMessageArgs) IsSetRequest() bool { - return p.Request != nil -} -func (p *PutMessageArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return fmt.Errorf("%T read error: %s", p, err) - } - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: + iprot.ReadMessageEnd() + result := GetPartitionCheckpointResult{} + var retval *GetPartitionCheckpointResponse + var err2 error + if retval, err2 = p.handler.GetPartitionCheckpoint(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getPartitionCheckpoint: "+err2.Error()) + oprot.WriteMessageBegin("getPartitionCheckpoint", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("getPartitionCheckpoint", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type messageServiceProcessorDeleteMessageIndex struct { + handler MessageService +} + +func (p *messageServiceProcessorDeleteMessageIndex) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := DeleteMessageIndexArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("deleteMessageIndex", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := DeleteMessageIndexResult{} + var err2 error + if err2 = p.handler.DeleteMessageIndex(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteMessageIndex: "+err2.Error()) + oprot.WriteMessageBegin("deleteMessageIndex", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } + if err2 = oprot.WriteMessageBegin("deleteMessageIndex", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +// HELPER FUNCTIONS AND STRUCTURES + +type PutMessageArgs struct { + Request *PutMessageRequest `thrift:"request,1" json:"request"` +} + +func NewPutMessageArgs() *PutMessageArgs { + return &PutMessageArgs{} +} + +var PutMessageArgs_Request_DEFAULT *PutMessageRequest + +func (p *PutMessageArgs) GetRequest() *PutMessageRequest { + if !p.IsSetRequest() { + return PutMessageArgs_Request_DEFAULT + } + return p.Request +} +func (p *PutMessageArgs) IsSetRequest() bool { + return p.Request != nil +} + +func (p *PutMessageArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: if err := p.ReadField1(iprot); err != nil { return err } @@ -3878,27 +4133,27 @@ func (p *GetUnkownStateTransactionResult) String() string { return fmt.Sprintf("GetUnkownStateTransactionResult(%+v)", *p) } -type LookupTopicsArgs struct { - Request *LookupTopicsRequest `thrift:"request,1" json:"request"` +type GetTopicCheckpointArgs struct { + Request *GetCheckpointRequest `thrift:"request,1" json:"request"` } -func NewLookupTopicsArgs() *LookupTopicsArgs { - return &LookupTopicsArgs{} +func NewGetTopicCheckpointArgs() *GetTopicCheckpointArgs { + return &GetTopicCheckpointArgs{} } -var LookupTopicsArgs_Request_DEFAULT *LookupTopicsRequest +var GetTopicCheckpointArgs_Request_DEFAULT *GetCheckpointRequest -func (p *LookupTopicsArgs) GetRequest() *LookupTopicsRequest { +func (p *GetTopicCheckpointArgs) GetRequest() *GetCheckpointRequest { if !p.IsSetRequest() { - return LookupTopicsArgs_Request_DEFAULT + return GetTopicCheckpointArgs_Request_DEFAULT } return p.Request } -func (p *LookupTopicsArgs) IsSetRequest() bool { +func (p *GetTopicCheckpointArgs) IsSetRequest() bool { return p.Request != nil } -func (p *LookupTopicsArgs) Read(iprot thrift.TProtocol) error { +func (p *GetTopicCheckpointArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3930,16 +4185,16 @@ func (p *LookupTopicsArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &LookupTopicsRequest{} +func (p *GetTopicCheckpointArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &GetCheckpointRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *LookupTopicsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("lookupTopics_args"); err != nil { +func (p *GetTopicCheckpointArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getTopicCheckpoint_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3954,7 +4209,7 @@ func (p *LookupTopicsArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *GetTopicCheckpointArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -3967,48 +4222,286 @@ func (p *LookupTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *LookupTopicsArgs) String() string { +func (p *GetTopicCheckpointArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("LookupTopicsArgs(%+v)", *p) + return fmt.Sprintf("GetTopicCheckpointArgs(%+v)", *p) } -type LookupTopicsResult struct { - Success *LookupTopicsResponse `thrift:"success,0" json:"success"` +type GetTopicCheckpointResult struct { + Success *GetCheckpointResponse `thrift:"success,0" json:"success"` E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -func NewLookupTopicsResult() *LookupTopicsResult { - return &LookupTopicsResult{} +func NewGetTopicCheckpointResult() *GetTopicCheckpointResult { + return &GetTopicCheckpointResult{} +} + +var GetTopicCheckpointResult_Success_DEFAULT *GetCheckpointResponse + +func (p *GetTopicCheckpointResult) GetSuccess() *GetCheckpointResponse { + if !p.IsSetSuccess() { + return GetTopicCheckpointResult_Success_DEFAULT + } + return p.Success +} + +var GetTopicCheckpointResult_E_DEFAULT *common.GalaxyTalosException + +func (p *GetTopicCheckpointResult) GetE() *common.GalaxyTalosException { + if !p.IsSetE() { + return GetTopicCheckpointResult_E_DEFAULT + } + return p.E +} +func (p *GetTopicCheckpointResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *GetTopicCheckpointResult) IsSetE() bool { + return p.E != nil +} + +func (p *GetTopicCheckpointResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 0: + if err := p.ReadField0(iprot); err != nil { + return err + } + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *GetTopicCheckpointResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &GetCheckpointResponse{} + if err := p.Success.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Success, err) + } + return nil +} + +func (p *GetTopicCheckpointResult) ReadField1(iprot thrift.TProtocol) error { + p.E = &common.GalaxyTalosException{} + if err := p.E.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.E, err) + } + return nil +} + +func (p *GetTopicCheckpointResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getTopicCheckpoint_result"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField0(oprot); err != nil { + return err + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *GetTopicCheckpointResult) writeField0(oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + return fmt.Errorf("%T write field begin error 0:success: %s", p, err) + } + if err := p.Success.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Success, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 0:success: %s", p, err) + } + } + return err +} + +func (p *GetTopicCheckpointResult) writeField1(oprot thrift.TProtocol) (err error) { + if p.IsSetE() { + if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:e: %s", p, err) + } + if err := p.E.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.E, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:e: %s", p, err) + } + } + return err +} + +func (p *GetTopicCheckpointResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("GetTopicCheckpointResult(%+v)", *p) +} + +type GetPartitionCheckpointArgs struct { + Request *GetPartitionCheckpointRequest `thrift:"request,1" json:"request"` +} + +func NewGetPartitionCheckpointArgs() *GetPartitionCheckpointArgs { + return &GetPartitionCheckpointArgs{} +} + +var GetPartitionCheckpointArgs_Request_DEFAULT *GetPartitionCheckpointRequest + +func (p *GetPartitionCheckpointArgs) GetRequest() *GetPartitionCheckpointRequest { + if !p.IsSetRequest() { + return GetPartitionCheckpointArgs_Request_DEFAULT + } + return p.Request +} +func (p *GetPartitionCheckpointArgs) IsSetRequest() bool { + return p.Request != nil +} + +func (p *GetPartitionCheckpointArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *GetPartitionCheckpointArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &GetPartitionCheckpointRequest{} + if err := p.Request.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Request, err) + } + return nil +} + +func (p *GetPartitionCheckpointArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getPartitionCheckpoint_args"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *GetPartitionCheckpointArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:request: %s", p, err) + } + if err := p.Request.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Request, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:request: %s", p, err) + } + return err +} + +func (p *GetPartitionCheckpointArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("GetPartitionCheckpointArgs(%+v)", *p) +} + +type GetPartitionCheckpointResult struct { + Success *GetPartitionCheckpointResponse `thrift:"success,0" json:"success"` + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -var LookupTopicsResult_Success_DEFAULT *LookupTopicsResponse +func NewGetPartitionCheckpointResult() *GetPartitionCheckpointResult { + return &GetPartitionCheckpointResult{} +} -func (p *LookupTopicsResult) GetSuccess() *LookupTopicsResponse { +var GetPartitionCheckpointResult_Success_DEFAULT *GetPartitionCheckpointResponse + +func (p *GetPartitionCheckpointResult) GetSuccess() *GetPartitionCheckpointResponse { if !p.IsSetSuccess() { - return LookupTopicsResult_Success_DEFAULT + return GetPartitionCheckpointResult_Success_DEFAULT } return p.Success } -var LookupTopicsResult_E_DEFAULT *common.GalaxyTalosException +var GetPartitionCheckpointResult_E_DEFAULT *common.GalaxyTalosException -func (p *LookupTopicsResult) GetE() *common.GalaxyTalosException { +func (p *GetPartitionCheckpointResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return LookupTopicsResult_E_DEFAULT + return GetPartitionCheckpointResult_E_DEFAULT } return p.E } -func (p *LookupTopicsResult) IsSetSuccess() bool { +func (p *GetPartitionCheckpointResult) IsSetSuccess() bool { return p.Success != nil } -func (p *LookupTopicsResult) IsSetE() bool { +func (p *GetPartitionCheckpointResult) IsSetE() bool { return p.E != nil } -func (p *LookupTopicsResult) Read(iprot thrift.TProtocol) error { +func (p *GetPartitionCheckpointResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4044,15 +4537,15 @@ func (p *LookupTopicsResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = &LookupTopicsResponse{} +func (p *GetPartitionCheckpointResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &GetPartitionCheckpointResponse{} if err := p.Success.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Success, err) } return nil } -func (p *LookupTopicsResult) ReadField1(iprot thrift.TProtocol) error { +func (p *GetPartitionCheckpointResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -4060,8 +4553,8 @@ func (p *LookupTopicsResult) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("lookupTopics_result"); err != nil { +func (p *GetPartitionCheckpointResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("getPartitionCheckpoint_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField0(oprot); err != nil { @@ -4079,7 +4572,7 @@ func (p *LookupTopicsResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *GetPartitionCheckpointResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) @@ -4094,7 +4587,201 @@ func (p *LookupTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { return err } -func (p *LookupTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *GetPartitionCheckpointResult) writeField1(oprot thrift.TProtocol) (err error) { + if p.IsSetE() { + if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:e: %s", p, err) + } + if err := p.E.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.E, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:e: %s", p, err) + } + } + return err +} + +func (p *GetPartitionCheckpointResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("GetPartitionCheckpointResult(%+v)", *p) +} + +type DeleteMessageIndexArgs struct { + Request *DeleteMessageIndexRequest `thrift:"request,1" json:"request"` +} + +func NewDeleteMessageIndexArgs() *DeleteMessageIndexArgs { + return &DeleteMessageIndexArgs{} +} + +var DeleteMessageIndexArgs_Request_DEFAULT *DeleteMessageIndexRequest + +func (p *DeleteMessageIndexArgs) GetRequest() *DeleteMessageIndexRequest { + if !p.IsSetRequest() { + return DeleteMessageIndexArgs_Request_DEFAULT + } + return p.Request +} +func (p *DeleteMessageIndexArgs) IsSetRequest() bool { + return p.Request != nil +} + +func (p *DeleteMessageIndexArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *DeleteMessageIndexArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &DeleteMessageIndexRequest{} + if err := p.Request.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Request, err) + } + return nil +} + +func (p *DeleteMessageIndexArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteMessageIndex_args"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *DeleteMessageIndexArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:request: %s", p, err) + } + if err := p.Request.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Request, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:request: %s", p, err) + } + return err +} + +func (p *DeleteMessageIndexArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("DeleteMessageIndexArgs(%+v)", *p) +} + +type DeleteMessageIndexResult struct { + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` +} + +func NewDeleteMessageIndexResult() *DeleteMessageIndexResult { + return &DeleteMessageIndexResult{} +} + +var DeleteMessageIndexResult_E_DEFAULT *common.GalaxyTalosException + +func (p *DeleteMessageIndexResult) GetE() *common.GalaxyTalosException { + if !p.IsSetE() { + return DeleteMessageIndexResult_E_DEFAULT + } + return p.E +} +func (p *DeleteMessageIndexResult) IsSetE() bool { + return p.E != nil +} + +func (p *DeleteMessageIndexResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *DeleteMessageIndexResult) ReadField1(iprot thrift.TProtocol) error { + p.E = &common.GalaxyTalosException{} + if err := p.E.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.E, err) + } + return nil +} + +func (p *DeleteMessageIndexResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteMessageIndex_result"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *DeleteMessageIndexResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -4109,9 +4796,9 @@ func (p *LookupTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *LookupTopicsResult) String() string { +func (p *DeleteMessageIndexResult) String() string { if p == nil { return "" } - return fmt.Sprintf("LookupTopicsResult(%+v)", *p) + return fmt.Sprintf("DeleteMessageIndexResult(%+v)", *p) } diff --git a/thrift/message/ttypes.go b/thrift/message/ttypes.go index d7828bc..65232b9 100644 --- a/thrift/message/ttypes.go +++ b/thrift/message/ttypes.go @@ -5419,18 +5419,32 @@ func (p *GetScheduleInfoResponse) String() string { return fmt.Sprintf("GetScheduleInfoResponse(%+v)", *p) } -type LookupTopicsRequest struct { - TopicGroup string `thrift:"topicGroup,1,required" json:"topicGroup"` +type GetCheckpointRequest struct { + TopicTalosResourceName *topic.TopicTalosResourceName `thrift:"topicTalosResourceName,1,required" json:"topicTalosResourceName"` + PartitionTimeIndexMap map[int32]int64 `thrift:"partitionTimeIndexMap,2,required" json:"partitionTimeIndexMap"` +} + +func NewGetCheckpointRequest() *GetCheckpointRequest { + return &GetCheckpointRequest{} } -func NewLookupTopicsRequest() *LookupTopicsRequest { - return &LookupTopicsRequest{} +var GetCheckpointRequest_TopicTalosResourceName_DEFAULT *topic.TopicTalosResourceName + +func (p *GetCheckpointRequest) GetTopicTalosResourceName() *topic.TopicTalosResourceName { + if !p.IsSetTopicTalosResourceName() { + return GetCheckpointRequest_TopicTalosResourceName_DEFAULT + } + return p.TopicTalosResourceName } -func (p *LookupTopicsRequest) GetTopicGroup() string { - return p.TopicGroup +func (p *GetCheckpointRequest) GetPartitionTimeIndexMap() map[int32]int64 { + return p.PartitionTimeIndexMap +} +func (p *GetCheckpointRequest) IsSetTopicTalosResourceName() bool { + return p.TopicTalosResourceName != nil } -func (p *LookupTopicsRequest) Read(iprot thrift.TProtocol) error { + +func (p *GetCheckpointRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -5447,6 +5461,10 @@ func (p *LookupTopicsRequest) Read(iprot thrift.TProtocol) error { if err := p.ReadField1(iprot); err != nil { return err } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -5462,22 +5480,52 @@ func (p *LookupTopicsRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsRequest) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return fmt.Errorf("error reading field 1: %s", err) - } else { - p.TopicGroup = v +func (p *GetCheckpointRequest) ReadField1(iprot thrift.TProtocol) error { + p.TopicTalosResourceName = &topic.TopicTalosResourceName{} + if err := p.TopicTalosResourceName.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicTalosResourceName, err) } return nil } -func (p *LookupTopicsRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("LookupTopicsRequest"); err != nil { +func (p *GetCheckpointRequest) ReadField2(iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin() + if err != nil { + return fmt.Errorf("error reading map begin: %s", err) + } + tMap := make(map[int32]int64, size) + p.PartitionTimeIndexMap = tMap + for i := 0; i < size; i++ { + var _key12 int32 + if v, err := iprot.ReadI32(); err != nil { + return fmt.Errorf("error reading field 0: %s", err) + } else { + _key12 = v + } + var _val13 int64 + if v, err := iprot.ReadI64(); err != nil { + return fmt.Errorf("error reading field 0: %s", err) + } else { + _val13 = v + } + p.PartitionTimeIndexMap[_key12] = _val13 + } + if err := iprot.ReadMapEnd(); err != nil { + return fmt.Errorf("error reading map end: %s", err) + } + return nil +} + +func (p *GetCheckpointRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetCheckpointRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { + return err + } if err := oprot.WriteFieldStop(); err != nil { return fmt.Errorf("write field stop error: %s", err) } @@ -5487,38 +5535,62 @@ func (p *LookupTopicsRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicGroup", thrift.STRING, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topicGroup: %s", p, err) +func (p *GetCheckpointRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicTalosResourceName", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicTalosResourceName: %s", p, err) + } + if err := p.TopicTalosResourceName.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicTalosResourceName, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicTalosResourceName: %s", p, err) + } + return err +} + +func (p *GetCheckpointRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("partitionTimeIndexMap", thrift.MAP, 2); err != nil { + return fmt.Errorf("%T write field begin error 2:partitionTimeIndexMap: %s", p, err) + } + if err := oprot.WriteMapBegin(thrift.I32, thrift.I64, len(p.PartitionTimeIndexMap)); err != nil { + return fmt.Errorf("error writing map begin: %s", err) } - if err := oprot.WriteString(string(p.TopicGroup)); err != nil { - return fmt.Errorf("%T.topicGroup (1) field write error: %s", p, err) + for k, v := range p.PartitionTimeIndexMap { + if err := oprot.WriteI32(int32(k)); err != nil { + return fmt.Errorf("%T. (0) field write error: %s", p, err) + } + if err := oprot.WriteI64(int64(v)); err != nil { + return fmt.Errorf("%T. (0) field write error: %s", p, err) + } + } + if err := oprot.WriteMapEnd(); err != nil { + return fmt.Errorf("error writing map end: %s", err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topicGroup: %s", p, err) + return fmt.Errorf("%T write field end error 2:partitionTimeIndexMap: %s", p, err) } return err } -func (p *LookupTopicsRequest) String() string { +func (p *GetCheckpointRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("LookupTopicsRequest(%+v)", *p) + return fmt.Sprintf("GetCheckpointRequest(%+v)", *p) } -type LookupTopicsResponse struct { - Topics map[string]int32 `thrift:"topics,1,required" json:"topics"` +type GetCheckpointResponse struct { + PartitionsCheckPoint map[int32]int64 `thrift:"partitionsCheckPoint,1,required" json:"partitionsCheckPoint"` } -func NewLookupTopicsResponse() *LookupTopicsResponse { - return &LookupTopicsResponse{} +func NewGetCheckpointResponse() *GetCheckpointResponse { + return &GetCheckpointResponse{} } -func (p *LookupTopicsResponse) GetTopics() map[string]int32 { - return p.Topics +func (p *GetCheckpointResponse) GetPartitionsCheckPoint() map[int32]int64 { + return p.PartitionsCheckPoint } -func (p *LookupTopicsResponse) Read(iprot thrift.TProtocol) error { +func (p *GetCheckpointResponse) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -5550,27 +5622,27 @@ func (p *LookupTopicsResponse) Read(iprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsResponse) ReadField1(iprot thrift.TProtocol) error { +func (p *GetCheckpointResponse) ReadField1(iprot thrift.TProtocol) error { _, _, size, err := iprot.ReadMapBegin() if err != nil { return fmt.Errorf("error reading map begin: %s", err) } - tMap := make(map[string]int32, size) - p.Topics = tMap + tMap := make(map[int32]int64, size) + p.PartitionsCheckPoint = tMap for i := 0; i < size; i++ { - var _key12 string - if v, err := iprot.ReadString(); err != nil { + var _key14 int32 + if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { - _key12 = v + _key14 = v } - var _val13 int32 - if v, err := iprot.ReadI32(); err != nil { + var _val15 int64 + if v, err := iprot.ReadI64(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { - _val13 = v + _val15 = v } - p.Topics[_key12] = _val13 + p.PartitionsCheckPoint[_key14] = _val15 } if err := iprot.ReadMapEnd(); err != nil { return fmt.Errorf("error reading map end: %s", err) @@ -5578,8 +5650,8 @@ func (p *LookupTopicsResponse) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsResponse) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("LookupTopicsResponse"); err != nil { +func (p *GetCheckpointResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetCheckpointResponse"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -5594,18 +5666,18 @@ func (p *LookupTopicsResponse) Write(oprot thrift.TProtocol) error { return nil } -func (p *LookupTopicsResponse) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topics", thrift.MAP, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topics: %s", p, err) +func (p *GetCheckpointResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("partitionsCheckPoint", thrift.MAP, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:partitionsCheckPoint: %s", p, err) } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.I32, len(p.Topics)); err != nil { + if err := oprot.WriteMapBegin(thrift.I32, thrift.I64, len(p.PartitionsCheckPoint)); err != nil { return fmt.Errorf("error writing map begin: %s", err) } - for k, v := range p.Topics { - if err := oprot.WriteString(string(k)); err != nil { + for k, v := range p.PartitionsCheckPoint { + if err := oprot.WriteI32(int32(k)); err != nil { return fmt.Errorf("%T. (0) field write error: %s", p, err) } - if err := oprot.WriteI32(int32(v)); err != nil { + if err := oprot.WriteI64(int64(v)); err != nil { return fmt.Errorf("%T. (0) field write error: %s", p, err) } } @@ -5613,14 +5685,396 @@ func (p *LookupTopicsResponse) writeField1(oprot thrift.TProtocol) (err error) { return fmt.Errorf("error writing map end: %s", err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topics: %s", p, err) + return fmt.Errorf("%T write field end error 1:partitionsCheckPoint: %s", p, err) + } + return err +} + +func (p *GetCheckpointResponse) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("GetCheckpointResponse(%+v)", *p) +} + +type GetPartitionCheckpointRequest struct { + TopicAndPartition *topic.TopicAndPartition `thrift:"topicAndPartition,1,required" json:"topicAndPartition"` + PartitionTimeIndex int64 `thrift:"partitionTimeIndex,2,required" json:"partitionTimeIndex"` +} + +func NewGetPartitionCheckpointRequest() *GetPartitionCheckpointRequest { + return &GetPartitionCheckpointRequest{} +} + +var GetPartitionCheckpointRequest_TopicAndPartition_DEFAULT *topic.TopicAndPartition + +func (p *GetPartitionCheckpointRequest) GetTopicAndPartition() *topic.TopicAndPartition { + if !p.IsSetTopicAndPartition() { + return GetPartitionCheckpointRequest_TopicAndPartition_DEFAULT + } + return p.TopicAndPartition +} + +func (p *GetPartitionCheckpointRequest) GetPartitionTimeIndex() int64 { + return p.PartitionTimeIndex +} +func (p *GetPartitionCheckpointRequest) IsSetTopicAndPartition() bool { + return p.TopicAndPartition != nil +} + +func (p *GetPartitionCheckpointRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *GetPartitionCheckpointRequest) ReadField1(iprot thrift.TProtocol) error { + p.TopicAndPartition = &topic.TopicAndPartition{} + if err := p.TopicAndPartition.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicAndPartition, err) + } + return nil +} + +func (p *GetPartitionCheckpointRequest) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { + return fmt.Errorf("error reading field 2: %s", err) + } else { + p.PartitionTimeIndex = v + } + return nil +} + +func (p *GetPartitionCheckpointRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetPartitionCheckpointRequest"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := p.writeField2(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *GetPartitionCheckpointRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicAndPartition", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicAndPartition: %s", p, err) + } + if err := p.TopicAndPartition.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicAndPartition, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicAndPartition: %s", p, err) + } + return err +} + +func (p *GetPartitionCheckpointRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("partitionTimeIndex", thrift.I64, 2); err != nil { + return fmt.Errorf("%T write field begin error 2:partitionTimeIndex: %s", p, err) + } + if err := oprot.WriteI64(int64(p.PartitionTimeIndex)); err != nil { + return fmt.Errorf("%T.partitionTimeIndex (2) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 2:partitionTimeIndex: %s", p, err) + } + return err +} + +func (p *GetPartitionCheckpointRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("GetPartitionCheckpointRequest(%+v)", *p) +} + +type GetPartitionCheckpointResponse struct { + PartitionCheckPoint int64 `thrift:"partitionCheckPoint,1,required" json:"partitionCheckPoint"` +} + +func NewGetPartitionCheckpointResponse() *GetPartitionCheckpointResponse { + return &GetPartitionCheckpointResponse{} +} + +func (p *GetPartitionCheckpointResponse) GetPartitionCheckPoint() int64 { + return p.PartitionCheckPoint +} +func (p *GetPartitionCheckpointResponse) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *GetPartitionCheckpointResponse) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { + return fmt.Errorf("error reading field 1: %s", err) + } else { + p.PartitionCheckPoint = v + } + return nil +} + +func (p *GetPartitionCheckpointResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetPartitionCheckpointResponse"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *GetPartitionCheckpointResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("partitionCheckPoint", thrift.I64, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:partitionCheckPoint: %s", p, err) + } + if err := oprot.WriteI64(int64(p.PartitionCheckPoint)); err != nil { + return fmt.Errorf("%T.partitionCheckPoint (1) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:partitionCheckPoint: %s", p, err) + } + return err +} + +func (p *GetPartitionCheckpointResponse) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("GetPartitionCheckpointResponse(%+v)", *p) +} + +type DeleteMessageIndexRequest struct { + TopicAndPartition *topic.TopicAndPartition `thrift:"topicAndPartition,1,required" json:"topicAndPartition"` + StartOffset int64 `thrift:"startOffset,2,required" json:"startOffset"` + EndOffset int64 `thrift:"endOffset,3,required" json:"endOffset"` +} + +func NewDeleteMessageIndexRequest() *DeleteMessageIndexRequest { + return &DeleteMessageIndexRequest{} +} + +var DeleteMessageIndexRequest_TopicAndPartition_DEFAULT *topic.TopicAndPartition + +func (p *DeleteMessageIndexRequest) GetTopicAndPartition() *topic.TopicAndPartition { + if !p.IsSetTopicAndPartition() { + return DeleteMessageIndexRequest_TopicAndPartition_DEFAULT + } + return p.TopicAndPartition +} + +func (p *DeleteMessageIndexRequest) GetStartOffset() int64 { + return p.StartOffset +} + +func (p *DeleteMessageIndexRequest) GetEndOffset() int64 { + return p.EndOffset +} +func (p *DeleteMessageIndexRequest) IsSetTopicAndPartition() bool { + return p.TopicAndPartition != nil +} + +func (p *DeleteMessageIndexRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } + case 3: + if err := p.ReadField3(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *DeleteMessageIndexRequest) ReadField1(iprot thrift.TProtocol) error { + p.TopicAndPartition = &topic.TopicAndPartition{} + if err := p.TopicAndPartition.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicAndPartition, err) + } + return nil +} + +func (p *DeleteMessageIndexRequest) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { + return fmt.Errorf("error reading field 2: %s", err) + } else { + p.StartOffset = v + } + return nil +} + +func (p *DeleteMessageIndexRequest) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { + return fmt.Errorf("error reading field 3: %s", err) + } else { + p.EndOffset = v + } + return nil +} + +func (p *DeleteMessageIndexRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DeleteMessageIndexRequest"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := p.writeField2(oprot); err != nil { + return err + } + if err := p.writeField3(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *DeleteMessageIndexRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicAndPartition", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicAndPartition: %s", p, err) + } + if err := p.TopicAndPartition.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicAndPartition, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicAndPartition: %s", p, err) + } + return err +} + +func (p *DeleteMessageIndexRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("startOffset", thrift.I64, 2); err != nil { + return fmt.Errorf("%T write field begin error 2:startOffset: %s", p, err) + } + if err := oprot.WriteI64(int64(p.StartOffset)); err != nil { + return fmt.Errorf("%T.startOffset (2) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 2:startOffset: %s", p, err) + } + return err +} + +func (p *DeleteMessageIndexRequest) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("endOffset", thrift.I64, 3); err != nil { + return fmt.Errorf("%T write field begin error 3:endOffset: %s", p, err) + } + if err := oprot.WriteI64(int64(p.EndOffset)); err != nil { + return fmt.Errorf("%T.endOffset (3) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 3:endOffset: %s", p, err) } return err } -func (p *LookupTopicsResponse) String() string { +func (p *DeleteMessageIndexRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("LookupTopicsResponse(%+v)", *p) + return fmt.Sprintf("DeleteMessageIndexRequest(%+v)", *p) } diff --git a/thrift/topic/topic_service-remote/topic_service-remote.go b/thrift/topic/topic_service-remote/topic_service-remote.go index bf912a6..6990355 100755 --- a/thrift/topic/topic_service-remote/topic_service-remote.go +++ b/thrift/topic/topic_service-remote/topic_service-remote.go @@ -25,9 +25,15 @@ func Usage() { fmt.Fprintln(os.Stderr, " CreateTopicGroupResponse createTopicGroup(CreateTopicGroupRequest request)") fmt.Fprintln(os.Stderr, " DescribeTopicGroupResponse describeTopicGroup(DescribeTopicGroupRequest request)") fmt.Fprintln(os.Stderr, " void deleteTopicGroup(DeleteTopicGroupRequest request)") - fmt.Fprintln(os.Stderr, " ListTopicGroupResponse listTopicGroup(ListTopicGroupRequest request)") + fmt.Fprintln(os.Stderr, " ListTopicGroupResponse listTopicGroup()") + fmt.Fprintln(os.Stderr, " void updateTopicGroup(UpdateTopicGroupRequest request)") fmt.Fprintln(os.Stderr, " void deleteTopic(DeleteTopicRequest request)") + fmt.Fprintln(os.Stderr, " LookupTopicsResponse lookupTopics(LookupTopicsRequest request)") + fmt.Fprintln(os.Stderr, " MatchTopicsResponse matchTopics(MatchTopicsRequest request)") fmt.Fprintln(os.Stderr, " void changeTopicAttribute(ChangeTopicAttributeRequest request)") + fmt.Fprintln(os.Stderr, " void deleteTopicAttribute(DeleteTopicAttributeRequest request)") + fmt.Fprintln(os.Stderr, " void changeTopicOwnerInfo(ChangeTopicOwnerInfoRequest request)") + fmt.Fprintln(os.Stderr, " void changeReplicationTopicSourceInfo(ChangeReplicationTopicSourceInfoRequest request)") fmt.Fprintln(os.Stderr, " DescribeTopicResponse describeTopic(DescribeTopicRequest request)") fmt.Fprintln(os.Stderr, " GetDescribeInfoResponse getDescribeInfo(GetDescribeInfoRequest request)") fmt.Fprintln(os.Stderr, " GetTopicAttributeResponse getTopicAttribute(GetTopicAttributeRequest request)") @@ -143,19 +149,19 @@ func main() { fmt.Fprintln(os.Stderr, "CreateTopic requires 1 args") flag.Usage() } - arg63 := flag.Arg(1) - mbTrans64 := thrift.NewTMemoryBufferLen(len(arg63)) - defer mbTrans64.Close() - _, err65 := mbTrans64.WriteString(arg63) - if err65 != nil { + arg78 := flag.Arg(1) + mbTrans79 := thrift.NewTMemoryBufferLen(len(arg78)) + defer mbTrans79.Close() + _, err80 := mbTrans79.WriteString(arg78) + if err80 != nil { Usage() return } - factory66 := thrift.NewTSimpleJSONProtocolFactory() - jsProt67 := factory66.GetProtocol(mbTrans64) + factory81 := thrift.NewTSimpleJSONProtocolFactory() + jsProt82 := factory81.GetProtocol(mbTrans79) argvalue0 := topic.NewCreateTopicRequest() - err68 := argvalue0.Read(jsProt67) - if err68 != nil { + err83 := argvalue0.Read(jsProt82) + if err83 != nil { Usage() return } @@ -168,19 +174,19 @@ func main() { fmt.Fprintln(os.Stderr, "CreateReplicationTopic requires 1 args") flag.Usage() } - arg69 := flag.Arg(1) - mbTrans70 := thrift.NewTMemoryBufferLen(len(arg69)) - defer mbTrans70.Close() - _, err71 := mbTrans70.WriteString(arg69) - if err71 != nil { + arg84 := flag.Arg(1) + mbTrans85 := thrift.NewTMemoryBufferLen(len(arg84)) + defer mbTrans85.Close() + _, err86 := mbTrans85.WriteString(arg84) + if err86 != nil { Usage() return } - factory72 := thrift.NewTSimpleJSONProtocolFactory() - jsProt73 := factory72.GetProtocol(mbTrans70) + factory87 := thrift.NewTSimpleJSONProtocolFactory() + jsProt88 := factory87.GetProtocol(mbTrans85) argvalue0 := topic.NewCreateReplicationTopicRequest() - err74 := argvalue0.Read(jsProt73) - if err74 != nil { + err89 := argvalue0.Read(jsProt88) + if err89 != nil { Usage() return } @@ -193,19 +199,19 @@ func main() { fmt.Fprintln(os.Stderr, "CreateTopicGroup requires 1 args") flag.Usage() } - arg75 := flag.Arg(1) - mbTrans76 := thrift.NewTMemoryBufferLen(len(arg75)) - defer mbTrans76.Close() - _, err77 := mbTrans76.WriteString(arg75) - if err77 != nil { + arg90 := flag.Arg(1) + mbTrans91 := thrift.NewTMemoryBufferLen(len(arg90)) + defer mbTrans91.Close() + _, err92 := mbTrans91.WriteString(arg90) + if err92 != nil { Usage() return } - factory78 := thrift.NewTSimpleJSONProtocolFactory() - jsProt79 := factory78.GetProtocol(mbTrans76) + factory93 := thrift.NewTSimpleJSONProtocolFactory() + jsProt94 := factory93.GetProtocol(mbTrans91) argvalue0 := topic.NewCreateTopicGroupRequest() - err80 := argvalue0.Read(jsProt79) - if err80 != nil { + err95 := argvalue0.Read(jsProt94) + if err95 != nil { Usage() return } @@ -218,19 +224,19 @@ func main() { fmt.Fprintln(os.Stderr, "DescribeTopicGroup requires 1 args") flag.Usage() } - arg81 := flag.Arg(1) - mbTrans82 := thrift.NewTMemoryBufferLen(len(arg81)) - defer mbTrans82.Close() - _, err83 := mbTrans82.WriteString(arg81) - if err83 != nil { + arg96 := flag.Arg(1) + mbTrans97 := thrift.NewTMemoryBufferLen(len(arg96)) + defer mbTrans97.Close() + _, err98 := mbTrans97.WriteString(arg96) + if err98 != nil { Usage() return } - factory84 := thrift.NewTSimpleJSONProtocolFactory() - jsProt85 := factory84.GetProtocol(mbTrans82) + factory99 := thrift.NewTSimpleJSONProtocolFactory() + jsProt100 := factory99.GetProtocol(mbTrans97) argvalue0 := topic.NewDescribeTopicGroupRequest() - err86 := argvalue0.Read(jsProt85) - if err86 != nil { + err101 := argvalue0.Read(jsProt100) + if err101 != nil { Usage() return } @@ -243,19 +249,19 @@ func main() { fmt.Fprintln(os.Stderr, "DeleteTopicGroup requires 1 args") flag.Usage() } - arg87 := flag.Arg(1) - mbTrans88 := thrift.NewTMemoryBufferLen(len(arg87)) - defer mbTrans88.Close() - _, err89 := mbTrans88.WriteString(arg87) - if err89 != nil { + arg102 := flag.Arg(1) + mbTrans103 := thrift.NewTMemoryBufferLen(len(arg102)) + defer mbTrans103.Close() + _, err104 := mbTrans103.WriteString(arg102) + if err104 != nil { Usage() return } - factory90 := thrift.NewTSimpleJSONProtocolFactory() - jsProt91 := factory90.GetProtocol(mbTrans88) + factory105 := thrift.NewTSimpleJSONProtocolFactory() + jsProt106 := factory105.GetProtocol(mbTrans103) argvalue0 := topic.NewDeleteTopicGroupRequest() - err92 := argvalue0.Read(jsProt91) - if err92 != nil { + err107 := argvalue0.Read(jsProt106) + if err107 != nil { Usage() return } @@ -264,28 +270,36 @@ func main() { fmt.Print("\n") break case "listTopicGroup": + if flag.NArg()-1 != 0 { + fmt.Fprintln(os.Stderr, "ListTopicGroup requires 0 args") + flag.Usage() + } + fmt.Print(client.ListTopicGroup()) + fmt.Print("\n") + break + case "updateTopicGroup": if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "ListTopicGroup requires 1 args") + fmt.Fprintln(os.Stderr, "UpdateTopicGroup requires 1 args") flag.Usage() } - arg93 := flag.Arg(1) - mbTrans94 := thrift.NewTMemoryBufferLen(len(arg93)) - defer mbTrans94.Close() - _, err95 := mbTrans94.WriteString(arg93) - if err95 != nil { + arg108 := flag.Arg(1) + mbTrans109 := thrift.NewTMemoryBufferLen(len(arg108)) + defer mbTrans109.Close() + _, err110 := mbTrans109.WriteString(arg108) + if err110 != nil { Usage() return } - factory96 := thrift.NewTSimpleJSONProtocolFactory() - jsProt97 := factory96.GetProtocol(mbTrans94) - argvalue0 := topic.NewListTopicGroupRequest() - err98 := argvalue0.Read(jsProt97) - if err98 != nil { + factory111 := thrift.NewTSimpleJSONProtocolFactory() + jsProt112 := factory111.GetProtocol(mbTrans109) + argvalue0 := topic.NewUpdateTopicGroupRequest() + err113 := argvalue0.Read(jsProt112) + if err113 != nil { Usage() return } value0 := argvalue0 - fmt.Print(client.ListTopicGroup(value0)) + fmt.Print(client.UpdateTopicGroup(value0)) fmt.Print("\n") break case "deleteTopic": @@ -293,19 +307,19 @@ func main() { fmt.Fprintln(os.Stderr, "DeleteTopic requires 1 args") flag.Usage() } - arg99 := flag.Arg(1) - mbTrans100 := thrift.NewTMemoryBufferLen(len(arg99)) - defer mbTrans100.Close() - _, err101 := mbTrans100.WriteString(arg99) - if err101 != nil { + arg114 := flag.Arg(1) + mbTrans115 := thrift.NewTMemoryBufferLen(len(arg114)) + defer mbTrans115.Close() + _, err116 := mbTrans115.WriteString(arg114) + if err116 != nil { Usage() return } - factory102 := thrift.NewTSimpleJSONProtocolFactory() - jsProt103 := factory102.GetProtocol(mbTrans100) + factory117 := thrift.NewTSimpleJSONProtocolFactory() + jsProt118 := factory117.GetProtocol(mbTrans115) argvalue0 := topic.NewDeleteTopicRequest() - err104 := argvalue0.Read(jsProt103) - if err104 != nil { + err119 := argvalue0.Read(jsProt118) + if err119 != nil { Usage() return } @@ -313,24 +327,74 @@ func main() { fmt.Print(client.DeleteTopic(value0)) fmt.Print("\n") break + case "lookupTopics": + if flag.NArg()-1 != 1 { + fmt.Fprintln(os.Stderr, "LookupTopics requires 1 args") + flag.Usage() + } + arg120 := flag.Arg(1) + mbTrans121 := thrift.NewTMemoryBufferLen(len(arg120)) + defer mbTrans121.Close() + _, err122 := mbTrans121.WriteString(arg120) + if err122 != nil { + Usage() + return + } + factory123 := thrift.NewTSimpleJSONProtocolFactory() + jsProt124 := factory123.GetProtocol(mbTrans121) + argvalue0 := topic.NewLookupTopicsRequest() + err125 := argvalue0.Read(jsProt124) + if err125 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.LookupTopics(value0)) + fmt.Print("\n") + break + case "matchTopics": + if flag.NArg()-1 != 1 { + fmt.Fprintln(os.Stderr, "MatchTopics requires 1 args") + flag.Usage() + } + arg126 := flag.Arg(1) + mbTrans127 := thrift.NewTMemoryBufferLen(len(arg126)) + defer mbTrans127.Close() + _, err128 := mbTrans127.WriteString(arg126) + if err128 != nil { + Usage() + return + } + factory129 := thrift.NewTSimpleJSONProtocolFactory() + jsProt130 := factory129.GetProtocol(mbTrans127) + argvalue0 := topic.NewMatchTopicsRequest() + err131 := argvalue0.Read(jsProt130) + if err131 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.MatchTopics(value0)) + fmt.Print("\n") + break case "changeTopicAttribute": if flag.NArg()-1 != 1 { fmt.Fprintln(os.Stderr, "ChangeTopicAttribute requires 1 args") flag.Usage() } - arg105 := flag.Arg(1) - mbTrans106 := thrift.NewTMemoryBufferLen(len(arg105)) - defer mbTrans106.Close() - _, err107 := mbTrans106.WriteString(arg105) - if err107 != nil { + arg132 := flag.Arg(1) + mbTrans133 := thrift.NewTMemoryBufferLen(len(arg132)) + defer mbTrans133.Close() + _, err134 := mbTrans133.WriteString(arg132) + if err134 != nil { Usage() return } - factory108 := thrift.NewTSimpleJSONProtocolFactory() - jsProt109 := factory108.GetProtocol(mbTrans106) + factory135 := thrift.NewTSimpleJSONProtocolFactory() + jsProt136 := factory135.GetProtocol(mbTrans133) argvalue0 := topic.NewChangeTopicAttributeRequest() - err110 := argvalue0.Read(jsProt109) - if err110 != nil { + err137 := argvalue0.Read(jsProt136) + if err137 != nil { Usage() return } @@ -338,24 +402,99 @@ func main() { fmt.Print(client.ChangeTopicAttribute(value0)) fmt.Print("\n") break + case "deleteTopicAttribute": + if flag.NArg()-1 != 1 { + fmt.Fprintln(os.Stderr, "DeleteTopicAttribute requires 1 args") + flag.Usage() + } + arg138 := flag.Arg(1) + mbTrans139 := thrift.NewTMemoryBufferLen(len(arg138)) + defer mbTrans139.Close() + _, err140 := mbTrans139.WriteString(arg138) + if err140 != nil { + Usage() + return + } + factory141 := thrift.NewTSimpleJSONProtocolFactory() + jsProt142 := factory141.GetProtocol(mbTrans139) + argvalue0 := topic.NewDeleteTopicAttributeRequest() + err143 := argvalue0.Read(jsProt142) + if err143 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.DeleteTopicAttribute(value0)) + fmt.Print("\n") + break + case "changeTopicOwnerInfo": + if flag.NArg()-1 != 1 { + fmt.Fprintln(os.Stderr, "ChangeTopicOwnerInfo requires 1 args") + flag.Usage() + } + arg144 := flag.Arg(1) + mbTrans145 := thrift.NewTMemoryBufferLen(len(arg144)) + defer mbTrans145.Close() + _, err146 := mbTrans145.WriteString(arg144) + if err146 != nil { + Usage() + return + } + factory147 := thrift.NewTSimpleJSONProtocolFactory() + jsProt148 := factory147.GetProtocol(mbTrans145) + argvalue0 := topic.NewChangeTopicOwnerInfoRequest() + err149 := argvalue0.Read(jsProt148) + if err149 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.ChangeTopicOwnerInfo(value0)) + fmt.Print("\n") + break + case "changeReplicationTopicSourceInfo": + if flag.NArg()-1 != 1 { + fmt.Fprintln(os.Stderr, "ChangeReplicationTopicSourceInfo requires 1 args") + flag.Usage() + } + arg150 := flag.Arg(1) + mbTrans151 := thrift.NewTMemoryBufferLen(len(arg150)) + defer mbTrans151.Close() + _, err152 := mbTrans151.WriteString(arg150) + if err152 != nil { + Usage() + return + } + factory153 := thrift.NewTSimpleJSONProtocolFactory() + jsProt154 := factory153.GetProtocol(mbTrans151) + argvalue0 := topic.NewChangeReplicationTopicSourceInfoRequest() + err155 := argvalue0.Read(jsProt154) + if err155 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.ChangeReplicationTopicSourceInfo(value0)) + fmt.Print("\n") + break case "describeTopic": if flag.NArg()-1 != 1 { fmt.Fprintln(os.Stderr, "DescribeTopic requires 1 args") flag.Usage() } - arg111 := flag.Arg(1) - mbTrans112 := thrift.NewTMemoryBufferLen(len(arg111)) - defer mbTrans112.Close() - _, err113 := mbTrans112.WriteString(arg111) - if err113 != nil { + arg156 := flag.Arg(1) + mbTrans157 := thrift.NewTMemoryBufferLen(len(arg156)) + defer mbTrans157.Close() + _, err158 := mbTrans157.WriteString(arg156) + if err158 != nil { Usage() return } - factory114 := thrift.NewTSimpleJSONProtocolFactory() - jsProt115 := factory114.GetProtocol(mbTrans112) + factory159 := thrift.NewTSimpleJSONProtocolFactory() + jsProt160 := factory159.GetProtocol(mbTrans157) argvalue0 := topic.NewDescribeTopicRequest() - err116 := argvalue0.Read(jsProt115) - if err116 != nil { + err161 := argvalue0.Read(jsProt160) + if err161 != nil { Usage() return } @@ -368,19 +507,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetDescribeInfo requires 1 args") flag.Usage() } - arg117 := flag.Arg(1) - mbTrans118 := thrift.NewTMemoryBufferLen(len(arg117)) - defer mbTrans118.Close() - _, err119 := mbTrans118.WriteString(arg117) - if err119 != nil { + arg162 := flag.Arg(1) + mbTrans163 := thrift.NewTMemoryBufferLen(len(arg162)) + defer mbTrans163.Close() + _, err164 := mbTrans163.WriteString(arg162) + if err164 != nil { Usage() return } - factory120 := thrift.NewTSimpleJSONProtocolFactory() - jsProt121 := factory120.GetProtocol(mbTrans118) + factory165 := thrift.NewTSimpleJSONProtocolFactory() + jsProt166 := factory165.GetProtocol(mbTrans163) argvalue0 := topic.NewGetDescribeInfoRequest() - err122 := argvalue0.Read(jsProt121) - if err122 != nil { + err167 := argvalue0.Read(jsProt166) + if err167 != nil { Usage() return } @@ -393,19 +532,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetTopicAttribute requires 1 args") flag.Usage() } - arg123 := flag.Arg(1) - mbTrans124 := thrift.NewTMemoryBufferLen(len(arg123)) - defer mbTrans124.Close() - _, err125 := mbTrans124.WriteString(arg123) - if err125 != nil { + arg168 := flag.Arg(1) + mbTrans169 := thrift.NewTMemoryBufferLen(len(arg168)) + defer mbTrans169.Close() + _, err170 := mbTrans169.WriteString(arg168) + if err170 != nil { Usage() return } - factory126 := thrift.NewTSimpleJSONProtocolFactory() - jsProt127 := factory126.GetProtocol(mbTrans124) + factory171 := thrift.NewTSimpleJSONProtocolFactory() + jsProt172 := factory171.GetProtocol(mbTrans169) argvalue0 := topic.NewGetTopicAttributeRequest() - err128 := argvalue0.Read(jsProt127) - if err128 != nil { + err173 := argvalue0.Read(jsProt172) + if err173 != nil { Usage() return } @@ -442,19 +581,19 @@ func main() { fmt.Fprintln(os.Stderr, "SetTopicQuota requires 1 args") flag.Usage() } - arg129 := flag.Arg(1) - mbTrans130 := thrift.NewTMemoryBufferLen(len(arg129)) - defer mbTrans130.Close() - _, err131 := mbTrans130.WriteString(arg129) - if err131 != nil { + arg174 := flag.Arg(1) + mbTrans175 := thrift.NewTMemoryBufferLen(len(arg174)) + defer mbTrans175.Close() + _, err176 := mbTrans175.WriteString(arg174) + if err176 != nil { Usage() return } - factory132 := thrift.NewTSimpleJSONProtocolFactory() - jsProt133 := factory132.GetProtocol(mbTrans130) + factory177 := thrift.NewTSimpleJSONProtocolFactory() + jsProt178 := factory177.GetProtocol(mbTrans175) argvalue0 := topic.NewSetTopicQuotaRequest() - err134 := argvalue0.Read(jsProt133) - if err134 != nil { + err179 := argvalue0.Read(jsProt178) + if err179 != nil { Usage() return } @@ -467,19 +606,19 @@ func main() { fmt.Fprintln(os.Stderr, "QueryTopicQuota requires 1 args") flag.Usage() } - arg135 := flag.Arg(1) - mbTrans136 := thrift.NewTMemoryBufferLen(len(arg135)) - defer mbTrans136.Close() - _, err137 := mbTrans136.WriteString(arg135) - if err137 != nil { + arg180 := flag.Arg(1) + mbTrans181 := thrift.NewTMemoryBufferLen(len(arg180)) + defer mbTrans181.Close() + _, err182 := mbTrans181.WriteString(arg180) + if err182 != nil { Usage() return } - factory138 := thrift.NewTSimpleJSONProtocolFactory() - jsProt139 := factory138.GetProtocol(mbTrans136) + factory183 := thrift.NewTSimpleJSONProtocolFactory() + jsProt184 := factory183.GetProtocol(mbTrans181) argvalue0 := topic.NewQueryTopicQuotaRequest() - err140 := argvalue0.Read(jsProt139) - if err140 != nil { + err185 := argvalue0.Read(jsProt184) + if err185 != nil { Usage() return } @@ -492,19 +631,19 @@ func main() { fmt.Fprintln(os.Stderr, "DeleteTopicQuota requires 1 args") flag.Usage() } - arg141 := flag.Arg(1) - mbTrans142 := thrift.NewTMemoryBufferLen(len(arg141)) - defer mbTrans142.Close() - _, err143 := mbTrans142.WriteString(arg141) - if err143 != nil { + arg186 := flag.Arg(1) + mbTrans187 := thrift.NewTMemoryBufferLen(len(arg186)) + defer mbTrans187.Close() + _, err188 := mbTrans187.WriteString(arg186) + if err188 != nil { Usage() return } - factory144 := thrift.NewTSimpleJSONProtocolFactory() - jsProt145 := factory144.GetProtocol(mbTrans142) + factory189 := thrift.NewTSimpleJSONProtocolFactory() + jsProt190 := factory189.GetProtocol(mbTrans187) argvalue0 := topic.NewDeleteTopicQuotaRequest() - err146 := argvalue0.Read(jsProt145) - if err146 != nil { + err191 := argvalue0.Read(jsProt190) + if err191 != nil { Usage() return } @@ -517,19 +656,19 @@ func main() { fmt.Fprintln(os.Stderr, "SetPermission requires 1 args") flag.Usage() } - arg147 := flag.Arg(1) - mbTrans148 := thrift.NewTMemoryBufferLen(len(arg147)) - defer mbTrans148.Close() - _, err149 := mbTrans148.WriteString(arg147) - if err149 != nil { + arg192 := flag.Arg(1) + mbTrans193 := thrift.NewTMemoryBufferLen(len(arg192)) + defer mbTrans193.Close() + _, err194 := mbTrans193.WriteString(arg192) + if err194 != nil { Usage() return } - factory150 := thrift.NewTSimpleJSONProtocolFactory() - jsProt151 := factory150.GetProtocol(mbTrans148) + factory195 := thrift.NewTSimpleJSONProtocolFactory() + jsProt196 := factory195.GetProtocol(mbTrans193) argvalue0 := topic.NewSetPermissionRequest() - err152 := argvalue0.Read(jsProt151) - if err152 != nil { + err197 := argvalue0.Read(jsProt196) + if err197 != nil { Usage() return } @@ -542,19 +681,19 @@ func main() { fmt.Fprintln(os.Stderr, "RevokePermission requires 1 args") flag.Usage() } - arg153 := flag.Arg(1) - mbTrans154 := thrift.NewTMemoryBufferLen(len(arg153)) - defer mbTrans154.Close() - _, err155 := mbTrans154.WriteString(arg153) - if err155 != nil { + arg198 := flag.Arg(1) + mbTrans199 := thrift.NewTMemoryBufferLen(len(arg198)) + defer mbTrans199.Close() + _, err200 := mbTrans199.WriteString(arg198) + if err200 != nil { Usage() return } - factory156 := thrift.NewTSimpleJSONProtocolFactory() - jsProt157 := factory156.GetProtocol(mbTrans154) + factory201 := thrift.NewTSimpleJSONProtocolFactory() + jsProt202 := factory201.GetProtocol(mbTrans199) argvalue0 := topic.NewRevokePermissionRequest() - err158 := argvalue0.Read(jsProt157) - if err158 != nil { + err203 := argvalue0.Read(jsProt202) + if err203 != nil { Usage() return } @@ -567,19 +706,19 @@ func main() { fmt.Fprintln(os.Stderr, "ListPermission requires 1 args") flag.Usage() } - arg159 := flag.Arg(1) - mbTrans160 := thrift.NewTMemoryBufferLen(len(arg159)) - defer mbTrans160.Close() - _, err161 := mbTrans160.WriteString(arg159) - if err161 != nil { + arg204 := flag.Arg(1) + mbTrans205 := thrift.NewTMemoryBufferLen(len(arg204)) + defer mbTrans205.Close() + _, err206 := mbTrans205.WriteString(arg204) + if err206 != nil { Usage() return } - factory162 := thrift.NewTSimpleJSONProtocolFactory() - jsProt163 := factory162.GetProtocol(mbTrans160) + factory207 := thrift.NewTSimpleJSONProtocolFactory() + jsProt208 := factory207.GetProtocol(mbTrans205) argvalue0 := topic.NewListPermissionRequest() - err164 := argvalue0.Read(jsProt163) - if err164 != nil { + err209 := argvalue0.Read(jsProt208) + if err209 != nil { Usage() return } @@ -592,19 +731,19 @@ func main() { fmt.Fprintln(os.Stderr, "GetPermission requires 1 args") flag.Usage() } - arg165 := flag.Arg(1) - mbTrans166 := thrift.NewTMemoryBufferLen(len(arg165)) - defer mbTrans166.Close() - _, err167 := mbTrans166.WriteString(arg165) - if err167 != nil { + arg210 := flag.Arg(1) + mbTrans211 := thrift.NewTMemoryBufferLen(len(arg210)) + defer mbTrans211.Close() + _, err212 := mbTrans211.WriteString(arg210) + if err212 != nil { Usage() return } - factory168 := thrift.NewTSimpleJSONProtocolFactory() - jsProt169 := factory168.GetProtocol(mbTrans166) + factory213 := thrift.NewTSimpleJSONProtocolFactory() + jsProt214 := factory213.GetProtocol(mbTrans211) argvalue0 := topic.NewGetPermissionRequest() - err170 := argvalue0.Read(jsProt169) - if err170 != nil { + err215 := argvalue0.Read(jsProt214) + if err215 != nil { Usage() return } @@ -617,19 +756,19 @@ func main() { fmt.Fprintln(os.Stderr, "AddSubResourceName requires 1 args") flag.Usage() } - arg171 := flag.Arg(1) - mbTrans172 := thrift.NewTMemoryBufferLen(len(arg171)) - defer mbTrans172.Close() - _, err173 := mbTrans172.WriteString(arg171) - if err173 != nil { + arg216 := flag.Arg(1) + mbTrans217 := thrift.NewTMemoryBufferLen(len(arg216)) + defer mbTrans217.Close() + _, err218 := mbTrans217.WriteString(arg216) + if err218 != nil { Usage() return } - factory174 := thrift.NewTSimpleJSONProtocolFactory() - jsProt175 := factory174.GetProtocol(mbTrans172) + factory219 := thrift.NewTSimpleJSONProtocolFactory() + jsProt220 := factory219.GetProtocol(mbTrans217) argvalue0 := topic.NewAddSubResourceNameRequest() - err176 := argvalue0.Read(jsProt175) - if err176 != nil { + err221 := argvalue0.Read(jsProt220) + if err221 != nil { Usage() return } @@ -650,19 +789,19 @@ func main() { fmt.Fprintln(os.Stderr, "ValidClientVersion requires 1 args") flag.Usage() } - arg177 := flag.Arg(1) - mbTrans178 := thrift.NewTMemoryBufferLen(len(arg177)) - defer mbTrans178.Close() - _, err179 := mbTrans178.WriteString(arg177) - if err179 != nil { + arg222 := flag.Arg(1) + mbTrans223 := thrift.NewTMemoryBufferLen(len(arg222)) + defer mbTrans223.Close() + _, err224 := mbTrans223.WriteString(arg222) + if err224 != nil { Usage() return } - factory180 := thrift.NewTSimpleJSONProtocolFactory() - jsProt181 := factory180.GetProtocol(mbTrans178) + factory225 := thrift.NewTSimpleJSONProtocolFactory() + jsProt226 := factory225.GetProtocol(mbTrans223) argvalue0 := topic.NewVersion() - err182 := argvalue0.Read(jsProt181) - if err182 != nil { + err227 := argvalue0.Read(jsProt226) + if err227 != nil { Usage() return } diff --git a/thrift/topic/topicservice.go b/thrift/topic/topicservice.go index b6c0b12..6060aff 100644 --- a/thrift/topic/topicservice.go +++ b/thrift/topic/topicservice.go @@ -56,22 +56,55 @@ type TopicService interface { DeleteTopicGroup(request *DeleteTopicGroupRequest) (err error) // listTopicGroup; // + ListTopicGroup() (r *ListTopicGroupResponse, err error) + // updateTopicGroup; + // // // Parameters: // - Request - ListTopicGroup(request *ListTopicGroupRequest) (r *ListTopicGroupResponse, err error) + UpdateTopicGroup(request *UpdateTopicGroupRequest) (err error) // deleteTopic, the caller must have CHANGE_TOPIC permission; // // // Parameters: // - Request DeleteTopic(request *DeleteTopicRequest) (err error) + // look up all topics and partition number that match topic pattern + // + // + // Parameters: + // - Request + LookupTopics(request *LookupTopicsRequest) (r *LookupTopicsResponse, err error) + // look up all topics that match topic pattern + // + // + // Parameters: + // - Request + MatchTopics(request *MatchTopicsRequest) (r *MatchTopicsResponse, err error) // changeTopicAttribute, the caller must have CHANGE_TOPIC permission; // // // Parameters: // - Request ChangeTopicAttribute(request *ChangeTopicAttributeRequest) (err error) + // deleteTopicAttribute, the caller must have CHANGE_TOPIC permission; + // + // + // Parameters: + // - Request + DeleteTopicAttribute(request *DeleteTopicAttributeRequest) (err error) + // changeTopicOwnerInfo, the caller must have CHANGE_TOPIC permission; + // + // + // Parameters: + // - Request + ChangeTopicOwnerInfo(request *ChangeTopicOwnerInfoRequest) (err error) + // changeReplicationTopicSourceInfo, the caller must have CHANGE_TOPIC permission; + // + // + // Parameters: + // - Request + ChangeReplicationTopicSourceInfo(request *ChangeReplicationTopicSourceInfoRequest) (err error) // describeTopic, the caller must have DESCRIBE_TOPIC permission; // // @@ -168,9 +201,8 @@ func NewTopicServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, // createTopic, one must be a Developer that call this method; // -// // Parameters: -// - Request +// - Request func (p *TopicServiceClient) CreateTopic(request *CreateTopicRequest) (r *CreateTopicResponse, err error) { if err = p.sendCreateTopic(request); err != nil { return @@ -211,16 +243,16 @@ func (p *TopicServiceClient) recvCreateTopic() (value *CreateTopicResponse, err return } if mTypeId == thrift.EXCEPTION { - error18 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error19 error - error19, err = error18.Read(iprot) + error21 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error22 error + error22, err = error21.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error19 + err = error22 return } if p.SeqId != seqId { @@ -244,9 +276,8 @@ func (p *TopicServiceClient) recvCreateTopic() (value *CreateTopicResponse, err // createReplicationTopic, one must be a Developer that call this method; // -// // Parameters: -// - Request +// - Request func (p *TopicServiceClient) CreateReplicationTopic(request *CreateReplicationTopicRequest) (r *CreateTopicResponse, err error) { if err = p.sendCreateReplicationTopic(request); err != nil { return @@ -287,16 +318,16 @@ func (p *TopicServiceClient) recvCreateReplicationTopic() (value *CreateTopicRes return } if mTypeId == thrift.EXCEPTION { - error20 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error21 error - error21, err = error20.Read(iprot) + error23 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error24 error + error24, err = error23.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error21 + err = error24 return } if p.SeqId != seqId { @@ -320,9 +351,8 @@ func (p *TopicServiceClient) recvCreateReplicationTopic() (value *CreateTopicRes // createTopicGroup, one must be a Developer that call this method; // -// // Parameters: -// - Request +// - Request func (p *TopicServiceClient) CreateTopicGroup(request *CreateTopicGroupRequest) (r *CreateTopicGroupResponse, err error) { if err = p.sendCreateTopicGroup(request); err != nil { return @@ -363,16 +393,16 @@ func (p *TopicServiceClient) recvCreateTopicGroup() (value *CreateTopicGroupResp return } if mTypeId == thrift.EXCEPTION { - error22 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error23 error - error23, err = error22.Read(iprot) + error25 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error26 error + error26, err = error25.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error23 + err = error26 return } if p.SeqId != seqId { @@ -396,9 +426,8 @@ func (p *TopicServiceClient) recvCreateTopicGroup() (value *CreateTopicGroupResp // desribeTopicGroup; // -// // Parameters: -// - Request +// - Request func (p *TopicServiceClient) DescribeTopicGroup(request *DescribeTopicGroupRequest) (r *DescribeTopicGroupResponse, err error) { if err = p.sendDescribeTopicGroup(request); err != nil { return @@ -439,16 +468,16 @@ func (p *TopicServiceClient) recvDescribeTopicGroup() (value *DescribeTopicGroup return } if mTypeId == thrift.EXCEPTION { - error24 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error25 error - error25, err = error24.Read(iprot) + error27 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error28 error + error28, err = error27.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error25 + err = error28 return } if p.SeqId != seqId { @@ -472,9 +501,8 @@ func (p *TopicServiceClient) recvDescribeTopicGroup() (value *DescribeTopicGroup // deleteTopicGroup; // -// // Parameters: -// - Request +// - Request func (p *TopicServiceClient) DeleteTopicGroup(request *DeleteTopicGroupRequest) (err error) { if err = p.sendDeleteTopicGroup(request); err != nil { return @@ -515,16 +543,16 @@ func (p *TopicServiceClient) recvDeleteTopicGroup() (err error) { return } if mTypeId == thrift.EXCEPTION { - error26 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error27 error - error27, err = error26.Read(iprot) + error29 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error30 error + error30, err = error29.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error27 + err = error30 return } if p.SeqId != seqId { @@ -546,18 +574,14 @@ func (p *TopicServiceClient) recvDeleteTopicGroup() (err error) { } // listTopicGroup; -// -// -// Parameters: -// - Request -func (p *TopicServiceClient) ListTopicGroup(request *ListTopicGroupRequest) (r *ListTopicGroupResponse, err error) { - if err = p.sendListTopicGroup(request); err != nil { +func (p *TopicServiceClient) ListTopicGroup() (r *ListTopicGroupResponse, err error) { + if err = p.sendListTopicGroup(); err != nil { return } return p.recvListTopicGroup() } -func (p *TopicServiceClient) sendListTopicGroup(request *ListTopicGroupRequest) (err error) { +func (p *TopicServiceClient) sendListTopicGroup() (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -567,9 +591,7 @@ func (p *TopicServiceClient) sendListTopicGroup(request *ListTopicGroupRequest) if err = oprot.WriteMessageBegin("listTopicGroup", thrift.CALL, p.SeqId); err != nil { return } - args := ListTopicGroupArgs{ - Request: request, - } + args := ListTopicGroupArgs{} if err = args.Write(oprot); err != nil { return } @@ -590,16 +612,16 @@ func (p *TopicServiceClient) recvListTopicGroup() (value *ListTopicGroupResponse return } if mTypeId == thrift.EXCEPTION { - error28 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error29 error - error29, err = error28.Read(iprot) + error31 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error32 error + error32, err = error31.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error29 + err = error32 return } if p.SeqId != seqId { @@ -621,29 +643,28 @@ func (p *TopicServiceClient) recvListTopicGroup() (value *ListTopicGroupResponse return } -// deleteTopic, the caller must have CHANGE_TOPIC permission; -// +// updateTopicGroup; // // Parameters: -// - Request -func (p *TopicServiceClient) DeleteTopic(request *DeleteTopicRequest) (err error) { - if err = p.sendDeleteTopic(request); err != nil { +// - Request +func (p *TopicServiceClient) UpdateTopicGroup(request *UpdateTopicGroupRequest) (err error) { + if err = p.sendUpdateTopicGroup(request); err != nil { return } - return p.recvDeleteTopic() + return p.recvUpdateTopicGroup() } -func (p *TopicServiceClient) sendDeleteTopic(request *DeleteTopicRequest) (err error) { +func (p *TopicServiceClient) sendUpdateTopicGroup(request *UpdateTopicGroupRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("deleteTopic", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("updateTopicGroup", thrift.CALL, p.SeqId); err != nil { return } - args := DeleteTopicArgs{ + args := UpdateTopicGroupArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -655,7 +676,7 @@ func (p *TopicServiceClient) sendDeleteTopic(request *DeleteTopicRequest) (err e return oprot.Flush() } -func (p *TopicServiceClient) recvDeleteTopic() (err error) { +func (p *TopicServiceClient) recvUpdateTopicGroup() (err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -666,23 +687,23 @@ func (p *TopicServiceClient) recvDeleteTopic() (err error) { return } if mTypeId == thrift.EXCEPTION { - error30 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error31 error - error31, err = error30.Read(iprot) + error33 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error34 error + error34, err = error33.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error31 + err = error34 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "deleteTopic failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "updateTopicGroup failed: out of sequence response") return } - result := DeleteTopicResult{} + result := UpdateTopicGroupResult{} if err = result.Read(iprot); err != nil { return } @@ -696,29 +717,28 @@ func (p *TopicServiceClient) recvDeleteTopic() (err error) { return } -// changeTopicAttribute, the caller must have CHANGE_TOPIC permission; -// +// deleteTopic, the caller must have CHANGE_TOPIC permission; // // Parameters: -// - Request -func (p *TopicServiceClient) ChangeTopicAttribute(request *ChangeTopicAttributeRequest) (err error) { - if err = p.sendChangeTopicAttribute(request); err != nil { +// - Request +func (p *TopicServiceClient) DeleteTopic(request *DeleteTopicRequest) (err error) { + if err = p.sendDeleteTopic(request); err != nil { return } - return p.recvChangeTopicAttribute() + return p.recvDeleteTopic() } -func (p *TopicServiceClient) sendChangeTopicAttribute(request *ChangeTopicAttributeRequest) (err error) { +func (p *TopicServiceClient) sendDeleteTopic(request *DeleteTopicRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("changeTopicAttribute", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("deleteTopic", thrift.CALL, p.SeqId); err != nil { return } - args := ChangeTopicAttributeArgs{ + args := DeleteTopicArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -730,7 +750,7 @@ func (p *TopicServiceClient) sendChangeTopicAttribute(request *ChangeTopicAttrib return oprot.Flush() } -func (p *TopicServiceClient) recvChangeTopicAttribute() (err error) { +func (p *TopicServiceClient) recvDeleteTopic() (err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -741,23 +761,23 @@ func (p *TopicServiceClient) recvChangeTopicAttribute() (err error) { return } if mTypeId == thrift.EXCEPTION { - error32 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error33 error - error33, err = error32.Read(iprot) + error35 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error36 error + error36, err = error35.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error33 + err = error36 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "changeTopicAttribute failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "deleteTopic failed: out of sequence response") return } - result := ChangeTopicAttributeResult{} + result := DeleteTopicResult{} if err = result.Read(iprot); err != nil { return } @@ -771,29 +791,28 @@ func (p *TopicServiceClient) recvChangeTopicAttribute() (err error) { return } -// describeTopic, the caller must have DESCRIBE_TOPIC permission; -// +// look up all topics and partition number that match topic pattern // // Parameters: -// - Request -func (p *TopicServiceClient) DescribeTopic(request *DescribeTopicRequest) (r *DescribeTopicResponse, err error) { - if err = p.sendDescribeTopic(request); err != nil { +// - Request +func (p *TopicServiceClient) LookupTopics(request *LookupTopicsRequest) (r *LookupTopicsResponse, err error) { + if err = p.sendLookupTopics(request); err != nil { return } - return p.recvDescribeTopic() + return p.recvLookupTopics() } -func (p *TopicServiceClient) sendDescribeTopic(request *DescribeTopicRequest) (err error) { +func (p *TopicServiceClient) sendLookupTopics(request *LookupTopicsRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("describeTopic", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("lookupTopics", thrift.CALL, p.SeqId); err != nil { return } - args := DescribeTopicArgs{ + args := LookupTopicsArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -805,7 +824,7 @@ func (p *TopicServiceClient) sendDescribeTopic(request *DescribeTopicRequest) (e return oprot.Flush() } -func (p *TopicServiceClient) recvDescribeTopic() (value *DescribeTopicResponse, err error) { +func (p *TopicServiceClient) recvLookupTopics() (value *LookupTopicsResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -816,23 +835,23 @@ func (p *TopicServiceClient) recvDescribeTopic() (value *DescribeTopicResponse, return } if mTypeId == thrift.EXCEPTION { - error34 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error35 error - error35, err = error34.Read(iprot) + error37 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error38 error + error38, err = error37.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error35 + err = error38 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "describeTopic failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "lookupTopics failed: out of sequence response") return } - result := DescribeTopicResult{} + result := LookupTopicsResult{} if err = result.Read(iprot); err != nil { return } @@ -847,29 +866,28 @@ func (p *TopicServiceClient) recvDescribeTopic() (value *DescribeTopicResponse, return } -// getDescribeInfo, the caller must have DESCRIBE_TOPIC permission; -// +// look up all topics that match topic pattern // // Parameters: -// - Request -func (p *TopicServiceClient) GetDescribeInfo(request *GetDescribeInfoRequest) (r *GetDescribeInfoResponse, err error) { - if err = p.sendGetDescribeInfo(request); err != nil { +// - Request +func (p *TopicServiceClient) MatchTopics(request *MatchTopicsRequest) (r *MatchTopicsResponse, err error) { + if err = p.sendMatchTopics(request); err != nil { return } - return p.recvGetDescribeInfo() + return p.recvMatchTopics() } -func (p *TopicServiceClient) sendGetDescribeInfo(request *GetDescribeInfoRequest) (err error) { +func (p *TopicServiceClient) sendMatchTopics(request *MatchTopicsRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("getDescribeInfo", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("matchTopics", thrift.CALL, p.SeqId); err != nil { return } - args := GetDescribeInfoArgs{ + args := MatchTopicsArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -881,7 +899,7 @@ func (p *TopicServiceClient) sendGetDescribeInfo(request *GetDescribeInfoRequest return oprot.Flush() } -func (p *TopicServiceClient) recvGetDescribeInfo() (value *GetDescribeInfoResponse, err error) { +func (p *TopicServiceClient) recvMatchTopics() (value *MatchTopicsResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -892,23 +910,23 @@ func (p *TopicServiceClient) recvGetDescribeInfo() (value *GetDescribeInfoRespon return } if mTypeId == thrift.EXCEPTION { - error36 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error37 error - error37, err = error36.Read(iprot) + error39 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error40 error + error40, err = error39.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error37 + err = error40 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getDescribeInfo failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "matchTopics failed: out of sequence response") return } - result := GetDescribeInfoResult{} + result := MatchTopicsResult{} if err = result.Read(iprot); err != nil { return } @@ -923,29 +941,28 @@ func (p *TopicServiceClient) recvGetDescribeInfo() (value *GetDescribeInfoRespon return } -// getTopicAttribute, the caller must have DESCRIBE_TOPIC permission; -// +// changeTopicAttribute, the caller must have CHANGE_TOPIC permission; // // Parameters: -// - Request -func (p *TopicServiceClient) GetTopicAttribute(request *GetTopicAttributeRequest) (r *GetTopicAttributeResponse, err error) { - if err = p.sendGetTopicAttribute(request); err != nil { +// - Request +func (p *TopicServiceClient) ChangeTopicAttribute(request *ChangeTopicAttributeRequest) (err error) { + if err = p.sendChangeTopicAttribute(request); err != nil { return } - return p.recvGetTopicAttribute() + return p.recvChangeTopicAttribute() } -func (p *TopicServiceClient) sendGetTopicAttribute(request *GetTopicAttributeRequest) (err error) { +func (p *TopicServiceClient) sendChangeTopicAttribute(request *ChangeTopicAttributeRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("getTopicAttribute", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("changeTopicAttribute", thrift.CALL, p.SeqId); err != nil { return } - args := GetTopicAttributeArgs{ + args := ChangeTopicAttributeArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -957,7 +974,7 @@ func (p *TopicServiceClient) sendGetTopicAttribute(request *GetTopicAttributeReq return oprot.Flush() } -func (p *TopicServiceClient) recvGetTopicAttribute() (value *GetTopicAttributeResponse, err error) { +func (p *TopicServiceClient) recvChangeTopicAttribute() (err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -968,23 +985,23 @@ func (p *TopicServiceClient) recvGetTopicAttribute() (value *GetTopicAttributeRe return } if mTypeId == thrift.EXCEPTION { - error38 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error39 error - error39, err = error38.Read(iprot) + error41 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error42 error + error42, err = error41.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error39 + err = error42 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getTopicAttribute failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "changeTopicAttribute failed: out of sequence response") return } - result := GetTopicAttributeResult{} + result := ChangeTopicAttributeResult{} if err = result.Read(iprot); err != nil { return } @@ -995,31 +1012,33 @@ func (p *TopicServiceClient) recvGetTopicAttribute() (value *GetTopicAttributeRe err = result.E return } - value = result.GetSuccess() return } -// listTopicsInfo will return the topics which owned by the call developer -// and its describe information. +// deleteTopicAttribute, the caller must have CHANGE_TOPIC permission; // -func (p *TopicServiceClient) ListTopicsInfo() (r *ListTopicsInfoResponse, err error) { - if err = p.sendListTopicsInfo(); err != nil { +// Parameters: +// - Request +func (p *TopicServiceClient) DeleteTopicAttribute(request *DeleteTopicAttributeRequest) (err error) { + if err = p.sendDeleteTopicAttribute(request); err != nil { return } - return p.recvListTopicsInfo() + return p.recvDeleteTopicAttribute() } -func (p *TopicServiceClient) sendListTopicsInfo() (err error) { +func (p *TopicServiceClient) sendDeleteTopicAttribute(request *DeleteTopicAttributeRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("listTopicsInfo", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("deleteTopicAttribute", thrift.CALL, p.SeqId); err != nil { return } - args := ListTopicsInfoArgs{} + args := DeleteTopicAttributeArgs{ + Request: request, + } if err = args.Write(oprot); err != nil { return } @@ -1029,7 +1048,7 @@ func (p *TopicServiceClient) sendListTopicsInfo() (err error) { return oprot.Flush() } -func (p *TopicServiceClient) recvListTopicsInfo() (value *ListTopicsInfoResponse, err error) { +func (p *TopicServiceClient) recvDeleteTopicAttribute() (err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1040,23 +1059,23 @@ func (p *TopicServiceClient) recvListTopicsInfo() (value *ListTopicsInfoResponse return } if mTypeId == thrift.EXCEPTION { - error40 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error41 error - error41, err = error40.Read(iprot) + error43 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error44 error + error44, err = error43.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error41 + err = error44 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "listTopicsInfo failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "deleteTopicAttribute failed: out of sequence response") return } - result := ListTopicsInfoResult{} + result := DeleteTopicAttributeResult{} if err = result.Read(iprot); err != nil { return } @@ -1067,32 +1086,33 @@ func (p *TopicServiceClient) recvListTopicsInfo() (value *ListTopicsInfoResponse err = result.E return } - value = result.GetSuccess() return } -// listTopics for the developer that call this method, and this method will -// only return the topics that owned by the call developer, if none, -// listTopics will return nothing. +// changeTopicOwnerInfo, the caller must have CHANGE_TOPIC permission; // -func (p *TopicServiceClient) ListTopics() (r *ListTopicsResponse, err error) { - if err = p.sendListTopics(); err != nil { +// Parameters: +// - Request +func (p *TopicServiceClient) ChangeTopicOwnerInfo(request *ChangeTopicOwnerInfoRequest) (err error) { + if err = p.sendChangeTopicOwnerInfo(request); err != nil { return } - return p.recvListTopics() + return p.recvChangeTopicOwnerInfo() } -func (p *TopicServiceClient) sendListTopics() (err error) { +func (p *TopicServiceClient) sendChangeTopicOwnerInfo(request *ChangeTopicOwnerInfoRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("listTopics", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("changeTopicOwnerInfo", thrift.CALL, p.SeqId); err != nil { return } - args := ListTopicsArgs{} + args := ChangeTopicOwnerInfoArgs{ + Request: request, + } if err = args.Write(oprot); err != nil { return } @@ -1102,7 +1122,7 @@ func (p *TopicServiceClient) sendListTopics() (err error) { return oprot.Flush() } -func (p *TopicServiceClient) recvListTopics() (value *ListTopicsResponse, err error) { +func (p *TopicServiceClient) recvChangeTopicOwnerInfo() (err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1113,23 +1133,23 @@ func (p *TopicServiceClient) recvListTopics() (value *ListTopicsResponse, err er return } if mTypeId == thrift.EXCEPTION { - error42 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error43 error - error43, err = error42.Read(iprot) + error45 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error46 error + error46, err = error45.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error43 + err = error46 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "listTopics failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "changeTopicOwnerInfo failed: out of sequence response") return } - result := ListTopicsResult{} + result := ChangeTopicOwnerInfoResult{} if err = result.Read(iprot); err != nil { return } @@ -1140,28 +1160,33 @@ func (p *TopicServiceClient) recvListTopics() (value *ListTopicsResponse, err er err = result.E return } - value = result.GetSuccess() return } -func (p *TopicServiceClient) GetBindTopics() (r *ListTopicsResponse, err error) { - if err = p.sendGetBindTopics(); err != nil { +// changeReplicationTopicSourceInfo, the caller must have CHANGE_TOPIC permission; +// +// Parameters: +// - Request +func (p *TopicServiceClient) ChangeReplicationTopicSourceInfo(request *ChangeReplicationTopicSourceInfoRequest) (err error) { + if err = p.sendChangeReplicationTopicSourceInfo(request); err != nil { return } - return p.recvGetBindTopics() + return p.recvChangeReplicationTopicSourceInfo() } -func (p *TopicServiceClient) sendGetBindTopics() (err error) { +func (p *TopicServiceClient) sendChangeReplicationTopicSourceInfo(request *ChangeReplicationTopicSourceInfoRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("getBindTopics", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("changeReplicationTopicSourceInfo", thrift.CALL, p.SeqId); err != nil { return } - args := GetBindTopicsArgs{} + args := ChangeReplicationTopicSourceInfoArgs{ + Request: request, + } if err = args.Write(oprot); err != nil { return } @@ -1171,7 +1196,7 @@ func (p *TopicServiceClient) sendGetBindTopics() (err error) { return oprot.Flush() } -func (p *TopicServiceClient) recvGetBindTopics() (value *ListTopicsResponse, err error) { +func (p *TopicServiceClient) recvChangeReplicationTopicSourceInfo() (err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1182,23 +1207,23 @@ func (p *TopicServiceClient) recvGetBindTopics() (value *ListTopicsResponse, err return } if mTypeId == thrift.EXCEPTION { - error44 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error45 error - error45, err = error44.Read(iprot) + error47 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error48 error + error48, err = error47.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error45 + err = error48 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getBindTopics failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "changeReplicationTopicSourceInfo failed: out of sequence response") return } - result := GetBindTopicsResult{} + result := ChangeReplicationTopicSourceInfoResult{} if err = result.Read(iprot); err != nil { return } @@ -1209,33 +1234,31 @@ func (p *TopicServiceClient) recvGetBindTopics() (value *ListTopicsResponse, err err = result.E return } - value = result.GetSuccess() return } -// setTopicQuota, the caller must be talos admin or topic owner -// +// describeTopic, the caller must have DESCRIBE_TOPIC permission; // // Parameters: -// - Request -func (p *TopicServiceClient) SetTopicQuota(request *SetTopicQuotaRequest) (err error) { - if err = p.sendSetTopicQuota(request); err != nil { +// - Request +func (p *TopicServiceClient) DescribeTopic(request *DescribeTopicRequest) (r *DescribeTopicResponse, err error) { + if err = p.sendDescribeTopic(request); err != nil { return } - return p.recvSetTopicQuota() + return p.recvDescribeTopic() } -func (p *TopicServiceClient) sendSetTopicQuota(request *SetTopicQuotaRequest) (err error) { +func (p *TopicServiceClient) sendDescribeTopic(request *DescribeTopicRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("setTopicQuota", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("describeTopic", thrift.CALL, p.SeqId); err != nil { return } - args := SetTopicQuotaArgs{ + args := DescribeTopicArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -1247,7 +1270,7 @@ func (p *TopicServiceClient) sendSetTopicQuota(request *SetTopicQuotaRequest) (e return oprot.Flush() } -func (p *TopicServiceClient) recvSetTopicQuota() (err error) { +func (p *TopicServiceClient) recvDescribeTopic() (value *DescribeTopicResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1258,23 +1281,23 @@ func (p *TopicServiceClient) recvSetTopicQuota() (err error) { return } if mTypeId == thrift.EXCEPTION { - error46 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error47 error - error47, err = error46.Read(iprot) + error49 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error50 error + error50, err = error49.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error47 + err = error50 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "setTopicQuota failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "describeTopic failed: out of sequence response") return } - result := SetTopicQuotaResult{} + result := DescribeTopicResult{} if err = result.Read(iprot); err != nil { return } @@ -1285,32 +1308,32 @@ func (p *TopicServiceClient) recvSetTopicQuota() (err error) { err = result.E return } + value = result.GetSuccess() return } -// queryTopicQuota, the caller must be talos admin or topic owner -// +// getDescribeInfo, the caller must have DESCRIBE_TOPIC permission; // // Parameters: -// - Request -func (p *TopicServiceClient) QueryTopicQuota(request *QueryTopicQuotaRequest) (r *QueryTopicQuotaResponse, err error) { - if err = p.sendQueryTopicQuota(request); err != nil { +// - Request +func (p *TopicServiceClient) GetDescribeInfo(request *GetDescribeInfoRequest) (r *GetDescribeInfoResponse, err error) { + if err = p.sendGetDescribeInfo(request); err != nil { return } - return p.recvQueryTopicQuota() + return p.recvGetDescribeInfo() } -func (p *TopicServiceClient) sendQueryTopicQuota(request *QueryTopicQuotaRequest) (err error) { +func (p *TopicServiceClient) sendGetDescribeInfo(request *GetDescribeInfoRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("queryTopicQuota", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("getDescribeInfo", thrift.CALL, p.SeqId); err != nil { return } - args := QueryTopicQuotaArgs{ + args := GetDescribeInfoArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -1322,7 +1345,7 @@ func (p *TopicServiceClient) sendQueryTopicQuota(request *QueryTopicQuotaRequest return oprot.Flush() } -func (p *TopicServiceClient) recvQueryTopicQuota() (value *QueryTopicQuotaResponse, err error) { +func (p *TopicServiceClient) recvGetDescribeInfo() (value *GetDescribeInfoResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1333,23 +1356,23 @@ func (p *TopicServiceClient) recvQueryTopicQuota() (value *QueryTopicQuotaRespon return } if mTypeId == thrift.EXCEPTION { - error48 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error49 error - error49, err = error48.Read(iprot) + error51 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error52 error + error52, err = error51.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error49 + err = error52 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "queryTopicQuota failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getDescribeInfo failed: out of sequence response") return } - result := QueryTopicQuotaResult{} + result := GetDescribeInfoResult{} if err = result.Read(iprot); err != nil { return } @@ -1364,29 +1387,28 @@ func (p *TopicServiceClient) recvQueryTopicQuota() (value *QueryTopicQuotaRespon return } -// deleteTopicQuota, the caller must be talos admin or topic owner -// +// getTopicAttribute, the caller must have DESCRIBE_TOPIC permission; // // Parameters: -// - Request -func (p *TopicServiceClient) DeleteTopicQuota(request *DeleteTopicQuotaRequest) (err error) { - if err = p.sendDeleteTopicQuota(request); err != nil { +// - Request +func (p *TopicServiceClient) GetTopicAttribute(request *GetTopicAttributeRequest) (r *GetTopicAttributeResponse, err error) { + if err = p.sendGetTopicAttribute(request); err != nil { return } - return p.recvDeleteTopicQuota() + return p.recvGetTopicAttribute() } -func (p *TopicServiceClient) sendDeleteTopicQuota(request *DeleteTopicQuotaRequest) (err error) { +func (p *TopicServiceClient) sendGetTopicAttribute(request *GetTopicAttributeRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("deleteTopicQuota", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("getTopicAttribute", thrift.CALL, p.SeqId); err != nil { return } - args := DeleteTopicQuotaArgs{ + args := GetTopicAttributeArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -1398,7 +1420,7 @@ func (p *TopicServiceClient) sendDeleteTopicQuota(request *DeleteTopicQuotaReque return oprot.Flush() } -func (p *TopicServiceClient) recvDeleteTopicQuota() (err error) { +func (p *TopicServiceClient) recvGetTopicAttribute() (value *GetTopicAttributeResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1409,23 +1431,23 @@ func (p *TopicServiceClient) recvDeleteTopicQuota() (err error) { return } if mTypeId == thrift.EXCEPTION { - error50 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error51 error - error51, err = error50.Read(iprot) + error53 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error54 error + error54, err = error53.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error51 + err = error54 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "deleteTopicQuota failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getTopicAttribute failed: out of sequence response") return } - result := DeleteTopicQuotaResult{} + result := GetTopicAttributeResult{} if err = result.Read(iprot); err != nil { return } @@ -1436,36 +1458,30 @@ func (p *TopicServiceClient) recvDeleteTopicQuota() (err error) { err = result.E return } + value = result.GetSuccess() return } -// setPermission, the caller must be owner/Talos admin, and the operation -// permission devolution is not be allowed, the old permission will be -// overwrite after setPermission. -// -// -// Parameters: -// - Request -func (p *TopicServiceClient) SetPermission(request *SetPermissionRequest) (err error) { - if err = p.sendSetPermission(request); err != nil { +// listTopicsInfo will return the topics which owned by the call developer +// and its describe information. +func (p *TopicServiceClient) ListTopicsInfo() (r *ListTopicsInfoResponse, err error) { + if err = p.sendListTopicsInfo(); err != nil { return } - return p.recvSetPermission() + return p.recvListTopicsInfo() } -func (p *TopicServiceClient) sendSetPermission(request *SetPermissionRequest) (err error) { +func (p *TopicServiceClient) sendListTopicsInfo() (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("setPermission", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("listTopicsInfo", thrift.CALL, p.SeqId); err != nil { return } - args := SetPermissionArgs{ - Request: request, - } + args := ListTopicsInfoArgs{} if err = args.Write(oprot); err != nil { return } @@ -1475,7 +1491,7 @@ func (p *TopicServiceClient) sendSetPermission(request *SetPermissionRequest) (e return oprot.Flush() } -func (p *TopicServiceClient) recvSetPermission() (err error) { +func (p *TopicServiceClient) recvListTopicsInfo() (value *ListTopicsInfoResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1486,23 +1502,23 @@ func (p *TopicServiceClient) recvSetPermission() (err error) { return } if mTypeId == thrift.EXCEPTION { - error52 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error53 error - error53, err = error52.Read(iprot) + error55 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error56 error + error56, err = error55.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error53 + err = error56 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "setPermission failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "listTopicsInfo failed: out of sequence response") return } - result := SetPermissionResult{} + result := ListTopicsInfoResult{} if err = result.Read(iprot); err != nil { return } @@ -1513,36 +1529,31 @@ func (p *TopicServiceClient) recvSetPermission() (err error) { err = result.E return } + value = result.GetSuccess() return } -// revokePermission, the caller must be owner/Talos admin, and you can't -// revokePermission for the topic owner, the accountId will have -// NONE permission after revokePermission; -// -// -// Parameters: -// - Request -func (p *TopicServiceClient) RevokePermission(request *RevokePermissionRequest) (err error) { - if err = p.sendRevokePermission(request); err != nil { - return +// listTopics for the developer that call this method, and this method will +// only return the topics that owned by the call developer, if none, +// listTopics will return nothing. +func (p *TopicServiceClient) ListTopics() (r *ListTopicsResponse, err error) { + if err = p.sendListTopics(); err != nil { + return } - return p.recvRevokePermission() + return p.recvListTopics() } -func (p *TopicServiceClient) sendRevokePermission(request *RevokePermissionRequest) (err error) { +func (p *TopicServiceClient) sendListTopics() (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("revokePermission", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("listTopics", thrift.CALL, p.SeqId); err != nil { return } - args := RevokePermissionArgs{ - Request: request, - } + args := ListTopicsArgs{} if err = args.Write(oprot); err != nil { return } @@ -1552,7 +1563,7 @@ func (p *TopicServiceClient) sendRevokePermission(request *RevokePermissionReque return oprot.Flush() } -func (p *TopicServiceClient) recvRevokePermission() (err error) { +func (p *TopicServiceClient) recvListTopics() (value *ListTopicsResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1563,23 +1574,23 @@ func (p *TopicServiceClient) recvRevokePermission() (err error) { return } if mTypeId == thrift.EXCEPTION { - error54 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error55 error - error55, err = error54.Read(iprot) + error57 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error58 error + error58, err = error57.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error55 + err = error58 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "revokePermission failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "listTopics failed: out of sequence response") return } - result := RevokePermissionResult{} + result := ListTopicsResult{} if err = result.Read(iprot); err != nil { return } @@ -1590,34 +1601,28 @@ func (p *TopicServiceClient) recvRevokePermission() (err error) { err = result.E return } + value = result.GetSuccess() return } -// listPermission, the caller must have DESCRIBE_TOPIC permission; -// -// -// Parameters: -// - Request -func (p *TopicServiceClient) ListPermission(request *ListPermissionRequest) (r *ListPermissionResponse, err error) { - if err = p.sendListPermission(request); err != nil { +func (p *TopicServiceClient) GetBindTopics() (r *ListTopicsResponse, err error) { + if err = p.sendGetBindTopics(); err != nil { return } - return p.recvListPermission() + return p.recvGetBindTopics() } -func (p *TopicServiceClient) sendListPermission(request *ListPermissionRequest) (err error) { +func (p *TopicServiceClient) sendGetBindTopics() (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("listPermission", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("getBindTopics", thrift.CALL, p.SeqId); err != nil { return } - args := ListPermissionArgs{ - Request: request, - } + args := GetBindTopicsArgs{} if err = args.Write(oprot); err != nil { return } @@ -1627,7 +1632,7 @@ func (p *TopicServiceClient) sendListPermission(request *ListPermissionRequest) return oprot.Flush() } -func (p *TopicServiceClient) recvListPermission() (value *ListPermissionResponse, err error) { +func (p *TopicServiceClient) recvGetBindTopics() (value *ListTopicsResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1638,23 +1643,23 @@ func (p *TopicServiceClient) recvListPermission() (value *ListPermissionResponse return } if mTypeId == thrift.EXCEPTION { - error56 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error57 error - error57, err = error56.Read(iprot) + error59 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error60 error + error60, err = error59.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error57 + err = error60 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "listPermission failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getBindTopics failed: out of sequence response") return } - result := ListPermissionResult{} + result := GetBindTopicsResult{} if err = result.Read(iprot); err != nil { return } @@ -1669,29 +1674,28 @@ func (p *TopicServiceClient) recvListPermission() (value *ListPermissionResponse return } -// getPermission, the caller must hava DESCRIBE_TOPIC permission; -// +// setTopicQuota, the caller must be talos admin or topic owner // // Parameters: -// - Request -func (p *TopicServiceClient) GetPermission(request *GetPermissionRequest) (r *GetPermissionResponse, err error) { - if err = p.sendGetPermission(request); err != nil { +// - Request +func (p *TopicServiceClient) SetTopicQuota(request *SetTopicQuotaRequest) (err error) { + if err = p.sendSetTopicQuota(request); err != nil { return } - return p.recvGetPermission() + return p.recvSetTopicQuota() } -func (p *TopicServiceClient) sendGetPermission(request *GetPermissionRequest) (err error) { +func (p *TopicServiceClient) sendSetTopicQuota(request *SetTopicQuotaRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("getPermission", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("setTopicQuota", thrift.CALL, p.SeqId); err != nil { return } - args := GetPermissionArgs{ + args := SetTopicQuotaArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -1703,7 +1707,7 @@ func (p *TopicServiceClient) sendGetPermission(request *GetPermissionRequest) (e return oprot.Flush() } -func (p *TopicServiceClient) recvGetPermission() (value *GetPermissionResponse, err error) { +func (p *TopicServiceClient) recvSetTopicQuota() (err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1714,23 +1718,23 @@ func (p *TopicServiceClient) recvGetPermission() (value *GetPermissionResponse, return } if mTypeId == thrift.EXCEPTION { - error58 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error59 error - error59, err = error58.Read(iprot) + error61 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error62 error + error62, err = error61.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error59 + err = error62 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getPermission failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "setTopicQuota failed: out of sequence response") return } - result := GetPermissionResult{} + result := SetTopicQuotaResult{} if err = result.Read(iprot); err != nil { return } @@ -1741,33 +1745,31 @@ func (p *TopicServiceClient) recvGetPermission() (value *GetPermissionResponse, err = result.E return } - value = result.GetSuccess() return } -// addSubResourceName, the caller must be a developer owner of topic -// +// queryTopicQuota, the caller must be talos admin or topic owner // // Parameters: -// - Request -func (p *TopicServiceClient) AddSubResourceName(request *AddSubResourceNameRequest) (err error) { - if err = p.sendAddSubResourceName(request); err != nil { +// - Request +func (p *TopicServiceClient) QueryTopicQuota(request *QueryTopicQuotaRequest) (r *QueryTopicQuotaResponse, err error) { + if err = p.sendQueryTopicQuota(request); err != nil { return } - return p.recvAddSubResourceName() + return p.recvQueryTopicQuota() } -func (p *TopicServiceClient) sendAddSubResourceName(request *AddSubResourceNameRequest) (err error) { +func (p *TopicServiceClient) sendQueryTopicQuota(request *QueryTopicQuotaRequest) (err error) { oprot := p.OutputProtocol if oprot == nil { oprot = p.ProtocolFactory.GetProtocol(p.Transport) p.OutputProtocol = oprot } p.SeqId++ - if err = oprot.WriteMessageBegin("addSubResourceName", thrift.CALL, p.SeqId); err != nil { + if err = oprot.WriteMessageBegin("queryTopicQuota", thrift.CALL, p.SeqId); err != nil { return } - args := AddSubResourceNameArgs{ + args := QueryTopicQuotaArgs{ Request: request, } if err = args.Write(oprot); err != nil { @@ -1779,7 +1781,7 @@ func (p *TopicServiceClient) sendAddSubResourceName(request *AddSubResourceNameR return oprot.Flush() } -func (p *TopicServiceClient) recvAddSubResourceName() (err error) { +func (p *TopicServiceClient) recvQueryTopicQuota() (value *QueryTopicQuotaResponse, err error) { iprot := p.InputProtocol if iprot == nil { iprot = p.ProtocolFactory.GetProtocol(p.Transport) @@ -1790,23 +1792,23 @@ func (p *TopicServiceClient) recvAddSubResourceName() (err error) { return } if mTypeId == thrift.EXCEPTION { - error60 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error61 error - error61, err = error60.Read(iprot) + error63 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error64 error + error64, err = error63.Read(iprot) if err != nil { return } if err = iprot.ReadMessageEnd(); err != nil { return } - err = error61 + err = error64 return } if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "addSubResourceName failed: out of sequence response") + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "queryTopicQuota failed: out of sequence response") return } - result := AddSubResourceNameResult{} + result := QueryTopicQuotaResult{} if err = result.Read(iprot); err != nil { return } @@ -1817,365 +1819,507 @@ func (p *TopicServiceClient) recvAddSubResourceName() (err error) { err = result.E return } + value = result.GetSuccess() return } -type TopicServiceProcessor struct { - *common.TalosBaseServiceProcessor -} - -func NewTopicServiceProcessor(handler TopicService) *TopicServiceProcessor { - self62 := &TopicServiceProcessor{common.NewTalosBaseServiceProcessor(handler)} - self62.AddToProcessorMap("createTopic", &topicServiceProcessorCreateTopic{handler: handler}) - self62.AddToProcessorMap("createReplicationTopic", &topicServiceProcessorCreateReplicationTopic{handler: handler}) - self62.AddToProcessorMap("createTopicGroup", &topicServiceProcessorCreateTopicGroup{handler: handler}) - self62.AddToProcessorMap("describeTopicGroup", &topicServiceProcessorDescribeTopicGroup{handler: handler}) - self62.AddToProcessorMap("deleteTopicGroup", &topicServiceProcessorDeleteTopicGroup{handler: handler}) - self62.AddToProcessorMap("listTopicGroup", &topicServiceProcessorListTopicGroup{handler: handler}) - self62.AddToProcessorMap("deleteTopic", &topicServiceProcessorDeleteTopic{handler: handler}) - self62.AddToProcessorMap("changeTopicAttribute", &topicServiceProcessorChangeTopicAttribute{handler: handler}) - self62.AddToProcessorMap("describeTopic", &topicServiceProcessorDescribeTopic{handler: handler}) - self62.AddToProcessorMap("getDescribeInfo", &topicServiceProcessorGetDescribeInfo{handler: handler}) - self62.AddToProcessorMap("getTopicAttribute", &topicServiceProcessorGetTopicAttribute{handler: handler}) - self62.AddToProcessorMap("listTopicsInfo", &topicServiceProcessorListTopicsInfo{handler: handler}) - self62.AddToProcessorMap("listTopics", &topicServiceProcessorListTopics{handler: handler}) - self62.AddToProcessorMap("getBindTopics", &topicServiceProcessorGetBindTopics{handler: handler}) - self62.AddToProcessorMap("setTopicQuota", &topicServiceProcessorSetTopicQuota{handler: handler}) - self62.AddToProcessorMap("queryTopicQuota", &topicServiceProcessorQueryTopicQuota{handler: handler}) - self62.AddToProcessorMap("deleteTopicQuota", &topicServiceProcessorDeleteTopicQuota{handler: handler}) - self62.AddToProcessorMap("setPermission", &topicServiceProcessorSetPermission{handler: handler}) - self62.AddToProcessorMap("revokePermission", &topicServiceProcessorRevokePermission{handler: handler}) - self62.AddToProcessorMap("listPermission", &topicServiceProcessorListPermission{handler: handler}) - self62.AddToProcessorMap("getPermission", &topicServiceProcessorGetPermission{handler: handler}) - self62.AddToProcessorMap("addSubResourceName", &topicServiceProcessorAddSubResourceName{handler: handler}) - return self62 -} - -type topicServiceProcessorCreateTopic struct { - handler TopicService -} - -func (p *topicServiceProcessorCreateTopic) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := CreateTopicArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("createTopic", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err +// deleteTopicQuota, the caller must be talos admin or topic owner +// +// Parameters: +// - Request +func (p *TopicServiceClient) DeleteTopicQuota(request *DeleteTopicQuotaRequest) (err error) { + if err = p.sendDeleteTopicQuota(request); err != nil { + return } + return p.recvDeleteTopicQuota() +} - iprot.ReadMessageEnd() - result := CreateTopicResult{} - var retval *CreateTopicResponse - var err2 error - if retval, err2 = p.handler.CreateTopic(args.Request); err2 != nil { - switch v := err2.(type) { - case *common.GalaxyTalosException: - result.E = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTopic: "+err2.Error()) - oprot.WriteMessageBegin("createTopic", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("createTopic", thrift.REPLY, seqId); err2 != nil { - err = err2 +func (p *TopicServiceClient) sendDeleteTopicQuota(request *DeleteTopicQuotaRequest) (err error) { + oprot := p.OutputProtocol + if oprot == nil { + oprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.OutputProtocol = oprot } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + p.SeqId++ + if err = oprot.WriteMessageBegin("deleteTopicQuota", thrift.CALL, p.SeqId); err != nil { + return } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + args := DeleteTopicQuotaArgs{ + Request: request, } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 + if err = args.Write(oprot); err != nil { + return } - if err != nil { + if err = oprot.WriteMessageEnd(); err != nil { return } - return true, err -} - -type topicServiceProcessorCreateReplicationTopic struct { - handler TopicService + return oprot.Flush() } -func (p *topicServiceProcessorCreateReplicationTopic) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := CreateReplicationTopicArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("createReplicationTopic", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err +func (p *TopicServiceClient) recvDeleteTopicQuota() (err error) { + iprot := p.InputProtocol + if iprot == nil { + iprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.InputProtocol = iprot } - - iprot.ReadMessageEnd() - result := CreateReplicationTopicResult{} - var retval *CreateTopicResponse - var err2 error - if retval, err2 = p.handler.CreateReplicationTopic(args.Request); err2 != nil { - switch v := err2.(type) { - case *common.GalaxyTalosException: - result.E = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createReplicationTopic: "+err2.Error()) - oprot.WriteMessageBegin("createReplicationTopic", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval + _, mTypeId, seqId, err := iprot.ReadMessageBegin() + if err != nil { + return } - if err2 = oprot.WriteMessageBegin("createReplicationTopic", thrift.REPLY, seqId); err2 != nil { - err = err2 + if mTypeId == thrift.EXCEPTION { + error65 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error66 error + error66, err = error65.Read(iprot) + if err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + err = error66 + return } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + if p.SeqId != seqId { + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "deleteTopicQuota failed: out of sequence response") + return } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + result := DeleteTopicQuotaResult{} + if err = result.Read(iprot); err != nil { + return } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 + if err = iprot.ReadMessageEnd(); err != nil { + return } - if err != nil { + if result.E != nil { + err = result.E return } - return true, err + return } -type topicServiceProcessorCreateTopicGroup struct { - handler TopicService +// setPermission, the caller must be owner/Talos admin, and the operation +// permission devolution is not be allowed, the old permission will be +// overwrite after setPermission. +// +// Parameters: +// - Request +func (p *TopicServiceClient) SetPermission(request *SetPermissionRequest) (err error) { + if err = p.sendSetPermission(request); err != nil { + return + } + return p.recvSetPermission() } -func (p *topicServiceProcessorCreateTopicGroup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := CreateTopicGroupArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("createTopicGroup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := CreateTopicGroupResult{} - var retval *CreateTopicGroupResponse - var err2 error - if retval, err2 = p.handler.CreateTopicGroup(args.Request); err2 != nil { - switch v := err2.(type) { - case *common.GalaxyTalosException: - result.E = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTopicGroup: "+err2.Error()) - oprot.WriteMessageBegin("createTopicGroup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("createTopicGroup", thrift.REPLY, seqId); err2 != nil { - err = err2 +func (p *TopicServiceClient) sendSetPermission(request *SetPermissionRequest) (err error) { + oprot := p.OutputProtocol + if oprot == nil { + oprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.OutputProtocol = oprot } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + p.SeqId++ + if err = oprot.WriteMessageBegin("setPermission", thrift.CALL, p.SeqId); err != nil { + return } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + args := SetPermissionArgs{ + Request: request, } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 + if err = args.Write(oprot); err != nil { + return } - if err != nil { + if err = oprot.WriteMessageEnd(); err != nil { return } - return true, err -} - -type topicServiceProcessorDescribeTopicGroup struct { - handler TopicService + return oprot.Flush() } -func (p *topicServiceProcessorDescribeTopicGroup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := DescribeTopicGroupArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("describeTopicGroup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err +func (p *TopicServiceClient) recvSetPermission() (err error) { + iprot := p.InputProtocol + if iprot == nil { + iprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.InputProtocol = iprot } - - iprot.ReadMessageEnd() - result := DescribeTopicGroupResult{} - var retval *DescribeTopicGroupResponse - var err2 error - if retval, err2 = p.handler.DescribeTopicGroup(args.Request); err2 != nil { - switch v := err2.(type) { - case *common.GalaxyTalosException: - result.E = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing describeTopicGroup: "+err2.Error()) - oprot.WriteMessageBegin("describeTopicGroup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval + _, mTypeId, seqId, err := iprot.ReadMessageBegin() + if err != nil { + return } - if err2 = oprot.WriteMessageBegin("describeTopicGroup", thrift.REPLY, seqId); err2 != nil { - err = err2 + if mTypeId == thrift.EXCEPTION { + error67 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error68 error + error68, err = error67.Read(iprot) + if err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + err = error68 + return } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + if p.SeqId != seqId { + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "setPermission failed: out of sequence response") + return } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + result := SetPermissionResult{} + if err = result.Read(iprot); err != nil { + return } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 + if err = iprot.ReadMessageEnd(); err != nil { + return } - if err != nil { + if result.E != nil { + err = result.E return } - return true, err -} - -type topicServiceProcessorDeleteTopicGroup struct { - handler TopicService + return } -func (p *topicServiceProcessorDeleteTopicGroup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := DeleteTopicGroupArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("deleteTopicGroup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err +// revokePermission, the caller must be owner/Talos admin, and you can't +// revokePermission for the topic owner, the accountId will have +// NONE permission after revokePermission; +// +// Parameters: +// - Request +func (p *TopicServiceClient) RevokePermission(request *RevokePermissionRequest) (err error) { + if err = p.sendRevokePermission(request); err != nil { + return } + return p.recvRevokePermission() +} - iprot.ReadMessageEnd() - result := DeleteTopicGroupResult{} - var err2 error - if err2 = p.handler.DeleteTopicGroup(args.Request); err2 != nil { - switch v := err2.(type) { - case *common.GalaxyTalosException: - result.E = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTopicGroup: "+err2.Error()) - oprot.WriteMessageBegin("deleteTopicGroup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } - if err2 = oprot.WriteMessageBegin("deleteTopicGroup", thrift.REPLY, seqId); err2 != nil { - err = err2 +func (p *TopicServiceClient) sendRevokePermission(request *RevokePermissionRequest) (err error) { + oprot := p.OutputProtocol + if oprot == nil { + oprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.OutputProtocol = oprot } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + p.SeqId++ + if err = oprot.WriteMessageBegin("revokePermission", thrift.CALL, p.SeqId); err != nil { + return } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + args := RevokePermissionArgs{ + Request: request, } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 + if err = args.Write(oprot); err != nil { + return } - if err != nil { + if err = oprot.WriteMessageEnd(); err != nil { return } - return true, err -} - -type topicServiceProcessorListTopicGroup struct { - handler TopicService + return oprot.Flush() } -func (p *topicServiceProcessorListTopicGroup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ListTopicGroupArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("listTopicGroup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err +func (p *TopicServiceClient) recvRevokePermission() (err error) { + iprot := p.InputProtocol + if iprot == nil { + iprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.InputProtocol = iprot } - - iprot.ReadMessageEnd() - result := ListTopicGroupResult{} - var retval *ListTopicGroupResponse - var err2 error - if retval, err2 = p.handler.ListTopicGroup(args.Request); err2 != nil { - switch v := err2.(type) { - case *common.GalaxyTalosException: - result.E = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listTopicGroup: "+err2.Error()) - oprot.WriteMessageBegin("listTopicGroup", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 + _, mTypeId, seqId, err := iprot.ReadMessageBegin() + if err != nil { + return + } + if mTypeId == thrift.EXCEPTION { + error69 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error70 error + error70, err = error69.Read(iprot) + if err != nil { + return } - } else { - result.Success = retval + if err = iprot.ReadMessageEnd(); err != nil { + return + } + err = error70 + return } - if err2 = oprot.WriteMessageBegin("listTopicGroup", thrift.REPLY, seqId); err2 != nil { - err = err2 + if p.SeqId != seqId { + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "revokePermission failed: out of sequence response") + return } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + result := RevokePermissionResult{} + if err = result.Read(iprot); err != nil { + return } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err = iprot.ReadMessageEnd(); err != nil { + return } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 + if result.E != nil { + err = result.E + return } - if err != nil { + return +} + +// listPermission, the caller must have DESCRIBE_TOPIC permission; +// +// Parameters: +// - Request +func (p *TopicServiceClient) ListPermission(request *ListPermissionRequest) (r *ListPermissionResponse, err error) { + if err = p.sendListPermission(request); err != nil { return } - return true, err + return p.recvListPermission() } -type topicServiceProcessorDeleteTopic struct { +func (p *TopicServiceClient) sendListPermission(request *ListPermissionRequest) (err error) { + oprot := p.OutputProtocol + if oprot == nil { + oprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.OutputProtocol = oprot + } + p.SeqId++ + if err = oprot.WriteMessageBegin("listPermission", thrift.CALL, p.SeqId); err != nil { + return + } + args := ListPermissionArgs{ + Request: request, + } + if err = args.Write(oprot); err != nil { + return + } + if err = oprot.WriteMessageEnd(); err != nil { + return + } + return oprot.Flush() +} + +func (p *TopicServiceClient) recvListPermission() (value *ListPermissionResponse, err error) { + iprot := p.InputProtocol + if iprot == nil { + iprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.InputProtocol = iprot + } + _, mTypeId, seqId, err := iprot.ReadMessageBegin() + if err != nil { + return + } + if mTypeId == thrift.EXCEPTION { + error71 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error72 error + error72, err = error71.Read(iprot) + if err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + err = error72 + return + } + if p.SeqId != seqId { + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "listPermission failed: out of sequence response") + return + } + result := ListPermissionResult{} + if err = result.Read(iprot); err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + if result.E != nil { + err = result.E + return + } + value = result.GetSuccess() + return +} + +// getPermission, the caller must hava DESCRIBE_TOPIC permission; +// +// Parameters: +// - Request +func (p *TopicServiceClient) GetPermission(request *GetPermissionRequest) (r *GetPermissionResponse, err error) { + if err = p.sendGetPermission(request); err != nil { + return + } + return p.recvGetPermission() +} + +func (p *TopicServiceClient) sendGetPermission(request *GetPermissionRequest) (err error) { + oprot := p.OutputProtocol + if oprot == nil { + oprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.OutputProtocol = oprot + } + p.SeqId++ + if err = oprot.WriteMessageBegin("getPermission", thrift.CALL, p.SeqId); err != nil { + return + } + args := GetPermissionArgs{ + Request: request, + } + if err = args.Write(oprot); err != nil { + return + } + if err = oprot.WriteMessageEnd(); err != nil { + return + } + return oprot.Flush() +} + +func (p *TopicServiceClient) recvGetPermission() (value *GetPermissionResponse, err error) { + iprot := p.InputProtocol + if iprot == nil { + iprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.InputProtocol = iprot + } + _, mTypeId, seqId, err := iprot.ReadMessageBegin() + if err != nil { + return + } + if mTypeId == thrift.EXCEPTION { + error73 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error74 error + error74, err = error73.Read(iprot) + if err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + err = error74 + return + } + if p.SeqId != seqId { + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getPermission failed: out of sequence response") + return + } + result := GetPermissionResult{} + if err = result.Read(iprot); err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + if result.E != nil { + err = result.E + return + } + value = result.GetSuccess() + return +} + +// addSubResourceName, the caller must be a developer owner of topic +// +// Parameters: +// - Request +func (p *TopicServiceClient) AddSubResourceName(request *AddSubResourceNameRequest) (err error) { + if err = p.sendAddSubResourceName(request); err != nil { + return + } + return p.recvAddSubResourceName() +} + +func (p *TopicServiceClient) sendAddSubResourceName(request *AddSubResourceNameRequest) (err error) { + oprot := p.OutputProtocol + if oprot == nil { + oprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.OutputProtocol = oprot + } + p.SeqId++ + if err = oprot.WriteMessageBegin("addSubResourceName", thrift.CALL, p.SeqId); err != nil { + return + } + args := AddSubResourceNameArgs{ + Request: request, + } + if err = args.Write(oprot); err != nil { + return + } + if err = oprot.WriteMessageEnd(); err != nil { + return + } + return oprot.Flush() +} + +func (p *TopicServiceClient) recvAddSubResourceName() (err error) { + iprot := p.InputProtocol + if iprot == nil { + iprot = p.ProtocolFactory.GetProtocol(p.Transport) + p.InputProtocol = iprot + } + _, mTypeId, seqId, err := iprot.ReadMessageBegin() + if err != nil { + return + } + if mTypeId == thrift.EXCEPTION { + error75 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") + var error76 error + error76, err = error75.Read(iprot) + if err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + err = error76 + return + } + if p.SeqId != seqId { + err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "addSubResourceName failed: out of sequence response") + return + } + result := AddSubResourceNameResult{} + if err = result.Read(iprot); err != nil { + return + } + if err = iprot.ReadMessageEnd(); err != nil { + return + } + if result.E != nil { + err = result.E + return + } + return +} + +type TopicServiceProcessor struct { + *common.TalosBaseServiceProcessor +} + +func NewTopicServiceProcessor(handler TopicService) *TopicServiceProcessor { + self77 := &TopicServiceProcessor{common.NewTalosBaseServiceProcessor(handler)} + self77.AddToProcessorMap("createTopic", &topicServiceProcessorCreateTopic{handler: handler}) + self77.AddToProcessorMap("createReplicationTopic", &topicServiceProcessorCreateReplicationTopic{handler: handler}) + self77.AddToProcessorMap("createTopicGroup", &topicServiceProcessorCreateTopicGroup{handler: handler}) + self77.AddToProcessorMap("describeTopicGroup", &topicServiceProcessorDescribeTopicGroup{handler: handler}) + self77.AddToProcessorMap("deleteTopicGroup", &topicServiceProcessorDeleteTopicGroup{handler: handler}) + self77.AddToProcessorMap("listTopicGroup", &topicServiceProcessorListTopicGroup{handler: handler}) + self77.AddToProcessorMap("updateTopicGroup", &topicServiceProcessorUpdateTopicGroup{handler: handler}) + self77.AddToProcessorMap("deleteTopic", &topicServiceProcessorDeleteTopic{handler: handler}) + self77.AddToProcessorMap("lookupTopics", &topicServiceProcessorLookupTopics{handler: handler}) + self77.AddToProcessorMap("matchTopics", &topicServiceProcessorMatchTopics{handler: handler}) + self77.AddToProcessorMap("changeTopicAttribute", &topicServiceProcessorChangeTopicAttribute{handler: handler}) + self77.AddToProcessorMap("deleteTopicAttribute", &topicServiceProcessorDeleteTopicAttribute{handler: handler}) + self77.AddToProcessorMap("changeTopicOwnerInfo", &topicServiceProcessorChangeTopicOwnerInfo{handler: handler}) + self77.AddToProcessorMap("changeReplicationTopicSourceInfo", &topicServiceProcessorChangeReplicationTopicSourceInfo{handler: handler}) + self77.AddToProcessorMap("describeTopic", &topicServiceProcessorDescribeTopic{handler: handler}) + self77.AddToProcessorMap("getDescribeInfo", &topicServiceProcessorGetDescribeInfo{handler: handler}) + self77.AddToProcessorMap("getTopicAttribute", &topicServiceProcessorGetTopicAttribute{handler: handler}) + self77.AddToProcessorMap("listTopicsInfo", &topicServiceProcessorListTopicsInfo{handler: handler}) + self77.AddToProcessorMap("listTopics", &topicServiceProcessorListTopics{handler: handler}) + self77.AddToProcessorMap("getBindTopics", &topicServiceProcessorGetBindTopics{handler: handler}) + self77.AddToProcessorMap("setTopicQuota", &topicServiceProcessorSetTopicQuota{handler: handler}) + self77.AddToProcessorMap("queryTopicQuota", &topicServiceProcessorQueryTopicQuota{handler: handler}) + self77.AddToProcessorMap("deleteTopicQuota", &topicServiceProcessorDeleteTopicQuota{handler: handler}) + self77.AddToProcessorMap("setPermission", &topicServiceProcessorSetPermission{handler: handler}) + self77.AddToProcessorMap("revokePermission", &topicServiceProcessorRevokePermission{handler: handler}) + self77.AddToProcessorMap("listPermission", &topicServiceProcessorListPermission{handler: handler}) + self77.AddToProcessorMap("getPermission", &topicServiceProcessorGetPermission{handler: handler}) + self77.AddToProcessorMap("addSubResourceName", &topicServiceProcessorAddSubResourceName{handler: handler}) + return self77 +} + +type topicServiceProcessorCreateTopic struct { handler TopicService } -func (p *topicServiceProcessorDeleteTopic) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := DeleteTopicArgs{} +func (p *topicServiceProcessorCreateTopic) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := CreateTopicArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("deleteTopic", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("createTopic", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2183,22 +2327,25 @@ func (p *topicServiceProcessorDeleteTopic) Process(seqId int32, iprot, oprot thr } iprot.ReadMessageEnd() - result := DeleteTopicResult{} + result := CreateTopicResult{} + var retval *CreateTopicResponse var err2 error - if err2 = p.handler.DeleteTopic(args.Request); err2 != nil { + if retval, err2 = p.handler.CreateTopic(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTopic: "+err2.Error()) - oprot.WriteMessageBegin("deleteTopic", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTopic: "+err2.Error()) + oprot.WriteMessageBegin("createTopic", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } + } else { + result.Success = retval } - if err2 = oprot.WriteMessageBegin("deleteTopic", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("createTopic", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2216,16 +2363,16 @@ func (p *topicServiceProcessorDeleteTopic) Process(seqId int32, iprot, oprot thr return true, err } -type topicServiceProcessorChangeTopicAttribute struct { +type topicServiceProcessorCreateReplicationTopic struct { handler TopicService } -func (p *topicServiceProcessorChangeTopicAttribute) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ChangeTopicAttributeArgs{} +func (p *topicServiceProcessorCreateReplicationTopic) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := CreateReplicationTopicArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("changeTopicAttribute", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("createReplicationTopic", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2233,22 +2380,25 @@ func (p *topicServiceProcessorChangeTopicAttribute) Process(seqId int32, iprot, } iprot.ReadMessageEnd() - result := ChangeTopicAttributeResult{} + result := CreateReplicationTopicResult{} + var retval *CreateTopicResponse var err2 error - if err2 = p.handler.ChangeTopicAttribute(args.Request); err2 != nil { + if retval, err2 = p.handler.CreateReplicationTopic(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing changeTopicAttribute: "+err2.Error()) - oprot.WriteMessageBegin("changeTopicAttribute", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createReplicationTopic: "+err2.Error()) + oprot.WriteMessageBegin("createReplicationTopic", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } + } else { + result.Success = retval } - if err2 = oprot.WriteMessageBegin("changeTopicAttribute", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("createReplicationTopic", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2266,16 +2416,16 @@ func (p *topicServiceProcessorChangeTopicAttribute) Process(seqId int32, iprot, return true, err } -type topicServiceProcessorDescribeTopic struct { +type topicServiceProcessorCreateTopicGroup struct { handler TopicService } -func (p *topicServiceProcessorDescribeTopic) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := DescribeTopicArgs{} +func (p *topicServiceProcessorCreateTopicGroup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := CreateTopicGroupArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("describeTopic", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("createTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2283,16 +2433,16 @@ func (p *topicServiceProcessorDescribeTopic) Process(seqId int32, iprot, oprot t } iprot.ReadMessageEnd() - result := DescribeTopicResult{} - var retval *DescribeTopicResponse + result := CreateTopicGroupResult{} + var retval *CreateTopicGroupResponse var err2 error - if retval, err2 = p.handler.DescribeTopic(args.Request); err2 != nil { + if retval, err2 = p.handler.CreateTopicGroup(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing describeTopic: "+err2.Error()) - oprot.WriteMessageBegin("describeTopic", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTopicGroup: "+err2.Error()) + oprot.WriteMessageBegin("createTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2301,7 +2451,7 @@ func (p *topicServiceProcessorDescribeTopic) Process(seqId int32, iprot, oprot t } else { result.Success = retval } - if err2 = oprot.WriteMessageBegin("describeTopic", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("createTopicGroup", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2319,16 +2469,16 @@ func (p *topicServiceProcessorDescribeTopic) Process(seqId int32, iprot, oprot t return true, err } -type topicServiceProcessorGetDescribeInfo struct { +type topicServiceProcessorDescribeTopicGroup struct { handler TopicService } -func (p *topicServiceProcessorGetDescribeInfo) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := GetDescribeInfoArgs{} +func (p *topicServiceProcessorDescribeTopicGroup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := DescribeTopicGroupArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getDescribeInfo", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("describeTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2336,16 +2486,16 @@ func (p *topicServiceProcessorGetDescribeInfo) Process(seqId int32, iprot, oprot } iprot.ReadMessageEnd() - result := GetDescribeInfoResult{} - var retval *GetDescribeInfoResponse + result := DescribeTopicGroupResult{} + var retval *DescribeTopicGroupResponse var err2 error - if retval, err2 = p.handler.GetDescribeInfo(args.Request); err2 != nil { + if retval, err2 = p.handler.DescribeTopicGroup(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getDescribeInfo: "+err2.Error()) - oprot.WriteMessageBegin("getDescribeInfo", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing describeTopicGroup: "+err2.Error()) + oprot.WriteMessageBegin("describeTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2354,7 +2504,7 @@ func (p *topicServiceProcessorGetDescribeInfo) Process(seqId int32, iprot, oprot } else { result.Success = retval } - if err2 = oprot.WriteMessageBegin("getDescribeInfo", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("describeTopicGroup", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2372,16 +2522,16 @@ func (p *topicServiceProcessorGetDescribeInfo) Process(seqId int32, iprot, oprot return true, err } -type topicServiceProcessorGetTopicAttribute struct { +type topicServiceProcessorDeleteTopicGroup struct { handler TopicService } -func (p *topicServiceProcessorGetTopicAttribute) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := GetTopicAttributeArgs{} +func (p *topicServiceProcessorDeleteTopicGroup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := DeleteTopicGroupArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getTopicAttribute", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("deleteTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2389,25 +2539,22 @@ func (p *topicServiceProcessorGetTopicAttribute) Process(seqId int32, iprot, opr } iprot.ReadMessageEnd() - result := GetTopicAttributeResult{} - var retval *GetTopicAttributeResponse + result := DeleteTopicGroupResult{} var err2 error - if retval, err2 = p.handler.GetTopicAttribute(args.Request); err2 != nil { + if err2 = p.handler.DeleteTopicGroup(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTopicAttribute: "+err2.Error()) - oprot.WriteMessageBegin("getTopicAttribute", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTopicGroup: "+err2.Error()) + oprot.WriteMessageBegin("deleteTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } - } else { - result.Success = retval } - if err2 = oprot.WriteMessageBegin("getTopicAttribute", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("deleteTopicGroup", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2425,16 +2572,16 @@ func (p *topicServiceProcessorGetTopicAttribute) Process(seqId int32, iprot, opr return true, err } -type topicServiceProcessorListTopicsInfo struct { +type topicServiceProcessorListTopicGroup struct { handler TopicService } -func (p *topicServiceProcessorListTopicsInfo) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ListTopicsInfoArgs{} +func (p *topicServiceProcessorListTopicGroup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ListTopicGroupArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("listTopicsInfo", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("listTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2442,16 +2589,16 @@ func (p *topicServiceProcessorListTopicsInfo) Process(seqId int32, iprot, oprot } iprot.ReadMessageEnd() - result := ListTopicsInfoResult{} - var retval *ListTopicsInfoResponse + result := ListTopicGroupResult{} + var retval *ListTopicGroupResponse var err2 error - if retval, err2 = p.handler.ListTopicsInfo(); err2 != nil { + if retval, err2 = p.handler.ListTopicGroup(); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listTopicsInfo: "+err2.Error()) - oprot.WriteMessageBegin("listTopicsInfo", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listTopicGroup: "+err2.Error()) + oprot.WriteMessageBegin("listTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2460,7 +2607,7 @@ func (p *topicServiceProcessorListTopicsInfo) Process(seqId int32, iprot, oprot } else { result.Success = retval } - if err2 = oprot.WriteMessageBegin("listTopicsInfo", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("listTopicGroup", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2478,16 +2625,16 @@ func (p *topicServiceProcessorListTopicsInfo) Process(seqId int32, iprot, oprot return true, err } -type topicServiceProcessorListTopics struct { +type topicServiceProcessorUpdateTopicGroup struct { handler TopicService } -func (p *topicServiceProcessorListTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ListTopicsArgs{} +func (p *topicServiceProcessorUpdateTopicGroup) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := UpdateTopicGroupArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("listTopics", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("updateTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2495,25 +2642,22 @@ func (p *topicServiceProcessorListTopics) Process(seqId int32, iprot, oprot thri } iprot.ReadMessageEnd() - result := ListTopicsResult{} - var retval *ListTopicsResponse + result := UpdateTopicGroupResult{} var err2 error - if retval, err2 = p.handler.ListTopics(); err2 != nil { + if err2 = p.handler.UpdateTopicGroup(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listTopics: "+err2.Error()) - oprot.WriteMessageBegin("listTopics", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing updateTopicGroup: "+err2.Error()) + oprot.WriteMessageBegin("updateTopicGroup", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } - } else { - result.Success = retval } - if err2 = oprot.WriteMessageBegin("listTopics", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("updateTopicGroup", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2531,16 +2675,16 @@ func (p *topicServiceProcessorListTopics) Process(seqId int32, iprot, oprot thri return true, err } -type topicServiceProcessorGetBindTopics struct { +type topicServiceProcessorDeleteTopic struct { handler TopicService } -func (p *topicServiceProcessorGetBindTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := GetBindTopicsArgs{} +func (p *topicServiceProcessorDeleteTopic) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := DeleteTopicArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getBindTopics", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("deleteTopic", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2548,25 +2692,22 @@ func (p *topicServiceProcessorGetBindTopics) Process(seqId int32, iprot, oprot t } iprot.ReadMessageEnd() - result := GetBindTopicsResult{} - var retval *ListTopicsResponse + result := DeleteTopicResult{} var err2 error - if retval, err2 = p.handler.GetBindTopics(); err2 != nil { + if err2 = p.handler.DeleteTopic(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getBindTopics: "+err2.Error()) - oprot.WriteMessageBegin("getBindTopics", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTopic: "+err2.Error()) + oprot.WriteMessageBegin("deleteTopic", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } - } else { - result.Success = retval } - if err2 = oprot.WriteMessageBegin("getBindTopics", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("deleteTopic", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2584,16 +2725,16 @@ func (p *topicServiceProcessorGetBindTopics) Process(seqId int32, iprot, oprot t return true, err } -type topicServiceProcessorSetTopicQuota struct { +type topicServiceProcessorLookupTopics struct { handler TopicService } -func (p *topicServiceProcessorSetTopicQuota) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := SetTopicQuotaArgs{} +func (p *topicServiceProcessorLookupTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := LookupTopicsArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("setTopicQuota", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("lookupTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2601,22 +2742,25 @@ func (p *topicServiceProcessorSetTopicQuota) Process(seqId int32, iprot, oprot t } iprot.ReadMessageEnd() - result := SetTopicQuotaResult{} + result := LookupTopicsResult{} + var retval *LookupTopicsResponse var err2 error - if err2 = p.handler.SetTopicQuota(args.Request); err2 != nil { + if retval, err2 = p.handler.LookupTopics(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setTopicQuota: "+err2.Error()) - oprot.WriteMessageBegin("setTopicQuota", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing lookupTopics: "+err2.Error()) + oprot.WriteMessageBegin("lookupTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } + } else { + result.Success = retval } - if err2 = oprot.WriteMessageBegin("setTopicQuota", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("lookupTopics", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2634,16 +2778,16 @@ func (p *topicServiceProcessorSetTopicQuota) Process(seqId int32, iprot, oprot t return true, err } -type topicServiceProcessorQueryTopicQuota struct { +type topicServiceProcessorMatchTopics struct { handler TopicService } -func (p *topicServiceProcessorQueryTopicQuota) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := QueryTopicQuotaArgs{} +func (p *topicServiceProcessorMatchTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := MatchTopicsArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("queryTopicQuota", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("matchTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2651,16 +2795,16 @@ func (p *topicServiceProcessorQueryTopicQuota) Process(seqId int32, iprot, oprot } iprot.ReadMessageEnd() - result := QueryTopicQuotaResult{} - var retval *QueryTopicQuotaResponse + result := MatchTopicsResult{} + var retval *MatchTopicsResponse var err2 error - if retval, err2 = p.handler.QueryTopicQuota(args.Request); err2 != nil { + if retval, err2 = p.handler.MatchTopics(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing queryTopicQuota: "+err2.Error()) - oprot.WriteMessageBegin("queryTopicQuota", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing matchTopics: "+err2.Error()) + oprot.WriteMessageBegin("matchTopics", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2669,7 +2813,7 @@ func (p *topicServiceProcessorQueryTopicQuota) Process(seqId int32, iprot, oprot } else { result.Success = retval } - if err2 = oprot.WriteMessageBegin("queryTopicQuota", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("matchTopics", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2687,16 +2831,16 @@ func (p *topicServiceProcessorQueryTopicQuota) Process(seqId int32, iprot, oprot return true, err } -type topicServiceProcessorDeleteTopicQuota struct { +type topicServiceProcessorChangeTopicAttribute struct { handler TopicService } -func (p *topicServiceProcessorDeleteTopicQuota) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := DeleteTopicQuotaArgs{} +func (p *topicServiceProcessorChangeTopicAttribute) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ChangeTopicAttributeArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("deleteTopicQuota", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("changeTopicAttribute", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2704,22 +2848,22 @@ func (p *topicServiceProcessorDeleteTopicQuota) Process(seqId int32, iprot, opro } iprot.ReadMessageEnd() - result := DeleteTopicQuotaResult{} + result := ChangeTopicAttributeResult{} var err2 error - if err2 = p.handler.DeleteTopicQuota(args.Request); err2 != nil { + if err2 = p.handler.ChangeTopicAttribute(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTopicQuota: "+err2.Error()) - oprot.WriteMessageBegin("deleteTopicQuota", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing changeTopicAttribute: "+err2.Error()) + oprot.WriteMessageBegin("changeTopicAttribute", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } } - if err2 = oprot.WriteMessageBegin("deleteTopicQuota", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("changeTopicAttribute", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2737,16 +2881,16 @@ func (p *topicServiceProcessorDeleteTopicQuota) Process(seqId int32, iprot, opro return true, err } -type topicServiceProcessorSetPermission struct { +type topicServiceProcessorDeleteTopicAttribute struct { handler TopicService } -func (p *topicServiceProcessorSetPermission) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := SetPermissionArgs{} +func (p *topicServiceProcessorDeleteTopicAttribute) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := DeleteTopicAttributeArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("setPermission", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("deleteTopicAttribute", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2754,22 +2898,22 @@ func (p *topicServiceProcessorSetPermission) Process(seqId int32, iprot, oprot t } iprot.ReadMessageEnd() - result := SetPermissionResult{} + result := DeleteTopicAttributeResult{} var err2 error - if err2 = p.handler.SetPermission(args.Request); err2 != nil { + if err2 = p.handler.DeleteTopicAttribute(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setPermission: "+err2.Error()) - oprot.WriteMessageBegin("setPermission", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTopicAttribute: "+err2.Error()) + oprot.WriteMessageBegin("deleteTopicAttribute", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } } - if err2 = oprot.WriteMessageBegin("setPermission", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("deleteTopicAttribute", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2787,16 +2931,16 @@ func (p *topicServiceProcessorSetPermission) Process(seqId int32, iprot, oprot t return true, err } -type topicServiceProcessorRevokePermission struct { +type topicServiceProcessorChangeTopicOwnerInfo struct { handler TopicService } -func (p *topicServiceProcessorRevokePermission) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := RevokePermissionArgs{} +func (p *topicServiceProcessorChangeTopicOwnerInfo) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ChangeTopicOwnerInfoArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("revokePermission", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("changeTopicOwnerInfo", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2804,22 +2948,22 @@ func (p *topicServiceProcessorRevokePermission) Process(seqId int32, iprot, opro } iprot.ReadMessageEnd() - result := RevokePermissionResult{} + result := ChangeTopicOwnerInfoResult{} var err2 error - if err2 = p.handler.RevokePermission(args.Request); err2 != nil { + if err2 = p.handler.ChangeTopicOwnerInfo(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing revokePermission: "+err2.Error()) - oprot.WriteMessageBegin("revokePermission", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing changeTopicOwnerInfo: "+err2.Error()) + oprot.WriteMessageBegin("changeTopicOwnerInfo", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } } - if err2 = oprot.WriteMessageBegin("revokePermission", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("changeTopicOwnerInfo", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2837,16 +2981,16 @@ func (p *topicServiceProcessorRevokePermission) Process(seqId int32, iprot, opro return true, err } -type topicServiceProcessorListPermission struct { +type topicServiceProcessorChangeReplicationTopicSourceInfo struct { handler TopicService } -func (p *topicServiceProcessorListPermission) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ListPermissionArgs{} +func (p *topicServiceProcessorChangeReplicationTopicSourceInfo) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ChangeReplicationTopicSourceInfoArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("listPermission", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("changeReplicationTopicSourceInfo", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2854,25 +2998,22 @@ func (p *topicServiceProcessorListPermission) Process(seqId int32, iprot, oprot } iprot.ReadMessageEnd() - result := ListPermissionResult{} - var retval *ListPermissionResponse + result := ChangeReplicationTopicSourceInfoResult{} var err2 error - if retval, err2 = p.handler.ListPermission(args.Request); err2 != nil { + if err2 = p.handler.ChangeReplicationTopicSourceInfo(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listPermission: "+err2.Error()) - oprot.WriteMessageBegin("listPermission", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing changeReplicationTopicSourceInfo: "+err2.Error()) + oprot.WriteMessageBegin("changeReplicationTopicSourceInfo", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } - } else { - result.Success = retval } - if err2 = oprot.WriteMessageBegin("listPermission", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("changeReplicationTopicSourceInfo", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2890,16 +3031,16 @@ func (p *topicServiceProcessorListPermission) Process(seqId int32, iprot, oprot return true, err } -type topicServiceProcessorGetPermission struct { +type topicServiceProcessorDescribeTopic struct { handler TopicService } -func (p *topicServiceProcessorGetPermission) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := GetPermissionArgs{} +func (p *topicServiceProcessorDescribeTopic) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := DescribeTopicArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getPermission", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("describeTopic", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2907,16 +3048,16 @@ func (p *topicServiceProcessorGetPermission) Process(seqId int32, iprot, oprot t } iprot.ReadMessageEnd() - result := GetPermissionResult{} - var retval *GetPermissionResponse + result := DescribeTopicResult{} + var retval *DescribeTopicResponse var err2 error - if retval, err2 = p.handler.GetPermission(args.Request); err2 != nil { + if retval, err2 = p.handler.DescribeTopic(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getPermission: "+err2.Error()) - oprot.WriteMessageBegin("getPermission", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing describeTopic: "+err2.Error()) + oprot.WriteMessageBegin("describeTopic", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2925,7 +3066,7 @@ func (p *topicServiceProcessorGetPermission) Process(seqId int32, iprot, oprot t } else { result.Success = retval } - if err2 = oprot.WriteMessageBegin("getPermission", thrift.REPLY, seqId); err2 != nil { + if err2 = oprot.WriteMessageBegin("describeTopic", thrift.REPLY, seqId); err2 != nil { err = err2 } if err2 = result.Write(oprot); err == nil && err2 != nil { @@ -2943,16 +3084,16 @@ func (p *topicServiceProcessorGetPermission) Process(seqId int32, iprot, oprot t return true, err } -type topicServiceProcessorAddSubResourceName struct { +type topicServiceProcessorGetDescribeInfo struct { handler TopicService } -func (p *topicServiceProcessorAddSubResourceName) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := AddSubResourceNameArgs{} +func (p *topicServiceProcessorGetDescribeInfo) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := GetDescribeInfoArgs{} if err = args.Read(iprot); err != nil { iprot.ReadMessageEnd() x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("addSubResourceName", thrift.EXCEPTION, seqId) + oprot.WriteMessageBegin("getDescribeInfo", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() @@ -2960,62 +3101,2026 @@ func (p *topicServiceProcessorAddSubResourceName) Process(seqId int32, iprot, op } iprot.ReadMessageEnd() - result := AddSubResourceNameResult{} + result := GetDescribeInfoResult{} + var retval *GetDescribeInfoResponse var err2 error - if err2 = p.handler.AddSubResourceName(args.Request); err2 != nil { + if retval, err2 = p.handler.GetDescribeInfo(args.Request); err2 != nil { switch v := err2.(type) { case *common.GalaxyTalosException: result.E = v default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing addSubResourceName: "+err2.Error()) - oprot.WriteMessageBegin("addSubResourceName", thrift.EXCEPTION, seqId) + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getDescribeInfo: "+err2.Error()) + oprot.WriteMessageBegin("getDescribeInfo", thrift.EXCEPTION, seqId) x.Write(oprot) oprot.WriteMessageEnd() oprot.Flush() return true, err2 } + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("getDescribeInfo", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorGetTopicAttribute struct { + handler TopicService +} + +func (p *topicServiceProcessorGetTopicAttribute) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := GetTopicAttributeArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("getTopicAttribute", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := GetTopicAttributeResult{} + var retval *GetTopicAttributeResponse + var err2 error + if retval, err2 = p.handler.GetTopicAttribute(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTopicAttribute: "+err2.Error()) + oprot.WriteMessageBegin("getTopicAttribute", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("getTopicAttribute", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorListTopicsInfo struct { + handler TopicService +} + +func (p *topicServiceProcessorListTopicsInfo) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ListTopicsInfoArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("listTopicsInfo", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := ListTopicsInfoResult{} + var retval *ListTopicsInfoResponse + var err2 error + if retval, err2 = p.handler.ListTopicsInfo(); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listTopicsInfo: "+err2.Error()) + oprot.WriteMessageBegin("listTopicsInfo", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("listTopicsInfo", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorListTopics struct { + handler TopicService +} + +func (p *topicServiceProcessorListTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ListTopicsArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("listTopics", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := ListTopicsResult{} + var retval *ListTopicsResponse + var err2 error + if retval, err2 = p.handler.ListTopics(); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listTopics: "+err2.Error()) + oprot.WriteMessageBegin("listTopics", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("listTopics", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorGetBindTopics struct { + handler TopicService +} + +func (p *topicServiceProcessorGetBindTopics) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := GetBindTopicsArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("getBindTopics", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := GetBindTopicsResult{} + var retval *ListTopicsResponse + var err2 error + if retval, err2 = p.handler.GetBindTopics(); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getBindTopics: "+err2.Error()) + oprot.WriteMessageBegin("getBindTopics", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("getBindTopics", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorSetTopicQuota struct { + handler TopicService +} + +func (p *topicServiceProcessorSetTopicQuota) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := SetTopicQuotaArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("setTopicQuota", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := SetTopicQuotaResult{} + var err2 error + if err2 = p.handler.SetTopicQuota(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setTopicQuota: "+err2.Error()) + oprot.WriteMessageBegin("setTopicQuota", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } + if err2 = oprot.WriteMessageBegin("setTopicQuota", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorQueryTopicQuota struct { + handler TopicService +} + +func (p *topicServiceProcessorQueryTopicQuota) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := QueryTopicQuotaArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("queryTopicQuota", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := QueryTopicQuotaResult{} + var retval *QueryTopicQuotaResponse + var err2 error + if retval, err2 = p.handler.QueryTopicQuota(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing queryTopicQuota: "+err2.Error()) + oprot.WriteMessageBegin("queryTopicQuota", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("queryTopicQuota", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorDeleteTopicQuota struct { + handler TopicService +} + +func (p *topicServiceProcessorDeleteTopicQuota) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := DeleteTopicQuotaArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("deleteTopicQuota", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := DeleteTopicQuotaResult{} + var err2 error + if err2 = p.handler.DeleteTopicQuota(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTopicQuota: "+err2.Error()) + oprot.WriteMessageBegin("deleteTopicQuota", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } + if err2 = oprot.WriteMessageBegin("deleteTopicQuota", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorSetPermission struct { + handler TopicService +} + +func (p *topicServiceProcessorSetPermission) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := SetPermissionArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("setPermission", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := SetPermissionResult{} + var err2 error + if err2 = p.handler.SetPermission(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing setPermission: "+err2.Error()) + oprot.WriteMessageBegin("setPermission", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } + if err2 = oprot.WriteMessageBegin("setPermission", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorRevokePermission struct { + handler TopicService +} + +func (p *topicServiceProcessorRevokePermission) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := RevokePermissionArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("revokePermission", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := RevokePermissionResult{} + var err2 error + if err2 = p.handler.RevokePermission(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing revokePermission: "+err2.Error()) + oprot.WriteMessageBegin("revokePermission", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } + if err2 = oprot.WriteMessageBegin("revokePermission", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorListPermission struct { + handler TopicService +} + +func (p *topicServiceProcessorListPermission) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ListPermissionArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("listPermission", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := ListPermissionResult{} + var retval *ListPermissionResponse + var err2 error + if retval, err2 = p.handler.ListPermission(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listPermission: "+err2.Error()) + oprot.WriteMessageBegin("listPermission", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("listPermission", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorGetPermission struct { + handler TopicService +} + +func (p *topicServiceProcessorGetPermission) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := GetPermissionArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("getPermission", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := GetPermissionResult{} + var retval *GetPermissionResponse + var err2 error + if retval, err2 = p.handler.GetPermission(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getPermission: "+err2.Error()) + oprot.WriteMessageBegin("getPermission", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } else { + result.Success = retval + } + if err2 = oprot.WriteMessageBegin("getPermission", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +type topicServiceProcessorAddSubResourceName struct { + handler TopicService +} + +func (p *topicServiceProcessorAddSubResourceName) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := AddSubResourceNameArgs{} + if err = args.Read(iprot); err != nil { + iprot.ReadMessageEnd() + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) + oprot.WriteMessageBegin("addSubResourceName", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return false, err + } + + iprot.ReadMessageEnd() + result := AddSubResourceNameResult{} + var err2 error + if err2 = p.handler.AddSubResourceName(args.Request); err2 != nil { + switch v := err2.(type) { + case *common.GalaxyTalosException: + result.E = v + default: + x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing addSubResourceName: "+err2.Error()) + oprot.WriteMessageBegin("addSubResourceName", thrift.EXCEPTION, seqId) + x.Write(oprot) + oprot.WriteMessageEnd() + oprot.Flush() + return true, err2 + } + } + if err2 = oprot.WriteMessageBegin("addSubResourceName", thrift.REPLY, seqId); err2 != nil { + err = err2 + } + if err2 = result.Write(oprot); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { + err = err2 + } + if err2 = oprot.Flush(); err == nil && err2 != nil { + err = err2 + } + if err != nil { + return + } + return true, err +} + +// HELPER FUNCTIONS AND STRUCTURES + +type CreateTopicArgs struct { + Request *CreateTopicRequest `thrift:"request,1" json:"request"` +} + +func NewCreateTopicArgs() *CreateTopicArgs { + return &CreateTopicArgs{} +} + +var CreateTopicArgs_Request_DEFAULT *CreateTopicRequest + +func (p *CreateTopicArgs) GetRequest() *CreateTopicRequest { + if !p.IsSetRequest() { + return CreateTopicArgs_Request_DEFAULT + } + return p.Request +} +func (p *CreateTopicArgs) IsSetRequest() bool { + return p.Request != nil +} + +func (p *CreateTopicArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *CreateTopicArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &CreateTopicRequest{} + if err := p.Request.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Request, err) + } + return nil +} + +func (p *CreateTopicArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("createTopic_args"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *CreateTopicArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:request: %s", p, err) + } + if err := p.Request.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Request, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:request: %s", p, err) + } + return err +} + +func (p *CreateTopicArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("CreateTopicArgs(%+v)", *p) +} + +type CreateTopicResult struct { + Success *CreateTopicResponse `thrift:"success,0" json:"success"` + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` +} + +func NewCreateTopicResult() *CreateTopicResult { + return &CreateTopicResult{} +} + +var CreateTopicResult_Success_DEFAULT *CreateTopicResponse + +func (p *CreateTopicResult) GetSuccess() *CreateTopicResponse { + if !p.IsSetSuccess() { + return CreateTopicResult_Success_DEFAULT + } + return p.Success +} + +var CreateTopicResult_E_DEFAULT *common.GalaxyTalosException + +func (p *CreateTopicResult) GetE() *common.GalaxyTalosException { + if !p.IsSetE() { + return CreateTopicResult_E_DEFAULT + } + return p.E +} +func (p *CreateTopicResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *CreateTopicResult) IsSetE() bool { + return p.E != nil +} + +func (p *CreateTopicResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 0: + if err := p.ReadField0(iprot); err != nil { + return err + } + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *CreateTopicResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &CreateTopicResponse{} + if err := p.Success.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Success, err) + } + return nil +} + +func (p *CreateTopicResult) ReadField1(iprot thrift.TProtocol) error { + p.E = &common.GalaxyTalosException{} + if err := p.E.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.E, err) + } + return nil +} + +func (p *CreateTopicResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("createTopic_result"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField0(oprot); err != nil { + return err + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *CreateTopicResult) writeField0(oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + return fmt.Errorf("%T write field begin error 0:success: %s", p, err) + } + if err := p.Success.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Success, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 0:success: %s", p, err) + } + } + return err +} + +func (p *CreateTopicResult) writeField1(oprot thrift.TProtocol) (err error) { + if p.IsSetE() { + if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:e: %s", p, err) + } + if err := p.E.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.E, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:e: %s", p, err) + } + } + return err +} + +func (p *CreateTopicResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("CreateTopicResult(%+v)", *p) +} + +type CreateReplicationTopicArgs struct { + Request *CreateReplicationTopicRequest `thrift:"request,1" json:"request"` +} + +func NewCreateReplicationTopicArgs() *CreateReplicationTopicArgs { + return &CreateReplicationTopicArgs{} +} + +var CreateReplicationTopicArgs_Request_DEFAULT *CreateReplicationTopicRequest + +func (p *CreateReplicationTopicArgs) GetRequest() *CreateReplicationTopicRequest { + if !p.IsSetRequest() { + return CreateReplicationTopicArgs_Request_DEFAULT + } + return p.Request +} +func (p *CreateReplicationTopicArgs) IsSetRequest() bool { + return p.Request != nil +} + +func (p *CreateReplicationTopicArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *CreateReplicationTopicArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &CreateReplicationTopicRequest{} + if err := p.Request.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Request, err) + } + return nil +} + +func (p *CreateReplicationTopicArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("createReplicationTopic_args"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *CreateReplicationTopicArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:request: %s", p, err) + } + if err := p.Request.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Request, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:request: %s", p, err) + } + return err +} + +func (p *CreateReplicationTopicArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("CreateReplicationTopicArgs(%+v)", *p) +} + +type CreateReplicationTopicResult struct { + Success *CreateTopicResponse `thrift:"success,0" json:"success"` + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` +} + +func NewCreateReplicationTopicResult() *CreateReplicationTopicResult { + return &CreateReplicationTopicResult{} +} + +var CreateReplicationTopicResult_Success_DEFAULT *CreateTopicResponse + +func (p *CreateReplicationTopicResult) GetSuccess() *CreateTopicResponse { + if !p.IsSetSuccess() { + return CreateReplicationTopicResult_Success_DEFAULT + } + return p.Success +} + +var CreateReplicationTopicResult_E_DEFAULT *common.GalaxyTalosException + +func (p *CreateReplicationTopicResult) GetE() *common.GalaxyTalosException { + if !p.IsSetE() { + return CreateReplicationTopicResult_E_DEFAULT + } + return p.E +} +func (p *CreateReplicationTopicResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *CreateReplicationTopicResult) IsSetE() bool { + return p.E != nil +} + +func (p *CreateReplicationTopicResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 0: + if err := p.ReadField0(iprot); err != nil { + return err + } + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *CreateReplicationTopicResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &CreateTopicResponse{} + if err := p.Success.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Success, err) + } + return nil +} + +func (p *CreateReplicationTopicResult) ReadField1(iprot thrift.TProtocol) error { + p.E = &common.GalaxyTalosException{} + if err := p.E.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.E, err) + } + return nil +} + +func (p *CreateReplicationTopicResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("createReplicationTopic_result"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField0(oprot); err != nil { + return err + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *CreateReplicationTopicResult) writeField0(oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + return fmt.Errorf("%T write field begin error 0:success: %s", p, err) + } + if err := p.Success.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Success, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 0:success: %s", p, err) + } + } + return err +} + +func (p *CreateReplicationTopicResult) writeField1(oprot thrift.TProtocol) (err error) { + if p.IsSetE() { + if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:e: %s", p, err) + } + if err := p.E.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.E, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:e: %s", p, err) + } + } + return err +} + +func (p *CreateReplicationTopicResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("CreateReplicationTopicResult(%+v)", *p) +} + +type CreateTopicGroupArgs struct { + Request *CreateTopicGroupRequest `thrift:"request,1" json:"request"` +} + +func NewCreateTopicGroupArgs() *CreateTopicGroupArgs { + return &CreateTopicGroupArgs{} +} + +var CreateTopicGroupArgs_Request_DEFAULT *CreateTopicGroupRequest + +func (p *CreateTopicGroupArgs) GetRequest() *CreateTopicGroupRequest { + if !p.IsSetRequest() { + return CreateTopicGroupArgs_Request_DEFAULT + } + return p.Request +} +func (p *CreateTopicGroupArgs) IsSetRequest() bool { + return p.Request != nil +} + +func (p *CreateTopicGroupArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *CreateTopicGroupArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &CreateTopicGroupRequest{} + if err := p.Request.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Request, err) + } + return nil +} + +func (p *CreateTopicGroupArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("createTopicGroup_args"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *CreateTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:request: %s", p, err) + } + if err := p.Request.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Request, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:request: %s", p, err) + } + return err +} + +func (p *CreateTopicGroupArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("CreateTopicGroupArgs(%+v)", *p) +} + +type CreateTopicGroupResult struct { + Success *CreateTopicGroupResponse `thrift:"success,0" json:"success"` + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` +} + +func NewCreateTopicGroupResult() *CreateTopicGroupResult { + return &CreateTopicGroupResult{} +} + +var CreateTopicGroupResult_Success_DEFAULT *CreateTopicGroupResponse + +func (p *CreateTopicGroupResult) GetSuccess() *CreateTopicGroupResponse { + if !p.IsSetSuccess() { + return CreateTopicGroupResult_Success_DEFAULT + } + return p.Success +} + +var CreateTopicGroupResult_E_DEFAULT *common.GalaxyTalosException + +func (p *CreateTopicGroupResult) GetE() *common.GalaxyTalosException { + if !p.IsSetE() { + return CreateTopicGroupResult_E_DEFAULT + } + return p.E +} +func (p *CreateTopicGroupResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *CreateTopicGroupResult) IsSetE() bool { + return p.E != nil +} + +func (p *CreateTopicGroupResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 0: + if err := p.ReadField0(iprot); err != nil { + return err + } + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *CreateTopicGroupResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &CreateTopicGroupResponse{} + if err := p.Success.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Success, err) + } + return nil +} + +func (p *CreateTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { + p.E = &common.GalaxyTalosException{} + if err := p.E.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.E, err) + } + return nil +} + +func (p *CreateTopicGroupResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("createTopicGroup_result"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField0(oprot); err != nil { + return err + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *CreateTopicGroupResult) writeField0(oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + return fmt.Errorf("%T write field begin error 0:success: %s", p, err) + } + if err := p.Success.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Success, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 0:success: %s", p, err) + } + } + return err +} + +func (p *CreateTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { + if p.IsSetE() { + if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:e: %s", p, err) + } + if err := p.E.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.E, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:e: %s", p, err) + } + } + return err +} + +func (p *CreateTopicGroupResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("CreateTopicGroupResult(%+v)", *p) +} + +type DescribeTopicGroupArgs struct { + Request *DescribeTopicGroupRequest `thrift:"request,1" json:"request"` +} + +func NewDescribeTopicGroupArgs() *DescribeTopicGroupArgs { + return &DescribeTopicGroupArgs{} +} + +var DescribeTopicGroupArgs_Request_DEFAULT *DescribeTopicGroupRequest + +func (p *DescribeTopicGroupArgs) GetRequest() *DescribeTopicGroupRequest { + if !p.IsSetRequest() { + return DescribeTopicGroupArgs_Request_DEFAULT + } + return p.Request +} +func (p *DescribeTopicGroupArgs) IsSetRequest() bool { + return p.Request != nil +} + +func (p *DescribeTopicGroupArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *DescribeTopicGroupArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &DescribeTopicGroupRequest{} + if err := p.Request.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Request, err) + } + return nil +} + +func (p *DescribeTopicGroupArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("describeTopicGroup_args"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *DescribeTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:request: %s", p, err) + } + if err := p.Request.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Request, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:request: %s", p, err) + } + return err +} + +func (p *DescribeTopicGroupArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("DescribeTopicGroupArgs(%+v)", *p) +} + +type DescribeTopicGroupResult struct { + Success *DescribeTopicGroupResponse `thrift:"success,0" json:"success"` + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` +} + +func NewDescribeTopicGroupResult() *DescribeTopicGroupResult { + return &DescribeTopicGroupResult{} +} + +var DescribeTopicGroupResult_Success_DEFAULT *DescribeTopicGroupResponse + +func (p *DescribeTopicGroupResult) GetSuccess() *DescribeTopicGroupResponse { + if !p.IsSetSuccess() { + return DescribeTopicGroupResult_Success_DEFAULT + } + return p.Success +} + +var DescribeTopicGroupResult_E_DEFAULT *common.GalaxyTalosException + +func (p *DescribeTopicGroupResult) GetE() *common.GalaxyTalosException { + if !p.IsSetE() { + return DescribeTopicGroupResult_E_DEFAULT + } + return p.E +} +func (p *DescribeTopicGroupResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *DescribeTopicGroupResult) IsSetE() bool { + return p.E != nil +} + +func (p *DescribeTopicGroupResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 0: + if err := p.ReadField0(iprot); err != nil { + return err + } + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *DescribeTopicGroupResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &DescribeTopicGroupResponse{} + if err := p.Success.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Success, err) + } + return nil +} + +func (p *DescribeTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { + p.E = &common.GalaxyTalosException{} + if err := p.E.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.E, err) + } + return nil +} + +func (p *DescribeTopicGroupResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("describeTopicGroup_result"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField0(oprot); err != nil { + return err + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *DescribeTopicGroupResult) writeField0(oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + return fmt.Errorf("%T write field begin error 0:success: %s", p, err) + } + if err := p.Success.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Success, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 0:success: %s", p, err) + } + } + return err +} + +func (p *DescribeTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { + if p.IsSetE() { + if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:e: %s", p, err) + } + if err := p.E.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.E, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:e: %s", p, err) + } + } + return err +} + +func (p *DescribeTopicGroupResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("DescribeTopicGroupResult(%+v)", *p) +} + +type DeleteTopicGroupArgs struct { + Request *DeleteTopicGroupRequest `thrift:"request,1" json:"request"` +} + +func NewDeleteTopicGroupArgs() *DeleteTopicGroupArgs { + return &DeleteTopicGroupArgs{} +} + +var DeleteTopicGroupArgs_Request_DEFAULT *DeleteTopicGroupRequest + +func (p *DeleteTopicGroupArgs) GetRequest() *DeleteTopicGroupRequest { + if !p.IsSetRequest() { + return DeleteTopicGroupArgs_Request_DEFAULT + } + return p.Request +} +func (p *DeleteTopicGroupArgs) IsSetRequest() bool { + return p.Request != nil +} + +func (p *DeleteTopicGroupArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *DeleteTopicGroupArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &DeleteTopicGroupRequest{} + if err := p.Request.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Request, err) + } + return nil +} + +func (p *DeleteTopicGroupArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteTopicGroup_args"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *DeleteTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:request: %s", p, err) + } + if err := p.Request.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Request, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:request: %s", p, err) + } + return err +} + +func (p *DeleteTopicGroupArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("DeleteTopicGroupArgs(%+v)", *p) +} + +type DeleteTopicGroupResult struct { + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` +} + +func NewDeleteTopicGroupResult() *DeleteTopicGroupResult { + return &DeleteTopicGroupResult{} +} + +var DeleteTopicGroupResult_E_DEFAULT *common.GalaxyTalosException + +func (p *DeleteTopicGroupResult) GetE() *common.GalaxyTalosException { + if !p.IsSetE() { + return DeleteTopicGroupResult_E_DEFAULT + } + return p.E +} +func (p *DeleteTopicGroupResult) IsSetE() bool { + return p.E != nil +} + +func (p *DeleteTopicGroupResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *DeleteTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { + p.E = &common.GalaxyTalosException{} + if err := p.E.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.E, err) + } + return nil +} + +func (p *DeleteTopicGroupResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteTopicGroup_result"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *DeleteTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { + if p.IsSetE() { + if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:e: %s", p, err) + } + if err := p.E.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.E, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:e: %s", p, err) + } + } + return err +} + +func (p *DeleteTopicGroupResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("DeleteTopicGroupResult(%+v)", *p) +} + +type ListTopicGroupArgs struct { +} + +func NewListTopicGroupArgs() *ListTopicGroupArgs { + return &ListTopicGroupArgs{} +} + +func (p *ListTopicGroupArgs) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *ListTopicGroupArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("listTopicGroup_args"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *ListTopicGroupArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ListTopicGroupArgs(%+v)", *p) +} + +type ListTopicGroupResult struct { + Success *ListTopicGroupResponse `thrift:"success,0" json:"success"` + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` +} + +func NewListTopicGroupResult() *ListTopicGroupResult { + return &ListTopicGroupResult{} +} + +var ListTopicGroupResult_Success_DEFAULT *ListTopicGroupResponse + +func (p *ListTopicGroupResult) GetSuccess() *ListTopicGroupResponse { + if !p.IsSetSuccess() { + return ListTopicGroupResult_Success_DEFAULT + } + return p.Success +} + +var ListTopicGroupResult_E_DEFAULT *common.GalaxyTalosException + +func (p *ListTopicGroupResult) GetE() *common.GalaxyTalosException { + if !p.IsSetE() { + return ListTopicGroupResult_E_DEFAULT + } + return p.E +} +func (p *ListTopicGroupResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ListTopicGroupResult) IsSetE() bool { + return p.E != nil +} + +func (p *ListTopicGroupResult) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 0: + if err := p.ReadField0(iprot); err != nil { + return err + } + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *ListTopicGroupResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &ListTopicGroupResponse{} + if err := p.Success.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.Success, err) + } + return nil +} + +func (p *ListTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { + p.E = &common.GalaxyTalosException{} + if err := p.E.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.E, err) } - if err2 = oprot.WriteMessageBegin("addSubResourceName", thrift.REPLY, seqId); err2 != nil { - err = err2 + return nil +} + +func (p *ListTopicGroupResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("listTopicGroup_result"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 + if err := p.writeField0(oprot); err != nil { + return err } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 + if err := p.writeField1(oprot); err != nil { + return err } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) } - if err != nil { - return + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) } - return true, err + return nil } -// HELPER FUNCTIONS AND STRUCTURES +func (p *ListTopicGroupResult) writeField0(oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { + return fmt.Errorf("%T write field begin error 0:success: %s", p, err) + } + if err := p.Success.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.Success, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 0:success: %s", p, err) + } + } + return err +} -type CreateTopicArgs struct { - Request *CreateTopicRequest `thrift:"request,1" json:"request"` +func (p *ListTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { + if p.IsSetE() { + if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:e: %s", p, err) + } + if err := p.E.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.E, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:e: %s", p, err) + } + } + return err } -func NewCreateTopicArgs() *CreateTopicArgs { - return &CreateTopicArgs{} +func (p *ListTopicGroupResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ListTopicGroupResult(%+v)", *p) } -var CreateTopicArgs_Request_DEFAULT *CreateTopicRequest +type UpdateTopicGroupArgs struct { + Request *UpdateTopicGroupRequest `thrift:"request,1" json:"request"` +} -func (p *CreateTopicArgs) GetRequest() *CreateTopicRequest { +func NewUpdateTopicGroupArgs() *UpdateTopicGroupArgs { + return &UpdateTopicGroupArgs{} +} + +var UpdateTopicGroupArgs_Request_DEFAULT *UpdateTopicGroupRequest + +func (p *UpdateTopicGroupArgs) GetRequest() *UpdateTopicGroupRequest { if !p.IsSetRequest() { - return CreateTopicArgs_Request_DEFAULT + return UpdateTopicGroupArgs_Request_DEFAULT } return p.Request } -func (p *CreateTopicArgs) IsSetRequest() bool { +func (p *UpdateTopicGroupArgs) IsSetRequest() bool { return p.Request != nil } -func (p *CreateTopicArgs) Read(iprot thrift.TProtocol) error { +func (p *UpdateTopicGroupArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3047,16 +5152,16 @@ func (p *CreateTopicArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *CreateTopicArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &CreateTopicRequest{} +func (p *UpdateTopicGroupArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &UpdateTopicGroupRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *CreateTopicArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("createTopic_args"); err != nil { +func (p *UpdateTopicGroupArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("updateTopicGroup_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3071,7 +5176,7 @@ func (p *CreateTopicArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *CreateTopicArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *UpdateTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -3084,48 +5189,34 @@ func (p *CreateTopicArgs) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *CreateTopicArgs) String() string { +func (p *UpdateTopicGroupArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("CreateTopicArgs(%+v)", *p) -} - -type CreateTopicResult struct { - Success *CreateTopicResponse `thrift:"success,0" json:"success"` - E *common.GalaxyTalosException `thrift:"e,1" json:"e"` + return fmt.Sprintf("UpdateTopicGroupArgs(%+v)", *p) } -func NewCreateTopicResult() *CreateTopicResult { - return &CreateTopicResult{} +type UpdateTopicGroupResult struct { + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -var CreateTopicResult_Success_DEFAULT *CreateTopicResponse - -func (p *CreateTopicResult) GetSuccess() *CreateTopicResponse { - if !p.IsSetSuccess() { - return CreateTopicResult_Success_DEFAULT - } - return p.Success +func NewUpdateTopicGroupResult() *UpdateTopicGroupResult { + return &UpdateTopicGroupResult{} } -var CreateTopicResult_E_DEFAULT *common.GalaxyTalosException +var UpdateTopicGroupResult_E_DEFAULT *common.GalaxyTalosException -func (p *CreateTopicResult) GetE() *common.GalaxyTalosException { +func (p *UpdateTopicGroupResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return CreateTopicResult_E_DEFAULT + return UpdateTopicGroupResult_E_DEFAULT } return p.E } -func (p *CreateTopicResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *CreateTopicResult) IsSetE() bool { +func (p *UpdateTopicGroupResult) IsSetE() bool { return p.E != nil } -func (p *CreateTopicResult) Read(iprot thrift.TProtocol) error { +func (p *UpdateTopicGroupResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3138,10 +5229,6 @@ func (p *CreateTopicResult) Read(iprot thrift.TProtocol) error { break } switch fieldId { - case 0: - if err := p.ReadField0(iprot); err != nil { - return err - } case 1: if err := p.ReadField1(iprot); err != nil { return err @@ -3161,15 +5248,7 @@ func (p *CreateTopicResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *CreateTopicResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = &CreateTopicResponse{} - if err := p.Success.Read(iprot); err != nil { - return fmt.Errorf("%T error reading struct: %s", p.Success, err) - } - return nil -} - -func (p *CreateTopicResult) ReadField1(iprot thrift.TProtocol) error { +func (p *UpdateTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -3177,13 +5256,10 @@ func (p *CreateTopicResult) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *CreateTopicResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("createTopic_result"); err != nil { +func (p *UpdateTopicGroupResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("updateTopicGroup_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } - if err := p.writeField0(oprot); err != nil { - return err - } if err := p.writeField1(oprot); err != nil { return err } @@ -3196,22 +5272,7 @@ func (p *CreateTopicResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *CreateTopicResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return fmt.Errorf("%T write field begin error 0:success: %s", p, err) - } - if err := p.Success.Write(oprot); err != nil { - return fmt.Errorf("%T error writing struct: %s", p.Success, err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 0:success: %s", p, err) - } - } - return err -} - -func (p *CreateTopicResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *UpdateTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -3226,34 +5287,34 @@ func (p *CreateTopicResult) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *CreateTopicResult) String() string { +func (p *UpdateTopicGroupResult) String() string { if p == nil { return "" } - return fmt.Sprintf("CreateTopicResult(%+v)", *p) + return fmt.Sprintf("UpdateTopicGroupResult(%+v)", *p) } -type CreateReplicationTopicArgs struct { - Request *CreateReplicationTopicRequest `thrift:"request,1" json:"request"` +type DeleteTopicArgs struct { + Request *DeleteTopicRequest `thrift:"request,1" json:"request"` } -func NewCreateReplicationTopicArgs() *CreateReplicationTopicArgs { - return &CreateReplicationTopicArgs{} +func NewDeleteTopicArgs() *DeleteTopicArgs { + return &DeleteTopicArgs{} } -var CreateReplicationTopicArgs_Request_DEFAULT *CreateReplicationTopicRequest +var DeleteTopicArgs_Request_DEFAULT *DeleteTopicRequest -func (p *CreateReplicationTopicArgs) GetRequest() *CreateReplicationTopicRequest { +func (p *DeleteTopicArgs) GetRequest() *DeleteTopicRequest { if !p.IsSetRequest() { - return CreateReplicationTopicArgs_Request_DEFAULT + return DeleteTopicArgs_Request_DEFAULT } return p.Request } -func (p *CreateReplicationTopicArgs) IsSetRequest() bool { +func (p *DeleteTopicArgs) IsSetRequest() bool { return p.Request != nil } -func (p *CreateReplicationTopicArgs) Read(iprot thrift.TProtocol) error { +func (p *DeleteTopicArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3285,16 +5346,16 @@ func (p *CreateReplicationTopicArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *CreateReplicationTopicArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &CreateReplicationTopicRequest{} +func (p *DeleteTopicArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &DeleteTopicRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *CreateReplicationTopicArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("createReplicationTopic_args"); err != nil { +func (p *DeleteTopicArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteTopic_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3309,7 +5370,7 @@ func (p *CreateReplicationTopicArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *CreateReplicationTopicArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *DeleteTopicArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -3322,48 +5383,34 @@ func (p *CreateReplicationTopicArgs) writeField1(oprot thrift.TProtocol) (err er return err } -func (p *CreateReplicationTopicArgs) String() string { +func (p *DeleteTopicArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("CreateReplicationTopicArgs(%+v)", *p) -} - -type CreateReplicationTopicResult struct { - Success *CreateTopicResponse `thrift:"success,0" json:"success"` - E *common.GalaxyTalosException `thrift:"e,1" json:"e"` + return fmt.Sprintf("DeleteTopicArgs(%+v)", *p) } -func NewCreateReplicationTopicResult() *CreateReplicationTopicResult { - return &CreateReplicationTopicResult{} +type DeleteTopicResult struct { + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -var CreateReplicationTopicResult_Success_DEFAULT *CreateTopicResponse - -func (p *CreateReplicationTopicResult) GetSuccess() *CreateTopicResponse { - if !p.IsSetSuccess() { - return CreateReplicationTopicResult_Success_DEFAULT - } - return p.Success +func NewDeleteTopicResult() *DeleteTopicResult { + return &DeleteTopicResult{} } -var CreateReplicationTopicResult_E_DEFAULT *common.GalaxyTalosException +var DeleteTopicResult_E_DEFAULT *common.GalaxyTalosException -func (p *CreateReplicationTopicResult) GetE() *common.GalaxyTalosException { +func (p *DeleteTopicResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return CreateReplicationTopicResult_E_DEFAULT + return DeleteTopicResult_E_DEFAULT } return p.E } -func (p *CreateReplicationTopicResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *CreateReplicationTopicResult) IsSetE() bool { +func (p *DeleteTopicResult) IsSetE() bool { return p.E != nil } -func (p *CreateReplicationTopicResult) Read(iprot thrift.TProtocol) error { +func (p *DeleteTopicResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3376,10 +5423,6 @@ func (p *CreateReplicationTopicResult) Read(iprot thrift.TProtocol) error { break } switch fieldId { - case 0: - if err := p.ReadField0(iprot); err != nil { - return err - } case 1: if err := p.ReadField1(iprot); err != nil { return err @@ -3399,15 +5442,7 @@ func (p *CreateReplicationTopicResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *CreateReplicationTopicResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = &CreateTopicResponse{} - if err := p.Success.Read(iprot); err != nil { - return fmt.Errorf("%T error reading struct: %s", p.Success, err) - } - return nil -} - -func (p *CreateReplicationTopicResult) ReadField1(iprot thrift.TProtocol) error { +func (p *DeleteTopicResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -3415,13 +5450,10 @@ func (p *CreateReplicationTopicResult) ReadField1(iprot thrift.TProtocol) error return nil } -func (p *CreateReplicationTopicResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("createReplicationTopic_result"); err != nil { +func (p *DeleteTopicResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteTopic_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } - if err := p.writeField0(oprot); err != nil { - return err - } if err := p.writeField1(oprot); err != nil { return err } @@ -3434,22 +5466,7 @@ func (p *CreateReplicationTopicResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *CreateReplicationTopicResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return fmt.Errorf("%T write field begin error 0:success: %s", p, err) - } - if err := p.Success.Write(oprot); err != nil { - return fmt.Errorf("%T error writing struct: %s", p.Success, err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 0:success: %s", p, err) - } - } - return err -} - -func (p *CreateReplicationTopicResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *DeleteTopicResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -3464,34 +5481,34 @@ func (p *CreateReplicationTopicResult) writeField1(oprot thrift.TProtocol) (err return err } -func (p *CreateReplicationTopicResult) String() string { +func (p *DeleteTopicResult) String() string { if p == nil { return "" } - return fmt.Sprintf("CreateReplicationTopicResult(%+v)", *p) + return fmt.Sprintf("DeleteTopicResult(%+v)", *p) } -type CreateTopicGroupArgs struct { - Request *CreateTopicGroupRequest `thrift:"request,1" json:"request"` +type LookupTopicsArgs struct { + Request *LookupTopicsRequest `thrift:"request,1" json:"request"` } -func NewCreateTopicGroupArgs() *CreateTopicGroupArgs { - return &CreateTopicGroupArgs{} +func NewLookupTopicsArgs() *LookupTopicsArgs { + return &LookupTopicsArgs{} } -var CreateTopicGroupArgs_Request_DEFAULT *CreateTopicGroupRequest +var LookupTopicsArgs_Request_DEFAULT *LookupTopicsRequest -func (p *CreateTopicGroupArgs) GetRequest() *CreateTopicGroupRequest { +func (p *LookupTopicsArgs) GetRequest() *LookupTopicsRequest { if !p.IsSetRequest() { - return CreateTopicGroupArgs_Request_DEFAULT + return LookupTopicsArgs_Request_DEFAULT } return p.Request } -func (p *CreateTopicGroupArgs) IsSetRequest() bool { +func (p *LookupTopicsArgs) IsSetRequest() bool { return p.Request != nil } -func (p *CreateTopicGroupArgs) Read(iprot thrift.TProtocol) error { +func (p *LookupTopicsArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3523,16 +5540,16 @@ func (p *CreateTopicGroupArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &CreateTopicGroupRequest{} +func (p *LookupTopicsArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &LookupTopicsRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *CreateTopicGroupArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("createTopicGroup_args"); err != nil { +func (p *LookupTopicsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("lookupTopics_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3547,7 +5564,7 @@ func (p *CreateTopicGroupArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *LookupTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -3560,48 +5577,48 @@ func (p *CreateTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *CreateTopicGroupArgs) String() string { +func (p *LookupTopicsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("CreateTopicGroupArgs(%+v)", *p) + return fmt.Sprintf("LookupTopicsArgs(%+v)", *p) } -type CreateTopicGroupResult struct { - Success *CreateTopicGroupResponse `thrift:"success,0" json:"success"` +type LookupTopicsResult struct { + Success *LookupTopicsResponse `thrift:"success,0" json:"success"` E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -func NewCreateTopicGroupResult() *CreateTopicGroupResult { - return &CreateTopicGroupResult{} +func NewLookupTopicsResult() *LookupTopicsResult { + return &LookupTopicsResult{} } -var CreateTopicGroupResult_Success_DEFAULT *CreateTopicGroupResponse +var LookupTopicsResult_Success_DEFAULT *LookupTopicsResponse -func (p *CreateTopicGroupResult) GetSuccess() *CreateTopicGroupResponse { +func (p *LookupTopicsResult) GetSuccess() *LookupTopicsResponse { if !p.IsSetSuccess() { - return CreateTopicGroupResult_Success_DEFAULT + return LookupTopicsResult_Success_DEFAULT } return p.Success } -var CreateTopicGroupResult_E_DEFAULT *common.GalaxyTalosException +var LookupTopicsResult_E_DEFAULT *common.GalaxyTalosException -func (p *CreateTopicGroupResult) GetE() *common.GalaxyTalosException { +func (p *LookupTopicsResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return CreateTopicGroupResult_E_DEFAULT + return LookupTopicsResult_E_DEFAULT } return p.E } -func (p *CreateTopicGroupResult) IsSetSuccess() bool { +func (p *LookupTopicsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *CreateTopicGroupResult) IsSetE() bool { +func (p *LookupTopicsResult) IsSetE() bool { return p.E != nil } -func (p *CreateTopicGroupResult) Read(iprot thrift.TProtocol) error { +func (p *LookupTopicsResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3637,15 +5654,15 @@ func (p *CreateTopicGroupResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = &CreateTopicGroupResponse{} +func (p *LookupTopicsResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &LookupTopicsResponse{} if err := p.Success.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Success, err) } return nil } -func (p *CreateTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { +func (p *LookupTopicsResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -3653,8 +5670,8 @@ func (p *CreateTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("createTopicGroup_result"); err != nil { +func (p *LookupTopicsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("lookupTopics_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField0(oprot); err != nil { @@ -3672,7 +5689,7 @@ func (p *CreateTopicGroupResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *LookupTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) @@ -3687,7 +5704,7 @@ func (p *CreateTopicGroupResult) writeField0(oprot thrift.TProtocol) (err error) return err } -func (p *CreateTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *LookupTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -3702,34 +5719,34 @@ func (p *CreateTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) return err } -func (p *CreateTopicGroupResult) String() string { +func (p *LookupTopicsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("CreateTopicGroupResult(%+v)", *p) + return fmt.Sprintf("LookupTopicsResult(%+v)", *p) } -type DescribeTopicGroupArgs struct { - Request *DescribeTopicGroupRequest `thrift:"request,1" json:"request"` +type MatchTopicsArgs struct { + Request *MatchTopicsRequest `thrift:"request,1" json:"request"` } -func NewDescribeTopicGroupArgs() *DescribeTopicGroupArgs { - return &DescribeTopicGroupArgs{} +func NewMatchTopicsArgs() *MatchTopicsArgs { + return &MatchTopicsArgs{} } -var DescribeTopicGroupArgs_Request_DEFAULT *DescribeTopicGroupRequest +var MatchTopicsArgs_Request_DEFAULT *MatchTopicsRequest -func (p *DescribeTopicGroupArgs) GetRequest() *DescribeTopicGroupRequest { +func (p *MatchTopicsArgs) GetRequest() *MatchTopicsRequest { if !p.IsSetRequest() { - return DescribeTopicGroupArgs_Request_DEFAULT + return MatchTopicsArgs_Request_DEFAULT } return p.Request } -func (p *DescribeTopicGroupArgs) IsSetRequest() bool { +func (p *MatchTopicsArgs) IsSetRequest() bool { return p.Request != nil } -func (p *DescribeTopicGroupArgs) Read(iprot thrift.TProtocol) error { +func (p *MatchTopicsArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3761,16 +5778,16 @@ func (p *DescribeTopicGroupArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicGroupArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &DescribeTopicGroupRequest{} +func (p *MatchTopicsArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &MatchTopicsRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *DescribeTopicGroupArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("describeTopicGroup_args"); err != nil { +func (p *MatchTopicsArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("matchTopics_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3785,7 +5802,7 @@ func (p *DescribeTopicGroupArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *MatchTopicsArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -3798,48 +5815,48 @@ func (p *DescribeTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) return err } -func (p *DescribeTopicGroupArgs) String() string { +func (p *MatchTopicsArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("DescribeTopicGroupArgs(%+v)", *p) + return fmt.Sprintf("MatchTopicsArgs(%+v)", *p) } -type DescribeTopicGroupResult struct { - Success *DescribeTopicGroupResponse `thrift:"success,0" json:"success"` +type MatchTopicsResult struct { + Success *MatchTopicsResponse `thrift:"success,0" json:"success"` E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -func NewDescribeTopicGroupResult() *DescribeTopicGroupResult { - return &DescribeTopicGroupResult{} +func NewMatchTopicsResult() *MatchTopicsResult { + return &MatchTopicsResult{} } -var DescribeTopicGroupResult_Success_DEFAULT *DescribeTopicGroupResponse +var MatchTopicsResult_Success_DEFAULT *MatchTopicsResponse -func (p *DescribeTopicGroupResult) GetSuccess() *DescribeTopicGroupResponse { +func (p *MatchTopicsResult) GetSuccess() *MatchTopicsResponse { if !p.IsSetSuccess() { - return DescribeTopicGroupResult_Success_DEFAULT + return MatchTopicsResult_Success_DEFAULT } return p.Success } -var DescribeTopicGroupResult_E_DEFAULT *common.GalaxyTalosException +var MatchTopicsResult_E_DEFAULT *common.GalaxyTalosException -func (p *DescribeTopicGroupResult) GetE() *common.GalaxyTalosException { +func (p *MatchTopicsResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return DescribeTopicGroupResult_E_DEFAULT + return MatchTopicsResult_E_DEFAULT } return p.E } -func (p *DescribeTopicGroupResult) IsSetSuccess() bool { +func (p *MatchTopicsResult) IsSetSuccess() bool { return p.Success != nil } -func (p *DescribeTopicGroupResult) IsSetE() bool { +func (p *MatchTopicsResult) IsSetE() bool { return p.E != nil } -func (p *DescribeTopicGroupResult) Read(iprot thrift.TProtocol) error { +func (p *MatchTopicsResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3875,15 +5892,15 @@ func (p *DescribeTopicGroupResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicGroupResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = &DescribeTopicGroupResponse{} +func (p *MatchTopicsResult) ReadField0(iprot thrift.TProtocol) error { + p.Success = &MatchTopicsResponse{} if err := p.Success.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Success, err) } return nil } -func (p *DescribeTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { +func (p *MatchTopicsResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -3891,8 +5908,8 @@ func (p *DescribeTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicGroupResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("describeTopicGroup_result"); err != nil { +func (p *MatchTopicsResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("matchTopics_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField0(oprot); err != nil { @@ -3910,7 +5927,7 @@ func (p *DescribeTopicGroupResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicGroupResult) writeField0(oprot thrift.TProtocol) (err error) { +func (p *MatchTopicsResult) writeField0(oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { return fmt.Errorf("%T write field begin error 0:success: %s", p, err) @@ -3925,7 +5942,7 @@ func (p *DescribeTopicGroupResult) writeField0(oprot thrift.TProtocol) (err erro return err } -func (p *DescribeTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *MatchTopicsResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -3940,34 +5957,34 @@ func (p *DescribeTopicGroupResult) writeField1(oprot thrift.TProtocol) (err erro return err } -func (p *DescribeTopicGroupResult) String() string { +func (p *MatchTopicsResult) String() string { if p == nil { return "" } - return fmt.Sprintf("DescribeTopicGroupResult(%+v)", *p) + return fmt.Sprintf("MatchTopicsResult(%+v)", *p) } -type DeleteTopicGroupArgs struct { - Request *DeleteTopicGroupRequest `thrift:"request,1" json:"request"` +type ChangeTopicAttributeArgs struct { + Request *ChangeTopicAttributeRequest `thrift:"request,1" json:"request"` } -func NewDeleteTopicGroupArgs() *DeleteTopicGroupArgs { - return &DeleteTopicGroupArgs{} +func NewChangeTopicAttributeArgs() *ChangeTopicAttributeArgs { + return &ChangeTopicAttributeArgs{} } -var DeleteTopicGroupArgs_Request_DEFAULT *DeleteTopicGroupRequest +var ChangeTopicAttributeArgs_Request_DEFAULT *ChangeTopicAttributeRequest -func (p *DeleteTopicGroupArgs) GetRequest() *DeleteTopicGroupRequest { +func (p *ChangeTopicAttributeArgs) GetRequest() *ChangeTopicAttributeRequest { if !p.IsSetRequest() { - return DeleteTopicGroupArgs_Request_DEFAULT + return ChangeTopicAttributeArgs_Request_DEFAULT } return p.Request } -func (p *DeleteTopicGroupArgs) IsSetRequest() bool { +func (p *ChangeTopicAttributeArgs) IsSetRequest() bool { return p.Request != nil } -func (p *DeleteTopicGroupArgs) Read(iprot thrift.TProtocol) error { +func (p *ChangeTopicAttributeArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3999,16 +6016,16 @@ func (p *DeleteTopicGroupArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicGroupArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &DeleteTopicGroupRequest{} +func (p *ChangeTopicAttributeArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &ChangeTopicAttributeRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *DeleteTopicGroupArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteTopicGroup_args"); err != nil { +func (p *ChangeTopicAttributeArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("changeTopicAttribute_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4023,7 +6040,7 @@ func (p *DeleteTopicGroupArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *ChangeTopicAttributeArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -4036,34 +6053,34 @@ func (p *DeleteTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *DeleteTopicGroupArgs) String() string { +func (p *ChangeTopicAttributeArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("DeleteTopicGroupArgs(%+v)", *p) + return fmt.Sprintf("ChangeTopicAttributeArgs(%+v)", *p) } -type DeleteTopicGroupResult struct { +type ChangeTopicAttributeResult struct { E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -func NewDeleteTopicGroupResult() *DeleteTopicGroupResult { - return &DeleteTopicGroupResult{} +func NewChangeTopicAttributeResult() *ChangeTopicAttributeResult { + return &ChangeTopicAttributeResult{} } -var DeleteTopicGroupResult_E_DEFAULT *common.GalaxyTalosException +var ChangeTopicAttributeResult_E_DEFAULT *common.GalaxyTalosException -func (p *DeleteTopicGroupResult) GetE() *common.GalaxyTalosException { +func (p *ChangeTopicAttributeResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return DeleteTopicGroupResult_E_DEFAULT + return ChangeTopicAttributeResult_E_DEFAULT } return p.E } -func (p *DeleteTopicGroupResult) IsSetE() bool { +func (p *ChangeTopicAttributeResult) IsSetE() bool { return p.E != nil } -func (p *DeleteTopicGroupResult) Read(iprot thrift.TProtocol) error { +func (p *ChangeTopicAttributeResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4095,7 +6112,7 @@ func (p *DeleteTopicGroupResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { +func (p *ChangeTopicAttributeResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -4103,8 +6120,8 @@ func (p *DeleteTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicGroupResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteTopicGroup_result"); err != nil { +func (p *ChangeTopicAttributeResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("changeTopicAttribute_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4119,7 +6136,7 @@ func (p *DeleteTopicGroupResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *ChangeTopicAttributeResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -4134,34 +6151,34 @@ func (p *DeleteTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) return err } -func (p *DeleteTopicGroupResult) String() string { +func (p *ChangeTopicAttributeResult) String() string { if p == nil { return "" } - return fmt.Sprintf("DeleteTopicGroupResult(%+v)", *p) + return fmt.Sprintf("ChangeTopicAttributeResult(%+v)", *p) } -type ListTopicGroupArgs struct { - Request *ListTopicGroupRequest `thrift:"request,1" json:"request"` +type DeleteTopicAttributeArgs struct { + Request *DeleteTopicAttributeRequest `thrift:"request,1" json:"request"` } -func NewListTopicGroupArgs() *ListTopicGroupArgs { - return &ListTopicGroupArgs{} +func NewDeleteTopicAttributeArgs() *DeleteTopicAttributeArgs { + return &DeleteTopicAttributeArgs{} } -var ListTopicGroupArgs_Request_DEFAULT *ListTopicGroupRequest +var DeleteTopicAttributeArgs_Request_DEFAULT *DeleteTopicAttributeRequest -func (p *ListTopicGroupArgs) GetRequest() *ListTopicGroupRequest { +func (p *DeleteTopicAttributeArgs) GetRequest() *DeleteTopicAttributeRequest { if !p.IsSetRequest() { - return ListTopicGroupArgs_Request_DEFAULT + return DeleteTopicAttributeArgs_Request_DEFAULT } return p.Request } -func (p *ListTopicGroupArgs) IsSetRequest() bool { +func (p *DeleteTopicAttributeArgs) IsSetRequest() bool { return p.Request != nil } -func (p *ListTopicGroupArgs) Read(iprot thrift.TProtocol) error { +func (p *DeleteTopicAttributeArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4193,16 +6210,16 @@ func (p *ListTopicGroupArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &ListTopicGroupRequest{} +func (p *DeleteTopicAttributeArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &DeleteTopicAttributeRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *ListTopicGroupArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("listTopicGroup_args"); err != nil { +func (p *DeleteTopicAttributeArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteTopicAttribute_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4217,7 +6234,7 @@ func (p *ListTopicGroupArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *DeleteTopicAttributeArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -4230,48 +6247,34 @@ func (p *ListTopicGroupArgs) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *ListTopicGroupArgs) String() string { +func (p *DeleteTopicAttributeArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("ListTopicGroupArgs(%+v)", *p) + return fmt.Sprintf("DeleteTopicAttributeArgs(%+v)", *p) } -type ListTopicGroupResult struct { - Success *ListTopicGroupResponse `thrift:"success,0" json:"success"` - E *common.GalaxyTalosException `thrift:"e,1" json:"e"` -} - -func NewListTopicGroupResult() *ListTopicGroupResult { - return &ListTopicGroupResult{} +type DeleteTopicAttributeResult struct { + E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -var ListTopicGroupResult_Success_DEFAULT *ListTopicGroupResponse - -func (p *ListTopicGroupResult) GetSuccess() *ListTopicGroupResponse { - if !p.IsSetSuccess() { - return ListTopicGroupResult_Success_DEFAULT - } - return p.Success +func NewDeleteTopicAttributeResult() *DeleteTopicAttributeResult { + return &DeleteTopicAttributeResult{} } -var ListTopicGroupResult_E_DEFAULT *common.GalaxyTalosException +var DeleteTopicAttributeResult_E_DEFAULT *common.GalaxyTalosException -func (p *ListTopicGroupResult) GetE() *common.GalaxyTalosException { +func (p *DeleteTopicAttributeResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return ListTopicGroupResult_E_DEFAULT + return DeleteTopicAttributeResult_E_DEFAULT } return p.E } -func (p *ListTopicGroupResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ListTopicGroupResult) IsSetE() bool { +func (p *DeleteTopicAttributeResult) IsSetE() bool { return p.E != nil } -func (p *ListTopicGroupResult) Read(iprot thrift.TProtocol) error { +func (p *DeleteTopicAttributeResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4284,10 +6287,6 @@ func (p *ListTopicGroupResult) Read(iprot thrift.TProtocol) error { break } switch fieldId { - case 0: - if err := p.ReadField0(iprot); err != nil { - return err - } case 1: if err := p.ReadField1(iprot); err != nil { return err @@ -4307,15 +6306,7 @@ func (p *ListTopicGroupResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupResult) ReadField0(iprot thrift.TProtocol) error { - p.Success = &ListTopicGroupResponse{} - if err := p.Success.Read(iprot); err != nil { - return fmt.Errorf("%T error reading struct: %s", p.Success, err) - } - return nil -} - -func (p *ListTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { +func (p *DeleteTopicAttributeResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -4323,13 +6314,10 @@ func (p *ListTopicGroupResult) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("listTopicGroup_result"); err != nil { +func (p *DeleteTopicAttributeResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("deleteTopicAttribute_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } - if err := p.writeField0(oprot); err != nil { - return err - } if err := p.writeField1(oprot); err != nil { return err } @@ -4342,22 +6330,7 @@ func (p *ListTopicGroupResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return fmt.Errorf("%T write field begin error 0:success: %s", p, err) - } - if err := p.Success.Write(oprot); err != nil { - return fmt.Errorf("%T error writing struct: %s", p.Success, err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 0:success: %s", p, err) - } - } - return err -} - -func (p *ListTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *DeleteTopicAttributeResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -4372,34 +6345,34 @@ func (p *ListTopicGroupResult) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *ListTopicGroupResult) String() string { +func (p *DeleteTopicAttributeResult) String() string { if p == nil { return "" } - return fmt.Sprintf("ListTopicGroupResult(%+v)", *p) + return fmt.Sprintf("DeleteTopicAttributeResult(%+v)", *p) } -type DeleteTopicArgs struct { - Request *DeleteTopicRequest `thrift:"request,1" json:"request"` +type ChangeTopicOwnerInfoArgs struct { + Request *ChangeTopicOwnerInfoRequest `thrift:"request,1" json:"request"` } -func NewDeleteTopicArgs() *DeleteTopicArgs { - return &DeleteTopicArgs{} +func NewChangeTopicOwnerInfoArgs() *ChangeTopicOwnerInfoArgs { + return &ChangeTopicOwnerInfoArgs{} } -var DeleteTopicArgs_Request_DEFAULT *DeleteTopicRequest +var ChangeTopicOwnerInfoArgs_Request_DEFAULT *ChangeTopicOwnerInfoRequest -func (p *DeleteTopicArgs) GetRequest() *DeleteTopicRequest { +func (p *ChangeTopicOwnerInfoArgs) GetRequest() *ChangeTopicOwnerInfoRequest { if !p.IsSetRequest() { - return DeleteTopicArgs_Request_DEFAULT + return ChangeTopicOwnerInfoArgs_Request_DEFAULT } return p.Request } -func (p *DeleteTopicArgs) IsSetRequest() bool { +func (p *ChangeTopicOwnerInfoArgs) IsSetRequest() bool { return p.Request != nil } -func (p *DeleteTopicArgs) Read(iprot thrift.TProtocol) error { +func (p *ChangeTopicOwnerInfoArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4431,16 +6404,16 @@ func (p *DeleteTopicArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &DeleteTopicRequest{} +func (p *ChangeTopicOwnerInfoArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &ChangeTopicOwnerInfoRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *DeleteTopicArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteTopic_args"); err != nil { +func (p *ChangeTopicOwnerInfoArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("changeTopicOwnerInfo_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4455,7 +6428,7 @@ func (p *DeleteTopicArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *ChangeTopicOwnerInfoArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -4468,34 +6441,34 @@ func (p *DeleteTopicArgs) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *DeleteTopicArgs) String() string { +func (p *ChangeTopicOwnerInfoArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("DeleteTopicArgs(%+v)", *p) + return fmt.Sprintf("ChangeTopicOwnerInfoArgs(%+v)", *p) } -type DeleteTopicResult struct { +type ChangeTopicOwnerInfoResult struct { E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -func NewDeleteTopicResult() *DeleteTopicResult { - return &DeleteTopicResult{} +func NewChangeTopicOwnerInfoResult() *ChangeTopicOwnerInfoResult { + return &ChangeTopicOwnerInfoResult{} } -var DeleteTopicResult_E_DEFAULT *common.GalaxyTalosException +var ChangeTopicOwnerInfoResult_E_DEFAULT *common.GalaxyTalosException -func (p *DeleteTopicResult) GetE() *common.GalaxyTalosException { +func (p *ChangeTopicOwnerInfoResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return DeleteTopicResult_E_DEFAULT + return ChangeTopicOwnerInfoResult_E_DEFAULT } return p.E } -func (p *DeleteTopicResult) IsSetE() bool { +func (p *ChangeTopicOwnerInfoResult) IsSetE() bool { return p.E != nil } -func (p *DeleteTopicResult) Read(iprot thrift.TProtocol) error { +func (p *ChangeTopicOwnerInfoResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4527,7 +6500,7 @@ func (p *DeleteTopicResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicResult) ReadField1(iprot thrift.TProtocol) error { +func (p *ChangeTopicOwnerInfoResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -4535,8 +6508,8 @@ func (p *DeleteTopicResult) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteTopic_result"); err != nil { +func (p *ChangeTopicOwnerInfoResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("changeTopicOwnerInfo_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4551,7 +6524,7 @@ func (p *DeleteTopicResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *ChangeTopicOwnerInfoResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -4566,34 +6539,34 @@ func (p *DeleteTopicResult) writeField1(oprot thrift.TProtocol) (err error) { return err } -func (p *DeleteTopicResult) String() string { +func (p *ChangeTopicOwnerInfoResult) String() string { if p == nil { return "" } - return fmt.Sprintf("DeleteTopicResult(%+v)", *p) + return fmt.Sprintf("ChangeTopicOwnerInfoResult(%+v)", *p) } -type ChangeTopicAttributeArgs struct { - Request *ChangeTopicAttributeRequest `thrift:"request,1" json:"request"` +type ChangeReplicationTopicSourceInfoArgs struct { + Request *ChangeReplicationTopicSourceInfoRequest `thrift:"request,1" json:"request"` } -func NewChangeTopicAttributeArgs() *ChangeTopicAttributeArgs { - return &ChangeTopicAttributeArgs{} +func NewChangeReplicationTopicSourceInfoArgs() *ChangeReplicationTopicSourceInfoArgs { + return &ChangeReplicationTopicSourceInfoArgs{} } -var ChangeTopicAttributeArgs_Request_DEFAULT *ChangeTopicAttributeRequest +var ChangeReplicationTopicSourceInfoArgs_Request_DEFAULT *ChangeReplicationTopicSourceInfoRequest -func (p *ChangeTopicAttributeArgs) GetRequest() *ChangeTopicAttributeRequest { +func (p *ChangeReplicationTopicSourceInfoArgs) GetRequest() *ChangeReplicationTopicSourceInfoRequest { if !p.IsSetRequest() { - return ChangeTopicAttributeArgs_Request_DEFAULT + return ChangeReplicationTopicSourceInfoArgs_Request_DEFAULT } return p.Request } -func (p *ChangeTopicAttributeArgs) IsSetRequest() bool { +func (p *ChangeReplicationTopicSourceInfoArgs) IsSetRequest() bool { return p.Request != nil } -func (p *ChangeTopicAttributeArgs) Read(iprot thrift.TProtocol) error { +func (p *ChangeReplicationTopicSourceInfoArgs) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4625,16 +6598,16 @@ func (p *ChangeTopicAttributeArgs) Read(iprot thrift.TProtocol) error { return nil } -func (p *ChangeTopicAttributeArgs) ReadField1(iprot thrift.TProtocol) error { - p.Request = &ChangeTopicAttributeRequest{} +func (p *ChangeReplicationTopicSourceInfoArgs) ReadField1(iprot thrift.TProtocol) error { + p.Request = &ChangeReplicationTopicSourceInfoRequest{} if err := p.Request.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.Request, err) } return nil } -func (p *ChangeTopicAttributeArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("changeTopicAttribute_args"); err != nil { +func (p *ChangeReplicationTopicSourceInfoArgs) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("changeReplicationTopicSourceInfo_args"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4649,7 +6622,7 @@ func (p *ChangeTopicAttributeArgs) Write(oprot thrift.TProtocol) error { return nil } -func (p *ChangeTopicAttributeArgs) writeField1(oprot thrift.TProtocol) (err error) { +func (p *ChangeReplicationTopicSourceInfoArgs) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:request: %s", p, err) } @@ -4662,34 +6635,34 @@ func (p *ChangeTopicAttributeArgs) writeField1(oprot thrift.TProtocol) (err erro return err } -func (p *ChangeTopicAttributeArgs) String() string { +func (p *ChangeReplicationTopicSourceInfoArgs) String() string { if p == nil { return "" } - return fmt.Sprintf("ChangeTopicAttributeArgs(%+v)", *p) + return fmt.Sprintf("ChangeReplicationTopicSourceInfoArgs(%+v)", *p) } -type ChangeTopicAttributeResult struct { +type ChangeReplicationTopicSourceInfoResult struct { E *common.GalaxyTalosException `thrift:"e,1" json:"e"` } -func NewChangeTopicAttributeResult() *ChangeTopicAttributeResult { - return &ChangeTopicAttributeResult{} +func NewChangeReplicationTopicSourceInfoResult() *ChangeReplicationTopicSourceInfoResult { + return &ChangeReplicationTopicSourceInfoResult{} } -var ChangeTopicAttributeResult_E_DEFAULT *common.GalaxyTalosException +var ChangeReplicationTopicSourceInfoResult_E_DEFAULT *common.GalaxyTalosException -func (p *ChangeTopicAttributeResult) GetE() *common.GalaxyTalosException { +func (p *ChangeReplicationTopicSourceInfoResult) GetE() *common.GalaxyTalosException { if !p.IsSetE() { - return ChangeTopicAttributeResult_E_DEFAULT + return ChangeReplicationTopicSourceInfoResult_E_DEFAULT } return p.E } -func (p *ChangeTopicAttributeResult) IsSetE() bool { +func (p *ChangeReplicationTopicSourceInfoResult) IsSetE() bool { return p.E != nil } -func (p *ChangeTopicAttributeResult) Read(iprot thrift.TProtocol) error { +func (p *ChangeReplicationTopicSourceInfoResult) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4721,7 +6694,7 @@ func (p *ChangeTopicAttributeResult) Read(iprot thrift.TProtocol) error { return nil } -func (p *ChangeTopicAttributeResult) ReadField1(iprot thrift.TProtocol) error { +func (p *ChangeReplicationTopicSourceInfoResult) ReadField1(iprot thrift.TProtocol) error { p.E = &common.GalaxyTalosException{} if err := p.E.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.E, err) @@ -4729,8 +6702,8 @@ func (p *ChangeTopicAttributeResult) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *ChangeTopicAttributeResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("changeTopicAttribute_result"); err != nil { +func (p *ChangeReplicationTopicSourceInfoResult) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("changeReplicationTopicSourceInfo_result"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4745,7 +6718,7 @@ func (p *ChangeTopicAttributeResult) Write(oprot thrift.TProtocol) error { return nil } -func (p *ChangeTopicAttributeResult) writeField1(oprot thrift.TProtocol) (err error) { +func (p *ChangeReplicationTopicSourceInfoResult) writeField1(oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:e: %s", p, err) @@ -4760,11 +6733,11 @@ func (p *ChangeTopicAttributeResult) writeField1(oprot thrift.TProtocol) (err er return err } -func (p *ChangeTopicAttributeResult) String() string { +func (p *ChangeReplicationTopicSourceInfoResult) String() string { if p == nil { return "" } - return fmt.Sprintf("ChangeTopicAttributeResult(%+v)", *p) + return fmt.Sprintf("ChangeReplicationTopicSourceInfoResult(%+v)", *p) } type DescribeTopicArgs struct { diff --git a/thrift/topic/ttypes.go b/thrift/topic/ttypes.go index 6a2c353..0657595 100644 --- a/thrift/topic/ttypes.go +++ b/thrift/topic/ttypes.go @@ -3238,18 +3238,718 @@ func (p *ChangeTopicAttributeRequest) String() string { return fmt.Sprintf("ChangeTopicAttributeRequest(%+v)", *p) } +type DeleteTopicAttributeRequest struct { + TopicTalosResourceName *TopicTalosResourceName `thrift:"topicTalosResourceName,1,required" json:"topicTalosResourceName"` + TopicAttributeKey string `thrift:"topicAttributeKey,2,required" json:"topicAttributeKey"` +} + +func NewDeleteTopicAttributeRequest() *DeleteTopicAttributeRequest { + return &DeleteTopicAttributeRequest{} +} + +var DeleteTopicAttributeRequest_TopicTalosResourceName_DEFAULT *TopicTalosResourceName + +func (p *DeleteTopicAttributeRequest) GetTopicTalosResourceName() *TopicTalosResourceName { + if !p.IsSetTopicTalosResourceName() { + return DeleteTopicAttributeRequest_TopicTalosResourceName_DEFAULT + } + return p.TopicTalosResourceName +} + +func (p *DeleteTopicAttributeRequest) GetTopicAttributeKey() string { + return p.TopicAttributeKey +} +func (p *DeleteTopicAttributeRequest) IsSetTopicTalosResourceName() bool { + return p.TopicTalosResourceName != nil +} + +func (p *DeleteTopicAttributeRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *DeleteTopicAttributeRequest) ReadField1(iprot thrift.TProtocol) error { + p.TopicTalosResourceName = &TopicTalosResourceName{} + if err := p.TopicTalosResourceName.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicTalosResourceName, err) + } + return nil +} + +func (p *DeleteTopicAttributeRequest) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 2: %s", err) + } else { + p.TopicAttributeKey = v + } + return nil +} + +func (p *DeleteTopicAttributeRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DeleteTopicAttributeRequest"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := p.writeField2(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *DeleteTopicAttributeRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicTalosResourceName", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicTalosResourceName: %s", p, err) + } + if err := p.TopicTalosResourceName.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicTalosResourceName, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicTalosResourceName: %s", p, err) + } + return err +} + +func (p *DeleteTopicAttributeRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicAttributeKey", thrift.STRING, 2); err != nil { + return fmt.Errorf("%T write field begin error 2:topicAttributeKey: %s", p, err) + } + if err := oprot.WriteString(string(p.TopicAttributeKey)); err != nil { + return fmt.Errorf("%T.topicAttributeKey (2) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 2:topicAttributeKey: %s", p, err) + } + return err +} + +func (p *DeleteTopicAttributeRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("DeleteTopicAttributeRequest(%+v)", *p) +} + +type ChangeTopicOwnerInfoRequest struct { + TopicTalosResourceName *TopicTalosResourceName `thrift:"topicTalosResourceName,1,required" json:"topicTalosResourceName"` + OwnerInfo *TopicOwnerInfo `thrift:"ownerInfo,2,required" json:"ownerInfo"` +} + +func NewChangeTopicOwnerInfoRequest() *ChangeTopicOwnerInfoRequest { + return &ChangeTopicOwnerInfoRequest{} +} + +var ChangeTopicOwnerInfoRequest_TopicTalosResourceName_DEFAULT *TopicTalosResourceName + +func (p *ChangeTopicOwnerInfoRequest) GetTopicTalosResourceName() *TopicTalosResourceName { + if !p.IsSetTopicTalosResourceName() { + return ChangeTopicOwnerInfoRequest_TopicTalosResourceName_DEFAULT + } + return p.TopicTalosResourceName +} + +var ChangeTopicOwnerInfoRequest_OwnerInfo_DEFAULT *TopicOwnerInfo + +func (p *ChangeTopicOwnerInfoRequest) GetOwnerInfo() *TopicOwnerInfo { + if !p.IsSetOwnerInfo() { + return ChangeTopicOwnerInfoRequest_OwnerInfo_DEFAULT + } + return p.OwnerInfo +} +func (p *ChangeTopicOwnerInfoRequest) IsSetTopicTalosResourceName() bool { + return p.TopicTalosResourceName != nil +} + +func (p *ChangeTopicOwnerInfoRequest) IsSetOwnerInfo() bool { + return p.OwnerInfo != nil +} + +func (p *ChangeTopicOwnerInfoRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *ChangeTopicOwnerInfoRequest) ReadField1(iprot thrift.TProtocol) error { + p.TopicTalosResourceName = &TopicTalosResourceName{} + if err := p.TopicTalosResourceName.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicTalosResourceName, err) + } + return nil +} + +func (p *ChangeTopicOwnerInfoRequest) ReadField2(iprot thrift.TProtocol) error { + p.OwnerInfo = &TopicOwnerInfo{} + if err := p.OwnerInfo.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.OwnerInfo, err) + } + return nil +} + +func (p *ChangeTopicOwnerInfoRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ChangeTopicOwnerInfoRequest"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := p.writeField2(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *ChangeTopicOwnerInfoRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicTalosResourceName", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicTalosResourceName: %s", p, err) + } + if err := p.TopicTalosResourceName.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicTalosResourceName, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicTalosResourceName: %s", p, err) + } + return err +} + +func (p *ChangeTopicOwnerInfoRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("ownerInfo", thrift.STRUCT, 2); err != nil { + return fmt.Errorf("%T write field begin error 2:ownerInfo: %s", p, err) + } + if err := p.OwnerInfo.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.OwnerInfo, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 2:ownerInfo: %s", p, err) + } + return err +} + +func (p *ChangeTopicOwnerInfoRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ChangeTopicOwnerInfoRequest(%+v)", *p) +} + +type ChangeReplicationTopicSourceInfoRequest struct { + TopicTalosResourceName *TopicTalosResourceName `thrift:"topicTalosResourceName,1,required" json:"topicTalosResourceName"` + SourceTopicInfoList []*SourceTopicInfo `thrift:"sourceTopicInfoList,2,required" json:"sourceTopicInfoList"` +} + +func NewChangeReplicationTopicSourceInfoRequest() *ChangeReplicationTopicSourceInfoRequest { + return &ChangeReplicationTopicSourceInfoRequest{} +} + +var ChangeReplicationTopicSourceInfoRequest_TopicTalosResourceName_DEFAULT *TopicTalosResourceName + +func (p *ChangeReplicationTopicSourceInfoRequest) GetTopicTalosResourceName() *TopicTalosResourceName { + if !p.IsSetTopicTalosResourceName() { + return ChangeReplicationTopicSourceInfoRequest_TopicTalosResourceName_DEFAULT + } + return p.TopicTalosResourceName +} + +func (p *ChangeReplicationTopicSourceInfoRequest) GetSourceTopicInfoList() []*SourceTopicInfo { + return p.SourceTopicInfoList +} +func (p *ChangeReplicationTopicSourceInfoRequest) IsSetTopicTalosResourceName() bool { + return p.TopicTalosResourceName != nil +} + +func (p *ChangeReplicationTopicSourceInfoRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *ChangeReplicationTopicSourceInfoRequest) ReadField1(iprot thrift.TProtocol) error { + p.TopicTalosResourceName = &TopicTalosResourceName{} + if err := p.TopicTalosResourceName.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicTalosResourceName, err) + } + return nil +} + +func (p *ChangeReplicationTopicSourceInfoRequest) ReadField2(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() + if err != nil { + return fmt.Errorf("error reading list begin: %s", err) + } + tSlice := make([]*SourceTopicInfo, 0, size) + p.SourceTopicInfoList = tSlice + for i := 0; i < size; i++ { + _elem10 := &SourceTopicInfo{} + if err := _elem10.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", _elem10, err) + } + p.SourceTopicInfoList = append(p.SourceTopicInfoList, _elem10) + } + if err := iprot.ReadListEnd(); err != nil { + return fmt.Errorf("error reading list end: %s", err) + } + return nil +} + +func (p *ChangeReplicationTopicSourceInfoRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ChangeReplicationTopicSourceInfoRequest"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := p.writeField2(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *ChangeReplicationTopicSourceInfoRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicTalosResourceName", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicTalosResourceName: %s", p, err) + } + if err := p.TopicTalosResourceName.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicTalosResourceName, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicTalosResourceName: %s", p, err) + } + return err +} + +func (p *ChangeReplicationTopicSourceInfoRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("sourceTopicInfoList", thrift.LIST, 2); err != nil { + return fmt.Errorf("%T write field begin error 2:sourceTopicInfoList: %s", p, err) + } + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.SourceTopicInfoList)); err != nil { + return fmt.Errorf("error writing list begin: %s", err) + } + for _, v := range p.SourceTopicInfoList { + if err := v.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", v, err) + } + } + if err := oprot.WriteListEnd(); err != nil { + return fmt.Errorf("error writing list end: %s", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 2:sourceTopicInfoList: %s", p, err) + } + return err +} + +func (p *ChangeReplicationTopicSourceInfoRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ChangeReplicationTopicSourceInfoRequest(%+v)", *p) +} + type DescribeTopicRequest struct { TopicName string `thrift:"topicName,1,required" json:"topicName"` } -func NewDescribeTopicRequest() *DescribeTopicRequest { - return &DescribeTopicRequest{} +func NewDescribeTopicRequest() *DescribeTopicRequest { + return &DescribeTopicRequest{} +} + +func (p *DescribeTopicRequest) GetTopicName() string { + return p.TopicName +} +func (p *DescribeTopicRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *DescribeTopicRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 1: %s", err) + } else { + p.TopicName = v + } + return nil +} + +func (p *DescribeTopicRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DescribeTopicRequest"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *DescribeTopicRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicName", thrift.STRING, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicName: %s", p, err) + } + if err := oprot.WriteString(string(p.TopicName)); err != nil { + return fmt.Errorf("%T.topicName (1) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicName: %s", p, err) + } + return err +} + +func (p *DescribeTopicRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("DescribeTopicRequest(%+v)", *p) +} + +type GetDescribeInfoRequest struct { + TopicName string `thrift:"topicName,1,required" json:"topicName"` +} + +func NewGetDescribeInfoRequest() *GetDescribeInfoRequest { + return &GetDescribeInfoRequest{} +} + +func (p *GetDescribeInfoRequest) GetTopicName() string { + return p.TopicName +} +func (p *GetDescribeInfoRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *GetDescribeInfoRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 1: %s", err) + } else { + p.TopicName = v + } + return nil +} + +func (p *GetDescribeInfoRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetDescribeInfoRequest"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *GetDescribeInfoRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicName", thrift.STRING, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicName: %s", p, err) + } + if err := oprot.WriteString(string(p.TopicName)); err != nil { + return fmt.Errorf("%T.topicName (1) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicName: %s", p, err) + } + return err +} + +func (p *GetDescribeInfoRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("GetDescribeInfoRequest(%+v)", *p) +} + +type GetTopicAttributeRequest struct { + TopicName string `thrift:"topicName,1,required" json:"topicName"` +} + +func NewGetTopicAttributeRequest() *GetTopicAttributeRequest { + return &GetTopicAttributeRequest{} +} + +func (p *GetTopicAttributeRequest) GetTopicName() string { + return p.TopicName +} +func (p *GetTopicAttributeRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *GetTopicAttributeRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 1: %s", err) + } else { + p.TopicName = v + } + return nil } -func (p *DescribeTopicRequest) GetTopicName() string { - return p.TopicName +func (p *GetTopicAttributeRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("GetTopicAttributeRequest"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil } -func (p *DescribeTopicRequest) Read(iprot thrift.TProtocol) error { + +func (p *GetTopicAttributeRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicName", thrift.STRING, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicName: %s", p, err) + } + if err := oprot.WriteString(string(p.TopicName)); err != nil { + return fmt.Errorf("%T.topicName (1) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicName: %s", p, err) + } + return err +} + +func (p *GetTopicAttributeRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("GetTopicAttributeRequest(%+v)", *p) +} + +type AddSubResourceNameRequest struct { + TopicTalosResourceName *TopicTalosResourceName `thrift:"topicTalosResourceName,1,required" json:"topicTalosResourceName"` + OrgId string `thrift:"orgId,2,required" json:"orgId"` + AdminTeamId string `thrift:"adminTeamId,3,required" json:"adminTeamId"` +} + +func NewAddSubResourceNameRequest() *AddSubResourceNameRequest { + return &AddSubResourceNameRequest{} +} + +var AddSubResourceNameRequest_TopicTalosResourceName_DEFAULT *TopicTalosResourceName + +func (p *AddSubResourceNameRequest) GetTopicTalosResourceName() *TopicTalosResourceName { + if !p.IsSetTopicTalosResourceName() { + return AddSubResourceNameRequest_TopicTalosResourceName_DEFAULT + } + return p.TopicTalosResourceName +} + +func (p *AddSubResourceNameRequest) GetOrgId() string { + return p.OrgId +} + +func (p *AddSubResourceNameRequest) GetAdminTeamId() string { + return p.AdminTeamId +} +func (p *AddSubResourceNameRequest) IsSetTopicTalosResourceName() bool { + return p.TopicTalosResourceName != nil +} + +func (p *AddSubResourceNameRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3266,6 +3966,14 @@ func (p *DescribeTopicRequest) Read(iprot thrift.TProtocol) error { if err := p.ReadField1(iprot); err != nil { return err } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } + case 3: + if err := p.ReadField3(iprot); err != nil { + return err + } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -3281,17 +3989,162 @@ func (p *DescribeTopicRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicRequest) ReadField1(iprot thrift.TProtocol) error { +func (p *AddSubResourceNameRequest) ReadField1(iprot thrift.TProtocol) error { + p.TopicTalosResourceName = &TopicTalosResourceName{} + if err := p.TopicTalosResourceName.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicTalosResourceName, err) + } + return nil +} + +func (p *AddSubResourceNameRequest) ReadField2(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { - return fmt.Errorf("error reading field 1: %s", err) + return fmt.Errorf("error reading field 2: %s", err) } else { - p.TopicName = v + p.OrgId = v } return nil } -func (p *DescribeTopicRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("DescribeTopicRequest"); err != nil { +func (p *AddSubResourceNameRequest) ReadField3(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 3: %s", err) + } else { + p.AdminTeamId = v + } + return nil +} + +func (p *AddSubResourceNameRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("AddSubResourceNameRequest"); err != nil { + return fmt.Errorf("%T write struct begin error: %s", p, err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := p.writeField2(oprot); err != nil { + return err + } + if err := p.writeField3(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return fmt.Errorf("write field stop error: %s", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return fmt.Errorf("write struct stop error: %s", err) + } + return nil +} + +func (p *AddSubResourceNameRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicTalosResourceName", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicTalosResourceName: %s", p, err) + } + if err := p.TopicTalosResourceName.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicTalosResourceName, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicTalosResourceName: %s", p, err) + } + return err +} + +func (p *AddSubResourceNameRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("orgId", thrift.STRING, 2); err != nil { + return fmt.Errorf("%T write field begin error 2:orgId: %s", p, err) + } + if err := oprot.WriteString(string(p.OrgId)); err != nil { + return fmt.Errorf("%T.orgId (2) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 2:orgId: %s", p, err) + } + return err +} + +func (p *AddSubResourceNameRequest) writeField3(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("adminTeamId", thrift.STRING, 3); err != nil { + return fmt.Errorf("%T write field begin error 3:adminTeamId: %s", p, err) + } + if err := oprot.WriteString(string(p.AdminTeamId)); err != nil { + return fmt.Errorf("%T.adminTeamId (3) field write error: %s", p, err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 3:adminTeamId: %s", p, err) + } + return err +} + +func (p *AddSubResourceNameRequest) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("AddSubResourceNameRequest(%+v)", *p) +} + +type CreateTopicGroupRequest struct { + TopicGroup *TopicGroup `thrift:"topicGroup,1,required" json:"topicGroup"` +} + +func NewCreateTopicGroupRequest() *CreateTopicGroupRequest { + return &CreateTopicGroupRequest{} +} + +var CreateTopicGroupRequest_TopicGroup_DEFAULT *TopicGroup + +func (p *CreateTopicGroupRequest) GetTopicGroup() *TopicGroup { + if !p.IsSetTopicGroup() { + return CreateTopicGroupRequest_TopicGroup_DEFAULT + } + return p.TopicGroup +} +func (p *CreateTopicGroupRequest) IsSetTopicGroup() bool { + return p.TopicGroup != nil +} + +func (p *CreateTopicGroupRequest) Read(iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return fmt.Errorf("%T read error: %s", p, err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) + } + if fieldTypeId == thrift.STOP { + break + } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return fmt.Errorf("%T read struct end error: %s", p, err) + } + return nil +} + +func (p *CreateTopicGroupRequest) ReadField1(iprot thrift.TProtocol) error { + p.TopicGroup = &TopicGroup{} + if err := p.TopicGroup.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicGroup, err) + } + return nil +} + +func (p *CreateTopicGroupRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("CreateTopicGroupRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3306,38 +4159,47 @@ func (p *DescribeTopicRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicName", thrift.STRING, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topicName: %s", p, err) +func (p *CreateTopicGroupRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroup", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicGroup: %s", p, err) } - if err := oprot.WriteString(string(p.TopicName)); err != nil { - return fmt.Errorf("%T.topicName (1) field write error: %s", p, err) + if err := p.TopicGroup.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicGroup, err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topicName: %s", p, err) + return fmt.Errorf("%T write field end error 1:topicGroup: %s", p, err) } return err } -func (p *DescribeTopicRequest) String() string { +func (p *CreateTopicGroupRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("DescribeTopicRequest(%+v)", *p) + return fmt.Sprintf("CreateTopicGroupRequest(%+v)", *p) } -type GetDescribeInfoRequest struct { - TopicName string `thrift:"topicName,1,required" json:"topicName"` +type CreateTopicGroupResponse struct { + TopicGroup *TopicGroup `thrift:"topicGroup,1,required" json:"topicGroup"` } -func NewGetDescribeInfoRequest() *GetDescribeInfoRequest { - return &GetDescribeInfoRequest{} +func NewCreateTopicGroupResponse() *CreateTopicGroupResponse { + return &CreateTopicGroupResponse{} } -func (p *GetDescribeInfoRequest) GetTopicName() string { - return p.TopicName +var CreateTopicGroupResponse_TopicGroup_DEFAULT *TopicGroup + +func (p *CreateTopicGroupResponse) GetTopicGroup() *TopicGroup { + if !p.IsSetTopicGroup() { + return CreateTopicGroupResponse_TopicGroup_DEFAULT + } + return p.TopicGroup } -func (p *GetDescribeInfoRequest) Read(iprot thrift.TProtocol) error { +func (p *CreateTopicGroupResponse) IsSetTopicGroup() bool { + return p.TopicGroup != nil +} + +func (p *CreateTopicGroupResponse) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3369,17 +4231,16 @@ func (p *GetDescribeInfoRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *GetDescribeInfoRequest) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return fmt.Errorf("error reading field 1: %s", err) - } else { - p.TopicName = v +func (p *CreateTopicGroupResponse) ReadField1(iprot thrift.TProtocol) error { + p.TopicGroup = &TopicGroup{} + if err := p.TopicGroup.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicGroup, err) } return nil } -func (p *GetDescribeInfoRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("GetDescribeInfoRequest"); err != nil { +func (p *CreateTopicGroupResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("CreateTopicGroupResponse"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3394,38 +4255,38 @@ func (p *GetDescribeInfoRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *GetDescribeInfoRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicName", thrift.STRING, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topicName: %s", p, err) +func (p *CreateTopicGroupResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroup", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicGroup: %s", p, err) } - if err := oprot.WriteString(string(p.TopicName)); err != nil { - return fmt.Errorf("%T.topicName (1) field write error: %s", p, err) + if err := p.TopicGroup.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicGroup, err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topicName: %s", p, err) + return fmt.Errorf("%T write field end error 1:topicGroup: %s", p, err) } return err } -func (p *GetDescribeInfoRequest) String() string { +func (p *CreateTopicGroupResponse) String() string { if p == nil { return "" } - return fmt.Sprintf("GetDescribeInfoRequest(%+v)", *p) + return fmt.Sprintf("CreateTopicGroupResponse(%+v)", *p) } -type GetTopicAttributeRequest struct { - TopicName string `thrift:"topicName,1,required" json:"topicName"` +type DescribeTopicGroupRequest struct { + TopicGroupName string `thrift:"topicGroupName,1,required" json:"topicGroupName"` } -func NewGetTopicAttributeRequest() *GetTopicAttributeRequest { - return &GetTopicAttributeRequest{} +func NewDescribeTopicGroupRequest() *DescribeTopicGroupRequest { + return &DescribeTopicGroupRequest{} } -func (p *GetTopicAttributeRequest) GetTopicName() string { - return p.TopicName +func (p *DescribeTopicGroupRequest) GetTopicGroupName() string { + return p.TopicGroupName } -func (p *GetTopicAttributeRequest) Read(iprot thrift.TProtocol) error { +func (p *DescribeTopicGroupRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3457,17 +4318,17 @@ func (p *GetTopicAttributeRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *GetTopicAttributeRequest) ReadField1(iprot thrift.TProtocol) error { +func (p *DescribeTopicGroupRequest) ReadField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { - p.TopicName = v + p.TopicGroupName = v } return nil } -func (p *GetTopicAttributeRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("GetTopicAttributeRequest"); err != nil { +func (p *DescribeTopicGroupRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DescribeTopicGroupRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3482,57 +4343,47 @@ func (p *GetTopicAttributeRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *GetTopicAttributeRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicName", thrift.STRING, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topicName: %s", p, err) +func (p *DescribeTopicGroupRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroupName", thrift.STRING, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicGroupName: %s", p, err) } - if err := oprot.WriteString(string(p.TopicName)); err != nil { - return fmt.Errorf("%T.topicName (1) field write error: %s", p, err) + if err := oprot.WriteString(string(p.TopicGroupName)); err != nil { + return fmt.Errorf("%T.topicGroupName (1) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topicName: %s", p, err) + return fmt.Errorf("%T write field end error 1:topicGroupName: %s", p, err) } return err } -func (p *GetTopicAttributeRequest) String() string { +func (p *DescribeTopicGroupRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("GetTopicAttributeRequest(%+v)", *p) + return fmt.Sprintf("DescribeTopicGroupRequest(%+v)", *p) } -type AddSubResourceNameRequest struct { - TopicTalosResourceName *TopicTalosResourceName `thrift:"topicTalosResourceName,1,required" json:"topicTalosResourceName"` - OrgId string `thrift:"orgId,2,required" json:"orgId"` - AdminTeamId string `thrift:"adminTeamId,3,required" json:"adminTeamId"` +type DescribeTopicGroupResponse struct { + TopicGroup *TopicGroup `thrift:"topicGroup,1,required" json:"topicGroup"` } -func NewAddSubResourceNameRequest() *AddSubResourceNameRequest { - return &AddSubResourceNameRequest{} +func NewDescribeTopicGroupResponse() *DescribeTopicGroupResponse { + return &DescribeTopicGroupResponse{} } -var AddSubResourceNameRequest_TopicTalosResourceName_DEFAULT *TopicTalosResourceName +var DescribeTopicGroupResponse_TopicGroup_DEFAULT *TopicGroup -func (p *AddSubResourceNameRequest) GetTopicTalosResourceName() *TopicTalosResourceName { - if !p.IsSetTopicTalosResourceName() { - return AddSubResourceNameRequest_TopicTalosResourceName_DEFAULT +func (p *DescribeTopicGroupResponse) GetTopicGroup() *TopicGroup { + if !p.IsSetTopicGroup() { + return DescribeTopicGroupResponse_TopicGroup_DEFAULT } - return p.TopicTalosResourceName -} - -func (p *AddSubResourceNameRequest) GetOrgId() string { - return p.OrgId -} - -func (p *AddSubResourceNameRequest) GetAdminTeamId() string { - return p.AdminTeamId + return p.TopicGroup } -func (p *AddSubResourceNameRequest) IsSetTopicTalosResourceName() bool { - return p.TopicTalosResourceName != nil +func (p *DescribeTopicGroupResponse) IsSetTopicGroup() bool { + return p.TopicGroup != nil } -func (p *AddSubResourceNameRequest) Read(iprot thrift.TProtocol) error { +func (p *DescribeTopicGroupResponse) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3549,14 +4400,6 @@ func (p *AddSubResourceNameRequest) Read(iprot thrift.TProtocol) error { if err := p.ReadField1(iprot); err != nil { return err } - case 2: - if err := p.ReadField2(iprot); err != nil { - return err - } - case 3: - if err := p.ReadField3(iprot); err != nil { - return err - } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -3572,45 +4415,21 @@ func (p *AddSubResourceNameRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *AddSubResourceNameRequest) ReadField1(iprot thrift.TProtocol) error { - p.TopicTalosResourceName = &TopicTalosResourceName{} - if err := p.TopicTalosResourceName.Read(iprot); err != nil { - return fmt.Errorf("%T error reading struct: %s", p.TopicTalosResourceName, err) - } - return nil -} - -func (p *AddSubResourceNameRequest) ReadField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return fmt.Errorf("error reading field 2: %s", err) - } else { - p.OrgId = v - } - return nil -} - -func (p *AddSubResourceNameRequest) ReadField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return fmt.Errorf("error reading field 3: %s", err) - } else { - p.AdminTeamId = v +func (p *DescribeTopicGroupResponse) ReadField1(iprot thrift.TProtocol) error { + p.TopicGroup = &TopicGroup{} + if err := p.TopicGroup.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", p.TopicGroup, err) } return nil } -func (p *AddSubResourceNameRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("AddSubResourceNameRequest"); err != nil { +func (p *DescribeTopicGroupResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DescribeTopicGroupResponse"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } if err := oprot.WriteFieldStop(); err != nil { return fmt.Errorf("write field stop error: %s", err) } @@ -3620,73 +4439,38 @@ func (p *AddSubResourceNameRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *AddSubResourceNameRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicTalosResourceName", thrift.STRUCT, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topicTalosResourceName: %s", p, err) - } - if err := p.TopicTalosResourceName.Write(oprot); err != nil { - return fmt.Errorf("%T error writing struct: %s", p.TopicTalosResourceName, err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topicTalosResourceName: %s", p, err) - } - return err -} - -func (p *AddSubResourceNameRequest) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("orgId", thrift.STRING, 2); err != nil { - return fmt.Errorf("%T write field begin error 2:orgId: %s", p, err) - } - if err := oprot.WriteString(string(p.OrgId)); err != nil { - return fmt.Errorf("%T.orgId (2) field write error: %s", p, err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 2:orgId: %s", p, err) - } - return err -} - -func (p *AddSubResourceNameRequest) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("adminTeamId", thrift.STRING, 3); err != nil { - return fmt.Errorf("%T write field begin error 3:adminTeamId: %s", p, err) +func (p *DescribeTopicGroupResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroup", thrift.STRUCT, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicGroup: %s", p, err) } - if err := oprot.WriteString(string(p.AdminTeamId)); err != nil { - return fmt.Errorf("%T.adminTeamId (3) field write error: %s", p, err) + if err := p.TopicGroup.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", p.TopicGroup, err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 3:adminTeamId: %s", p, err) + return fmt.Errorf("%T write field end error 1:topicGroup: %s", p, err) } return err } -func (p *AddSubResourceNameRequest) String() string { +func (p *DescribeTopicGroupResponse) String() string { if p == nil { return "" } - return fmt.Sprintf("AddSubResourceNameRequest(%+v)", *p) + return fmt.Sprintf("DescribeTopicGroupResponse(%+v)", *p) } -type CreateTopicGroupRequest struct { - TopicGroup *TopicGroup `thrift:"topicGroup,1,required" json:"topicGroup"` +type DeleteTopicGroupRequest struct { + TopicGroupName string `thrift:"topicGroupName,1,required" json:"topicGroupName"` } -func NewCreateTopicGroupRequest() *CreateTopicGroupRequest { - return &CreateTopicGroupRequest{} +func NewDeleteTopicGroupRequest() *DeleteTopicGroupRequest { + return &DeleteTopicGroupRequest{} } -var CreateTopicGroupRequest_TopicGroup_DEFAULT *TopicGroup - -func (p *CreateTopicGroupRequest) GetTopicGroup() *TopicGroup { - if !p.IsSetTopicGroup() { - return CreateTopicGroupRequest_TopicGroup_DEFAULT - } - return p.TopicGroup -} -func (p *CreateTopicGroupRequest) IsSetTopicGroup() bool { - return p.TopicGroup != nil +func (p *DeleteTopicGroupRequest) GetTopicGroupName() string { + return p.TopicGroupName } - -func (p *CreateTopicGroupRequest) Read(iprot thrift.TProtocol) error { +func (p *DeleteTopicGroupRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3718,16 +4502,17 @@ func (p *CreateTopicGroupRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupRequest) ReadField1(iprot thrift.TProtocol) error { - p.TopicGroup = &TopicGroup{} - if err := p.TopicGroup.Read(iprot); err != nil { - return fmt.Errorf("%T error reading struct: %s", p.TopicGroup, err) +func (p *DeleteTopicGroupRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 1: %s", err) + } else { + p.TopicGroupName = v } return nil } -func (p *CreateTopicGroupRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("CreateTopicGroupRequest"); err != nil { +func (p *DeleteTopicGroupRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("DeleteTopicGroupRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3742,47 +4527,47 @@ func (p *CreateTopicGroupRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicGroup", thrift.STRUCT, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topicGroup: %s", p, err) +func (p *DeleteTopicGroupRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroupName", thrift.STRING, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicGroupName: %s", p, err) } - if err := p.TopicGroup.Write(oprot); err != nil { - return fmt.Errorf("%T error writing struct: %s", p.TopicGroup, err) + if err := oprot.WriteString(string(p.TopicGroupName)); err != nil { + return fmt.Errorf("%T.topicGroupName (1) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topicGroup: %s", p, err) + return fmt.Errorf("%T write field end error 1:topicGroupName: %s", p, err) } return err } -func (p *CreateTopicGroupRequest) String() string { +func (p *DeleteTopicGroupRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("CreateTopicGroupRequest(%+v)", *p) + return fmt.Sprintf("DeleteTopicGroupRequest(%+v)", *p) } -type CreateTopicGroupResponse struct { +type UpdateTopicGroupRequest struct { TopicGroup *TopicGroup `thrift:"topicGroup,1,required" json:"topicGroup"` } -func NewCreateTopicGroupResponse() *CreateTopicGroupResponse { - return &CreateTopicGroupResponse{} +func NewUpdateTopicGroupRequest() *UpdateTopicGroupRequest { + return &UpdateTopicGroupRequest{} } -var CreateTopicGroupResponse_TopicGroup_DEFAULT *TopicGroup +var UpdateTopicGroupRequest_TopicGroup_DEFAULT *TopicGroup -func (p *CreateTopicGroupResponse) GetTopicGroup() *TopicGroup { +func (p *UpdateTopicGroupRequest) GetTopicGroup() *TopicGroup { if !p.IsSetTopicGroup() { - return CreateTopicGroupResponse_TopicGroup_DEFAULT + return UpdateTopicGroupRequest_TopicGroup_DEFAULT } return p.TopicGroup } -func (p *CreateTopicGroupResponse) IsSetTopicGroup() bool { +func (p *UpdateTopicGroupRequest) IsSetTopicGroup() bool { return p.TopicGroup != nil } -func (p *CreateTopicGroupResponse) Read(iprot thrift.TProtocol) error { +func (p *UpdateTopicGroupRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3814,7 +4599,7 @@ func (p *CreateTopicGroupResponse) Read(iprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupResponse) ReadField1(iprot thrift.TProtocol) error { +func (p *UpdateTopicGroupRequest) ReadField1(iprot thrift.TProtocol) error { p.TopicGroup = &TopicGroup{} if err := p.TopicGroup.Read(iprot); err != nil { return fmt.Errorf("%T error reading struct: %s", p.TopicGroup, err) @@ -3822,8 +4607,8 @@ func (p *CreateTopicGroupResponse) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupResponse) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("CreateTopicGroupResponse"); err != nil { +func (p *UpdateTopicGroupRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("UpdateTopicGroupRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3838,7 +4623,7 @@ func (p *CreateTopicGroupResponse) Write(oprot thrift.TProtocol) error { return nil } -func (p *CreateTopicGroupResponse) writeField1(oprot thrift.TProtocol) (err error) { +func (p *UpdateTopicGroupRequest) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("topicGroup", thrift.STRUCT, 1); err != nil { return fmt.Errorf("%T write field begin error 1:topicGroup: %s", p, err) } @@ -3851,25 +4636,25 @@ func (p *CreateTopicGroupResponse) writeField1(oprot thrift.TProtocol) (err erro return err } -func (p *CreateTopicGroupResponse) String() string { +func (p *UpdateTopicGroupRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("CreateTopicGroupResponse(%+v)", *p) + return fmt.Sprintf("UpdateTopicGroupRequest(%+v)", *p) } -type DescribeTopicGroupRequest struct { - TopicGroupName string `thrift:"topicGroupName,1,required" json:"topicGroupName"` +type ListTopicGroupResponse struct { + TopicGroupList []*TopicGroup `thrift:"topicGroupList,1,required" json:"topicGroupList"` } -func NewDescribeTopicGroupRequest() *DescribeTopicGroupRequest { - return &DescribeTopicGroupRequest{} +func NewListTopicGroupResponse() *ListTopicGroupResponse { + return &ListTopicGroupResponse{} } -func (p *DescribeTopicGroupRequest) GetTopicGroupName() string { - return p.TopicGroupName +func (p *ListTopicGroupResponse) GetTopicGroupList() []*TopicGroup { + return p.TopicGroupList } -func (p *DescribeTopicGroupRequest) Read(iprot thrift.TProtocol) error { +func (p *ListTopicGroupResponse) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3901,17 +4686,28 @@ func (p *DescribeTopicGroupRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicGroupRequest) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return fmt.Errorf("error reading field 1: %s", err) - } else { - p.TopicGroupName = v +func (p *ListTopicGroupResponse) ReadField1(iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin() + if err != nil { + return fmt.Errorf("error reading list begin: %s", err) + } + tSlice := make([]*TopicGroup, 0, size) + p.TopicGroupList = tSlice + for i := 0; i < size; i++ { + _elem11 := &TopicGroup{} + if err := _elem11.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", _elem11, err) + } + p.TopicGroupList = append(p.TopicGroupList, _elem11) + } + if err := iprot.ReadListEnd(); err != nil { + return fmt.Errorf("error reading list end: %s", err) } return nil } -func (p *DescribeTopicGroupRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("DescribeTopicGroupRequest"); err != nil { +func (p *ListTopicGroupResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("ListTopicGroupResponse"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -3926,47 +4722,46 @@ func (p *DescribeTopicGroupRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicGroupRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicGroupName", thrift.STRING, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topicGroupName: %s", p, err) +func (p *ListTopicGroupResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroupList", thrift.LIST, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicGroupList: %s", p, err) } - if err := oprot.WriteString(string(p.TopicGroupName)); err != nil { - return fmt.Errorf("%T.topicGroupName (1) field write error: %s", p, err) + if err := oprot.WriteListBegin(thrift.STRUCT, len(p.TopicGroupList)); err != nil { + return fmt.Errorf("error writing list begin: %s", err) + } + for _, v := range p.TopicGroupList { + if err := v.Write(oprot); err != nil { + return fmt.Errorf("%T error writing struct: %s", v, err) + } + } + if err := oprot.WriteListEnd(); err != nil { + return fmt.Errorf("error writing list end: %s", err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topicGroupName: %s", p, err) + return fmt.Errorf("%T write field end error 1:topicGroupList: %s", p, err) } return err } -func (p *DescribeTopicGroupRequest) String() string { +func (p *ListTopicGroupResponse) String() string { if p == nil { return "" } - return fmt.Sprintf("DescribeTopicGroupRequest(%+v)", *p) + return fmt.Sprintf("ListTopicGroupResponse(%+v)", *p) } -type DescribeTopicGroupResponse struct { - TopicGroup *TopicGroup `thrift:"topicGroup,1,required" json:"topicGroup"` +type LookupTopicsRequest struct { + TopicGroup string `thrift:"topicGroup,1,required" json:"topicGroup"` } -func NewDescribeTopicGroupResponse() *DescribeTopicGroupResponse { - return &DescribeTopicGroupResponse{} +func NewLookupTopicsRequest() *LookupTopicsRequest { + return &LookupTopicsRequest{} } -var DescribeTopicGroupResponse_TopicGroup_DEFAULT *TopicGroup - -func (p *DescribeTopicGroupResponse) GetTopicGroup() *TopicGroup { - if !p.IsSetTopicGroup() { - return DescribeTopicGroupResponse_TopicGroup_DEFAULT - } +func (p *LookupTopicsRequest) GetTopicGroup() string { return p.TopicGroup } -func (p *DescribeTopicGroupResponse) IsSetTopicGroup() bool { - return p.TopicGroup != nil -} - -func (p *DescribeTopicGroupResponse) Read(iprot thrift.TProtocol) error { +func (p *LookupTopicsRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -3998,16 +4793,17 @@ func (p *DescribeTopicGroupResponse) Read(iprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicGroupResponse) ReadField1(iprot thrift.TProtocol) error { - p.TopicGroup = &TopicGroup{} - if err := p.TopicGroup.Read(iprot); err != nil { - return fmt.Errorf("%T error reading struct: %s", p.TopicGroup, err) +func (p *LookupTopicsRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 1: %s", err) + } else { + p.TopicGroup = v } return nil } -func (p *DescribeTopicGroupResponse) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("DescribeTopicGroupResponse"); err != nil { +func (p *LookupTopicsRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("LookupTopicsRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4022,12 +4818,12 @@ func (p *DescribeTopicGroupResponse) Write(oprot thrift.TProtocol) error { return nil } -func (p *DescribeTopicGroupResponse) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicGroup", thrift.STRUCT, 1); err != nil { +func (p *LookupTopicsRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicGroup", thrift.STRING, 1); err != nil { return fmt.Errorf("%T write field begin error 1:topicGroup: %s", p, err) } - if err := p.TopicGroup.Write(oprot); err != nil { - return fmt.Errorf("%T error writing struct: %s", p.TopicGroup, err) + if err := oprot.WriteString(string(p.TopicGroup)); err != nil { + return fmt.Errorf("%T.topicGroup (1) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:topicGroup: %s", p, err) @@ -4035,25 +4831,25 @@ func (p *DescribeTopicGroupResponse) writeField1(oprot thrift.TProtocol) (err er return err } -func (p *DescribeTopicGroupResponse) String() string { +func (p *LookupTopicsRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("DescribeTopicGroupResponse(%+v)", *p) + return fmt.Sprintf("LookupTopicsRequest(%+v)", *p) } -type DeleteTopicGroupRequest struct { - TopicGroupName string `thrift:"topicGroupName,1,required" json:"topicGroupName"` +type LookupTopicsResponse struct { + Topics map[string]int32 `thrift:"topics,1,required" json:"topics"` } -func NewDeleteTopicGroupRequest() *DeleteTopicGroupRequest { - return &DeleteTopicGroupRequest{} +func NewLookupTopicsResponse() *LookupTopicsResponse { + return &LookupTopicsResponse{} } -func (p *DeleteTopicGroupRequest) GetTopicGroupName() string { - return p.TopicGroupName +func (p *LookupTopicsResponse) GetTopics() map[string]int32 { + return p.Topics } -func (p *DeleteTopicGroupRequest) Read(iprot thrift.TProtocol) error { +func (p *LookupTopicsResponse) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4085,17 +4881,36 @@ func (p *DeleteTopicGroupRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicGroupRequest) ReadField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return fmt.Errorf("error reading field 1: %s", err) - } else { - p.TopicGroupName = v +func (p *LookupTopicsResponse) ReadField1(iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin() + if err != nil { + return fmt.Errorf("error reading map begin: %s", err) + } + tMap := make(map[string]int32, size) + p.Topics = tMap + for i := 0; i < size; i++ { + var _key12 string + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 0: %s", err) + } else { + _key12 = v + } + var _val13 int32 + if v, err := iprot.ReadI32(); err != nil { + return fmt.Errorf("error reading field 0: %s", err) + } else { + _val13 = v + } + p.Topics[_key12] = _val13 + } + if err := iprot.ReadMapEnd(); err != nil { + return fmt.Errorf("error reading map end: %s", err) } return nil } -func (p *DeleteTopicGroupRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("DeleteTopicGroupRequest"); err != nil { +func (p *LookupTopicsResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("LookupTopicsResponse"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4110,38 +4925,54 @@ func (p *DeleteTopicGroupRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *DeleteTopicGroupRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicGroupName", thrift.STRING, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topicGroupName: %s", p, err) +func (p *LookupTopicsResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topics", thrift.MAP, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topics: %s", p, err) } - if err := oprot.WriteString(string(p.TopicGroupName)); err != nil { - return fmt.Errorf("%T.topicGroupName (1) field write error: %s", p, err) + if err := oprot.WriteMapBegin(thrift.STRING, thrift.I32, len(p.Topics)); err != nil { + return fmt.Errorf("error writing map begin: %s", err) + } + for k, v := range p.Topics { + if err := oprot.WriteString(string(k)); err != nil { + return fmt.Errorf("%T. (0) field write error: %s", p, err) + } + if err := oprot.WriteI32(int32(v)); err != nil { + return fmt.Errorf("%T. (0) field write error: %s", p, err) + } + } + if err := oprot.WriteMapEnd(); err != nil { + return fmt.Errorf("error writing map end: %s", err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topicGroupName: %s", p, err) + return fmt.Errorf("%T write field end error 1:topics: %s", p, err) } return err } -func (p *DeleteTopicGroupRequest) String() string { +func (p *LookupTopicsResponse) String() string { if p == nil { return "" } - return fmt.Sprintf("DeleteTopicGroupRequest(%+v)", *p) + return fmt.Sprintf("LookupTopicsResponse(%+v)", *p) +} + +type MatchTopicsRequest struct { + TopicPattern string `thrift:"topicPattern,1,required" json:"topicPattern"` + TeamId string `thrift:"teamId,2,required" json:"teamId"` } -type ListTopicGroupRequest struct { - OrgList []string `thrift:"OrgList,1,required" json:"OrgList"` +func NewMatchTopicsRequest() *MatchTopicsRequest { + return &MatchTopicsRequest{} } -func NewListTopicGroupRequest() *ListTopicGroupRequest { - return &ListTopicGroupRequest{} +func (p *MatchTopicsRequest) GetTopicPattern() string { + return p.TopicPattern } -func (p *ListTopicGroupRequest) GetOrgList() []string { - return p.OrgList +func (p *MatchTopicsRequest) GetTeamId() string { + return p.TeamId } -func (p *ListTopicGroupRequest) Read(iprot thrift.TProtocol) error { +func (p *MatchTopicsRequest) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4158,6 +4989,10 @@ func (p *ListTopicGroupRequest) Read(iprot thrift.TProtocol) error { if err := p.ReadField1(iprot); err != nil { return err } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -4173,35 +5008,34 @@ func (p *ListTopicGroupRequest) Read(iprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupRequest) ReadField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return fmt.Errorf("error reading list begin: %s", err) - } - tSlice := make([]string, 0, size) - p.OrgList = tSlice - for i := 0; i < size; i++ { - var _elem10 string - if v, err := iprot.ReadString(); err != nil { - return fmt.Errorf("error reading field 0: %s", err) - } else { - _elem10 = v - } - p.OrgList = append(p.OrgList, _elem10) +func (p *MatchTopicsRequest) ReadField1(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 1: %s", err) + } else { + p.TopicPattern = v } - if err := iprot.ReadListEnd(); err != nil { - return fmt.Errorf("error reading list end: %s", err) + return nil +} + +func (p *MatchTopicsRequest) ReadField2(iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 2: %s", err) + } else { + p.TeamId = v } return nil } -func (p *ListTopicGroupRequest) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ListTopicGroupRequest"); err != nil { +func (p *MatchTopicsRequest) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("MatchTopicsRequest"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { + return err + } if err := oprot.WriteFieldStop(); err != nil { return fmt.Errorf("write field stop error: %s", err) } @@ -4211,46 +5045,51 @@ func (p *ListTopicGroupRequest) Write(oprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupRequest) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("OrgList", thrift.LIST, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:OrgList: %s", p, err) +func (p *MatchTopicsRequest) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topicPattern", thrift.STRING, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topicPattern: %s", p, err) } - if err := oprot.WriteListBegin(thrift.STRING, len(p.OrgList)); err != nil { - return fmt.Errorf("error writing list begin: %s", err) + if err := oprot.WriteString(string(p.TopicPattern)); err != nil { + return fmt.Errorf("%T.topicPattern (1) field write error: %s", p, err) } - for _, v := range p.OrgList { - if err := oprot.WriteString(string(v)); err != nil { - return fmt.Errorf("%T. (0) field write error: %s", p, err) - } + if err := oprot.WriteFieldEnd(); err != nil { + return fmt.Errorf("%T write field end error 1:topicPattern: %s", p, err) } - if err := oprot.WriteListEnd(); err != nil { - return fmt.Errorf("error writing list end: %s", err) + return err +} + +func (p *MatchTopicsRequest) writeField2(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("teamId", thrift.STRING, 2); err != nil { + return fmt.Errorf("%T write field begin error 2:teamId: %s", p, err) + } + if err := oprot.WriteString(string(p.TeamId)); err != nil { + return fmt.Errorf("%T.teamId (2) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:OrgList: %s", p, err) + return fmt.Errorf("%T write field end error 2:teamId: %s", p, err) } return err } -func (p *ListTopicGroupRequest) String() string { +func (p *MatchTopicsRequest) String() string { if p == nil { return "" } - return fmt.Sprintf("ListTopicGroupRequest(%+v)", *p) + return fmt.Sprintf("MatchTopicsRequest(%+v)", *p) } -type ListTopicGroupResponse struct { - TopicGroupList []*TopicGroup `thrift:"topicGroupList,1,required" json:"topicGroupList"` +type MatchTopicsResponse struct { + Topics []string `thrift:"topics,1,required" json:"topics"` } -func NewListTopicGroupResponse() *ListTopicGroupResponse { - return &ListTopicGroupResponse{} +func NewMatchTopicsResponse() *MatchTopicsResponse { + return &MatchTopicsResponse{} } -func (p *ListTopicGroupResponse) GetTopicGroupList() []*TopicGroup { - return p.TopicGroupList +func (p *MatchTopicsResponse) GetTopics() []string { + return p.Topics } -func (p *ListTopicGroupResponse) Read(iprot thrift.TProtocol) error { +func (p *MatchTopicsResponse) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } @@ -4282,19 +5121,21 @@ func (p *ListTopicGroupResponse) Read(iprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupResponse) ReadField1(iprot thrift.TProtocol) error { +func (p *MatchTopicsResponse) ReadField1(iprot thrift.TProtocol) error { _, size, err := iprot.ReadListBegin() if err != nil { return fmt.Errorf("error reading list begin: %s", err) } - tSlice := make([]*TopicGroup, 0, size) - p.TopicGroupList = tSlice + tSlice := make([]string, 0, size) + p.Topics = tSlice for i := 0; i < size; i++ { - _elem11 := &TopicGroup{} - if err := _elem11.Read(iprot); err != nil { - return fmt.Errorf("%T error reading struct: %s", _elem11, err) + var _elem14 string + if v, err := iprot.ReadString(); err != nil { + return fmt.Errorf("error reading field 0: %s", err) + } else { + _elem14 = v } - p.TopicGroupList = append(p.TopicGroupList, _elem11) + p.Topics = append(p.Topics, _elem14) } if err := iprot.ReadListEnd(); err != nil { return fmt.Errorf("error reading list end: %s", err) @@ -4302,8 +5143,8 @@ func (p *ListTopicGroupResponse) ReadField1(iprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupResponse) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("ListTopicGroupResponse"); err != nil { +func (p *MatchTopicsResponse) Write(oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin("MatchTopicsResponse"); err != nil { return fmt.Errorf("%T write struct begin error: %s", p, err) } if err := p.writeField1(oprot); err != nil { @@ -4318,32 +5159,32 @@ func (p *ListTopicGroupResponse) Write(oprot thrift.TProtocol) error { return nil } -func (p *ListTopicGroupResponse) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("topicGroupList", thrift.LIST, 1); err != nil { - return fmt.Errorf("%T write field begin error 1:topicGroupList: %s", p, err) +func (p *MatchTopicsResponse) writeField1(oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin("topics", thrift.LIST, 1); err != nil { + return fmt.Errorf("%T write field begin error 1:topics: %s", p, err) } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.TopicGroupList)); err != nil { + if err := oprot.WriteListBegin(thrift.STRING, len(p.Topics)); err != nil { return fmt.Errorf("error writing list begin: %s", err) } - for _, v := range p.TopicGroupList { - if err := v.Write(oprot); err != nil { - return fmt.Errorf("%T error writing struct: %s", v, err) + for _, v := range p.Topics { + if err := oprot.WriteString(string(v)); err != nil { + return fmt.Errorf("%T. (0) field write error: %s", p, err) } } if err := oprot.WriteListEnd(); err != nil { return fmt.Errorf("error writing list end: %s", err) } if err := oprot.WriteFieldEnd(); err != nil { - return fmt.Errorf("%T write field end error 1:topicGroupList: %s", p, err) + return fmt.Errorf("%T write field end error 1:topics: %s", p, err) } return err } -func (p *ListTopicGroupResponse) String() string { +func (p *MatchTopicsResponse) String() string { if p == nil { return "" } - return fmt.Sprintf("ListTopicGroupResponse(%+v)", *p) + return fmt.Sprintf("MatchTopicsResponse(%+v)", *p) } type DescribeTopicResponse struct { @@ -4501,19 +5342,19 @@ func (p *DescribeTopicResponse) ReadField5(iprot thrift.TProtocol) error { tMap := make(map[string]int32, size) p.AclMap = tMap for i := 0; i < size; i++ { - var _key12 string + var _key15 string if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { - _key12 = v + _key15 = v } - var _val13 int32 + var _val16 int32 if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { - _val13 = v + _val16 = v } - p.AclMap[_key12] = _val13 + p.AclMap[_key15] = _val16 } if err := iprot.ReadMapEnd(); err != nil { return fmt.Errorf("error reading map end: %s", err) @@ -4951,11 +5792,11 @@ func (p *ListTopicsResponse) ReadField1(iprot thrift.TProtocol) error { tSlice := make([]*TopicInfo, 0, size) p.TopicInfos = tSlice for i := 0; i < size; i++ { - _elem14 := &TopicInfo{} - if err := _elem14.Read(iprot); err != nil { - return fmt.Errorf("%T error reading struct: %s", _elem14, err) + _elem17 := &TopicInfo{} + if err := _elem17.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", _elem17, err) } - p.TopicInfos = append(p.TopicInfos, _elem14) + p.TopicInfos = append(p.TopicInfos, _elem17) } if err := iprot.ReadListEnd(); err != nil { return fmt.Errorf("error reading list end: %s", err) @@ -5058,11 +5899,11 @@ func (p *ListTopicsInfoResponse) ReadField1(iprot thrift.TProtocol) error { tSlice := make([]*Topic, 0, size) p.TopicList = tSlice for i := 0; i < size; i++ { - _elem15 := &Topic{} - if err := _elem15.Read(iprot); err != nil { - return fmt.Errorf("%T error reading struct: %s", _elem15, err) + _elem18 := &Topic{} + if err := _elem18.Read(iprot); err != nil { + return fmt.Errorf("%T error reading struct: %s", _elem18, err) } - p.TopicList = append(p.TopicList, _elem15) + p.TopicList = append(p.TopicList, _elem18) } if err := iprot.ReadListEnd(); err != nil { return fmt.Errorf("error reading list end: %s", err) @@ -5998,19 +6839,19 @@ func (p *ListPermissionResponse) ReadField1(iprot thrift.TProtocol) error { tMap := make(map[string]int32, size) p.Permissions = tMap for i := 0; i < size; i++ { - var _key16 string + var _key19 string if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { - _key16 = v + _key19 = v } - var _val17 int32 + var _val20 int32 if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 0: %s", err) } else { - _val17 = v + _val20 = v } - p.Permissions[_key16] = _val17 + p.Permissions[_key19] = _val20 } if err := iprot.ReadMapEnd(); err != nil { return fmt.Errorf("error reading map end: %s", err)