Przeglądaj źródła

Support go sdk.

sdk-team 6 lat temu
rodzic
commit
7c963d103a

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-08-18 Version: 1.60.107
+- Support go sdk.
+
 2019-08-16 Version: 1.60.106
 - Generated 2018-02-01 for `ddosbgp`.
 

+ 129 - 0
services/alikafka/client.go

@@ -0,0 +1,129 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"reflect"
+
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
+)
+
+// Client is the sdk client struct, each func corresponds to an OpenAPI
+type Client struct {
+	sdk.Client
+}
+
+// SetClientProperty Set Property by Reflect
+func SetClientProperty(client *Client, propertyName string, propertyValue interface{}) {
+	v := reflect.ValueOf(client).Elem()
+	if v.FieldByName(propertyName).IsValid() && v.FieldByName(propertyName).CanSet() {
+		v.FieldByName(propertyName).Set(reflect.ValueOf(propertyValue))
+	}
+}
+
+// SetEndpointDataToClient Set EndpointMap and ENdpointType
+func SetEndpointDataToClient(client *Client) {
+	SetClientProperty(client, "EndpointMap", GetEndpointMap())
+	SetClientProperty(client, "EndpointType", GetEndpointType())
+}
+
+// NewClient creates a sdk client with environment variables
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithProvider creates a sdk client with providers
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) {
+	client = &Client{}
+	var pc provider.Provider
+	if len(providers) == 0 {
+		pc = provider.DefaultChain
+	} else {
+		pc = provider.NewProviderChain(providers)
+	}
+	err = client.InitWithProviderChain(regionId, pc)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
+// this is the common api to create a sdk client
+func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithOptions(regionId, config, credential)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithStsToken is a shortcut to create sdk client with sts token
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithEcsRamRole(regionId, roleName)
+	SetEndpointDataToClient(client)
+	return
+}
+
+// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
+// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	SetEndpointDataToClient(client)
+	return
+}

+ 107 - 0
services/alikafka/create_consumer_group.go

@@ -0,0 +1,107 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateConsumerGroup invokes the alikafka.CreateConsumerGroup API synchronously
+// api document: https://help.aliyun.com/api/alikafka/createconsumergroup.html
+func (client *Client) CreateConsumerGroup(request *CreateConsumerGroupRequest) (response *CreateConsumerGroupResponse, err error) {
+	response = CreateCreateConsumerGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateConsumerGroupWithChan invokes the alikafka.CreateConsumerGroup API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/createconsumergroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateConsumerGroupWithChan(request *CreateConsumerGroupRequest) (<-chan *CreateConsumerGroupResponse, <-chan error) {
+	responseChan := make(chan *CreateConsumerGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateConsumerGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateConsumerGroupWithCallback invokes the alikafka.CreateConsumerGroup API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/createconsumergroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateConsumerGroupWithCallback(request *CreateConsumerGroupRequest, callback func(response *CreateConsumerGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateConsumerGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateConsumerGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateConsumerGroupRequest is the request struct for api CreateConsumerGroup
+type CreateConsumerGroupRequest struct {
+	*requests.RpcRequest
+	InstanceId string `position:"Query" name:"InstanceId"`
+	ConsumerId string `position:"Query" name:"ConsumerId"`
+}
+
+// CreateConsumerGroupResponse is the response struct for api CreateConsumerGroup
+type CreateConsumerGroupResponse struct {
+	*responses.BaseResponse
+	Success   bool   `json:"Success" xml:"Success"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateCreateConsumerGroupRequest creates a request to invoke CreateConsumerGroup API
+func CreateCreateConsumerGroupRequest() (request *CreateConsumerGroupRequest) {
+	request = &CreateConsumerGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "CreateConsumerGroup", "alikafka", "openAPI")
+	return
+}
+
+// CreateCreateConsumerGroupResponse creates a response to parse from CreateConsumerGroup response
+func CreateCreateConsumerGroupResponse() (response *CreateConsumerGroupResponse) {
+	response = &CreateConsumerGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/alikafka/create_topic.go

@@ -0,0 +1,113 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateTopic invokes the alikafka.CreateTopic API synchronously
+// api document: https://help.aliyun.com/api/alikafka/createtopic.html
+func (client *Client) CreateTopic(request *CreateTopicRequest) (response *CreateTopicResponse, err error) {
+	response = CreateCreateTopicResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateTopicWithChan invokes the alikafka.CreateTopic API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/createtopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateTopicWithChan(request *CreateTopicRequest) (<-chan *CreateTopicResponse, <-chan error) {
+	responseChan := make(chan *CreateTopicResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateTopic(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateTopicWithCallback invokes the alikafka.CreateTopic API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/createtopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateTopicWithCallback(request *CreateTopicRequest, callback func(response *CreateTopicResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateTopicResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateTopic(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateTopicRequest is the request struct for api CreateTopic
+type CreateTopicRequest struct {
+	*requests.RpcRequest
+	InstanceId        string           `position:"Query" name:"InstanceId"`
+	Topic             string           `position:"Query" name:"Topic"`
+	Remark            string           `position:"Query" name:"Remark"`
+	CompactTopic      string           `position:"Query" name:"CompactTopic"`
+	PartitionNum      string           `position:"Query" name:"PartitionNum"`
+	ReplicationFactor string           `position:"Query" name:"ReplicationFactor"`
+	LocalTopic        string           `position:"Query" name:"LocalTopic"`
+	OrderType         requests.Integer `position:"Query" name:"OrderType"`
+}
+
+// CreateTopicResponse is the response struct for api CreateTopic
+type CreateTopicResponse struct {
+	*responses.BaseResponse
+	Success   bool   `json:"Success" xml:"Success"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateCreateTopicRequest creates a request to invoke CreateTopic API
+func CreateCreateTopicRequest() (request *CreateTopicRequest) {
+	request = &CreateTopicRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "CreateTopic", "alikafka", "openAPI")
+	return
+}
+
+// CreateCreateTopicResponse creates a response to parse from CreateTopic response
+func CreateCreateTopicResponse() (response *CreateTopicResponse) {
+	response = &CreateTopicResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/alikafka/delete_consumer_group.go

@@ -0,0 +1,107 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteConsumerGroup invokes the alikafka.DeleteConsumerGroup API synchronously
+// api document: https://help.aliyun.com/api/alikafka/deleteconsumergroup.html
+func (client *Client) DeleteConsumerGroup(request *DeleteConsumerGroupRequest) (response *DeleteConsumerGroupResponse, err error) {
+	response = CreateDeleteConsumerGroupResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteConsumerGroupWithChan invokes the alikafka.DeleteConsumerGroup API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/deleteconsumergroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteConsumerGroupWithChan(request *DeleteConsumerGroupRequest) (<-chan *DeleteConsumerGroupResponse, <-chan error) {
+	responseChan := make(chan *DeleteConsumerGroupResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteConsumerGroup(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteConsumerGroupWithCallback invokes the alikafka.DeleteConsumerGroup API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/deleteconsumergroup.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteConsumerGroupWithCallback(request *DeleteConsumerGroupRequest, callback func(response *DeleteConsumerGroupResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteConsumerGroupResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteConsumerGroup(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteConsumerGroupRequest is the request struct for api DeleteConsumerGroup
+type DeleteConsumerGroupRequest struct {
+	*requests.RpcRequest
+	InstanceId string `position:"Query" name:"InstanceId"`
+	ConsumerId string `position:"Query" name:"ConsumerId"`
+}
+
+// DeleteConsumerGroupResponse is the response struct for api DeleteConsumerGroup
+type DeleteConsumerGroupResponse struct {
+	*responses.BaseResponse
+	Success   bool   `json:"Success" xml:"Success"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateDeleteConsumerGroupRequest creates a request to invoke DeleteConsumerGroup API
+func CreateDeleteConsumerGroupRequest() (request *DeleteConsumerGroupRequest) {
+	request = &DeleteConsumerGroupRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "DeleteConsumerGroup", "alikafka", "openAPI")
+	return
+}
+
+// CreateDeleteConsumerGroupResponse creates a response to parse from DeleteConsumerGroup response
+func CreateDeleteConsumerGroupResponse() (response *DeleteConsumerGroupResponse) {
+	response = &DeleteConsumerGroupResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/alikafka/delete_topic.go

@@ -0,0 +1,107 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteTopic invokes the alikafka.DeleteTopic API synchronously
+// api document: https://help.aliyun.com/api/alikafka/deletetopic.html
+func (client *Client) DeleteTopic(request *DeleteTopicRequest) (response *DeleteTopicResponse, err error) {
+	response = CreateDeleteTopicResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteTopicWithChan invokes the alikafka.DeleteTopic API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/deletetopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTopicWithChan(request *DeleteTopicRequest) (<-chan *DeleteTopicResponse, <-chan error) {
+	responseChan := make(chan *DeleteTopicResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteTopic(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteTopicWithCallback invokes the alikafka.DeleteTopic API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/deletetopic.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTopicWithCallback(request *DeleteTopicRequest, callback func(response *DeleteTopicResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteTopicResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteTopic(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteTopicRequest is the request struct for api DeleteTopic
+type DeleteTopicRequest struct {
+	*requests.RpcRequest
+	InstanceId string `position:"Query" name:"InstanceId"`
+	Topic      string `position:"Query" name:"Topic"`
+}
+
+// DeleteTopicResponse is the response struct for api DeleteTopic
+type DeleteTopicResponse struct {
+	*responses.BaseResponse
+	Success   bool   `json:"Success" xml:"Success"`
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Code      int    `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+}
+
+// CreateDeleteTopicRequest creates a request to invoke DeleteTopic API
+func CreateDeleteTopicRequest() (request *DeleteTopicRequest) {
+	request = &DeleteTopicRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "DeleteTopic", "alikafka", "openAPI")
+	return
+}
+
+// CreateDeleteTopicResponse creates a response to parse from DeleteTopic response
+func CreateDeleteTopicResponse() (response *DeleteTopicResponse) {
+	response = &DeleteTopicResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 30 - 0
services/alikafka/endpoint.go

@@ -0,0 +1,30 @@
+package alikafka
+
+// EndpointMap Endpoint Data
+var EndpointMap map[string]string
+
+// EndpointType regional or central
+var EndpointType = "regional"
+
+// GetEndpointMap Get Endpoint Data Map
+func GetEndpointMap() map[string]string {
+	if EndpointMap == nil {
+		EndpointMap = map[string]string{
+			"eu-west-1":      "alikafka.ap-south-1.aliyuncs.com",
+			"ap-southeast-2": "alikafka.ap-south-1.aliyuncs.com",
+			"ap-southeast-3": "alikafka.ap-south-1.aliyuncs.com",
+			"eu-central-1":   "alikafka.ap-south-1.aliyuncs.com",
+			"ap-northeast-1": "alikafka.ap-south-1.aliyuncs.com",
+			"us-east-1":      "alikafka.ap-south-1.aliyuncs.com",
+			"me-east-1":      "alikafka.ap-south-1.aliyuncs.com",
+			"us-west-1":      "alikafka.ap-south-1.aliyuncs.com",
+			"cn-chengdu":     "alikafka.aliyuncs.com",
+		}
+	}
+	return EndpointMap
+}
+
+// GetEndpointType Get Endpoint Type Value
+func GetEndpointType() string {
+	return EndpointType
+}

+ 106 - 0
services/alikafka/get_all_instance_id_list.go

@@ -0,0 +1,106 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetAllInstanceIdList invokes the alikafka.GetAllInstanceIdList API synchronously
+// api document: https://help.aliyun.com/api/alikafka/getallinstanceidlist.html
+func (client *Client) GetAllInstanceIdList(request *GetAllInstanceIdListRequest) (response *GetAllInstanceIdListResponse, err error) {
+	response = CreateGetAllInstanceIdListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetAllInstanceIdListWithChan invokes the alikafka.GetAllInstanceIdList API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/getallinstanceidlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetAllInstanceIdListWithChan(request *GetAllInstanceIdListRequest) (<-chan *GetAllInstanceIdListResponse, <-chan error) {
+	responseChan := make(chan *GetAllInstanceIdListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetAllInstanceIdList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetAllInstanceIdListWithCallback invokes the alikafka.GetAllInstanceIdList API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/getallinstanceidlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetAllInstanceIdListWithCallback(request *GetAllInstanceIdListRequest, callback func(response *GetAllInstanceIdListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetAllInstanceIdListResponse
+		var err error
+		defer close(result)
+		response, err = client.GetAllInstanceIdList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetAllInstanceIdListRequest is the request struct for api GetAllInstanceIdList
+type GetAllInstanceIdListRequest struct {
+	*requests.RpcRequest
+}
+
+// GetAllInstanceIdListResponse is the response struct for api GetAllInstanceIdList
+type GetAllInstanceIdListResponse struct {
+	*responses.BaseResponse
+	Success     bool                   `json:"Success" xml:"Success"`
+	RequestId   string                 `json:"RequestId" xml:"RequestId"`
+	Code        int                    `json:"Code" xml:"Code"`
+	Message     string                 `json:"Message" xml:"Message"`
+	InstanceIds map[string]interface{} `json:"InstanceIds" xml:"InstanceIds"`
+}
+
+// CreateGetAllInstanceIdListRequest creates a request to invoke GetAllInstanceIdList API
+func CreateGetAllInstanceIdListRequest() (request *GetAllInstanceIdListRequest) {
+	request = &GetAllInstanceIdListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "GetAllInstanceIdList", "alikafka", "openAPI")
+	return
+}
+
+// CreateGetAllInstanceIdListResponse creates a response to parse from GetAllInstanceIdList response
+func CreateGetAllInstanceIdListResponse() (response *GetAllInstanceIdListResponse) {
+	response = &GetAllInstanceIdListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/alikafka/get_consumer_list.go

@@ -0,0 +1,109 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetConsumerList invokes the alikafka.GetConsumerList API synchronously
+// api document: https://help.aliyun.com/api/alikafka/getconsumerlist.html
+func (client *Client) GetConsumerList(request *GetConsumerListRequest) (response *GetConsumerListResponse, err error) {
+	response = CreateGetConsumerListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetConsumerListWithChan invokes the alikafka.GetConsumerList API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/getconsumerlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetConsumerListWithChan(request *GetConsumerListRequest) (<-chan *GetConsumerListResponse, <-chan error) {
+	responseChan := make(chan *GetConsumerListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetConsumerList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetConsumerListWithCallback invokes the alikafka.GetConsumerList API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/getconsumerlist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetConsumerListWithCallback(request *GetConsumerListRequest, callback func(response *GetConsumerListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetConsumerListResponse
+		var err error
+		defer close(result)
+		response, err = client.GetConsumerList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetConsumerListRequest is the request struct for api GetConsumerList
+type GetConsumerListRequest struct {
+	*requests.RpcRequest
+	InstanceId  string `position:"Query" name:"InstanceId"`
+	PageSize    string `position:"Query" name:"PageSize"`
+	CurrentPage string `position:"Query" name:"CurrentPage"`
+}
+
+// GetConsumerListResponse is the response struct for api GetConsumerList
+type GetConsumerListResponse struct {
+	*responses.BaseResponse
+	Success      bool         `json:"Success" xml:"Success"`
+	RequestId    string       `json:"RequestId" xml:"RequestId"`
+	Code         int          `json:"Code" xml:"Code"`
+	Message      string       `json:"Message" xml:"Message"`
+	ConsumerList ConsumerList `json:"ConsumerList" xml:"ConsumerList"`
+}
+
+// CreateGetConsumerListRequest creates a request to invoke GetConsumerList API
+func CreateGetConsumerListRequest() (request *GetConsumerListRequest) {
+	request = &GetConsumerListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "GetConsumerList", "alikafka", "openAPI")
+	return
+}
+
+// CreateGetConsumerListResponse creates a response to parse from GetConsumerList response
+func CreateGetConsumerListResponse() (response *GetConsumerListResponse) {
+	response = &GetConsumerListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/alikafka/get_consumer_progress.go

@@ -0,0 +1,108 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetConsumerProgress invokes the alikafka.GetConsumerProgress API synchronously
+// api document: https://help.aliyun.com/api/alikafka/getconsumerprogress.html
+func (client *Client) GetConsumerProgress(request *GetConsumerProgressRequest) (response *GetConsumerProgressResponse, err error) {
+	response = CreateGetConsumerProgressResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetConsumerProgressWithChan invokes the alikafka.GetConsumerProgress API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/getconsumerprogress.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetConsumerProgressWithChan(request *GetConsumerProgressRequest) (<-chan *GetConsumerProgressResponse, <-chan error) {
+	responseChan := make(chan *GetConsumerProgressResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetConsumerProgress(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetConsumerProgressWithCallback invokes the alikafka.GetConsumerProgress API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/getconsumerprogress.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetConsumerProgressWithCallback(request *GetConsumerProgressRequest, callback func(response *GetConsumerProgressResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetConsumerProgressResponse
+		var err error
+		defer close(result)
+		response, err = client.GetConsumerProgress(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetConsumerProgressRequest is the request struct for api GetConsumerProgress
+type GetConsumerProgressRequest struct {
+	*requests.RpcRequest
+	InstanceId string `position:"Query" name:"InstanceId"`
+	ConsumerId string `position:"Query" name:"ConsumerId"`
+}
+
+// GetConsumerProgressResponse is the response struct for api GetConsumerProgress
+type GetConsumerProgressResponse struct {
+	*responses.BaseResponse
+	Success          bool             `json:"Success" xml:"Success"`
+	RequestId        string           `json:"RequestId" xml:"RequestId"`
+	Code             int              `json:"Code" xml:"Code"`
+	Message          string           `json:"Message" xml:"Message"`
+	ConsumerProgress ConsumerProgress `json:"ConsumerProgress" xml:"ConsumerProgress"`
+}
+
+// CreateGetConsumerProgressRequest creates a request to invoke GetConsumerProgress API
+func CreateGetConsumerProgressRequest() (request *GetConsumerProgressRequest) {
+	request = &GetConsumerProgressRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "GetConsumerProgress", "alikafka", "openAPI")
+	return
+}
+
+// CreateGetConsumerProgressResponse creates a response to parse from GetConsumerProgress response
+func CreateGetConsumerProgressResponse() (response *GetConsumerProgressResponse) {
+	response = &GetConsumerProgressResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/alikafka/get_instance_list.go

@@ -0,0 +1,106 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetInstanceList invokes the alikafka.GetInstanceList API synchronously
+// api document: https://help.aliyun.com/api/alikafka/getinstancelist.html
+func (client *Client) GetInstanceList(request *GetInstanceListRequest) (response *GetInstanceListResponse, err error) {
+	response = CreateGetInstanceListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetInstanceListWithChan invokes the alikafka.GetInstanceList API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/getinstancelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetInstanceListWithChan(request *GetInstanceListRequest) (<-chan *GetInstanceListResponse, <-chan error) {
+	responseChan := make(chan *GetInstanceListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetInstanceList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetInstanceListWithCallback invokes the alikafka.GetInstanceList API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/getinstancelist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetInstanceListWithCallback(request *GetInstanceListRequest, callback func(response *GetInstanceListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetInstanceListResponse
+		var err error
+		defer close(result)
+		response, err = client.GetInstanceList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetInstanceListRequest is the request struct for api GetInstanceList
+type GetInstanceListRequest struct {
+	*requests.RpcRequest
+}
+
+// GetInstanceListResponse is the response struct for api GetInstanceList
+type GetInstanceListResponse struct {
+	*responses.BaseResponse
+	Success      bool         `json:"Success" xml:"Success"`
+	RequestId    string       `json:"RequestId" xml:"RequestId"`
+	Code         int          `json:"Code" xml:"Code"`
+	Message      string       `json:"Message" xml:"Message"`
+	InstanceList InstanceList `json:"InstanceList" xml:"InstanceList"`
+}
+
+// CreateGetInstanceListRequest creates a request to invoke GetInstanceList API
+func CreateGetInstanceListRequest() (request *GetInstanceListRequest) {
+	request = &GetInstanceListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "GetInstanceList", "alikafka", "openAPI")
+	return
+}
+
+// CreateGetInstanceListResponse creates a response to parse from GetInstanceList response
+func CreateGetInstanceListResponse() (response *GetInstanceListResponse) {
+	response = &GetInstanceListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/alikafka/get_topic_list.go

@@ -0,0 +1,112 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetTopicList invokes the alikafka.GetTopicList API synchronously
+// api document: https://help.aliyun.com/api/alikafka/gettopiclist.html
+func (client *Client) GetTopicList(request *GetTopicListRequest) (response *GetTopicListResponse, err error) {
+	response = CreateGetTopicListResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetTopicListWithChan invokes the alikafka.GetTopicList API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/gettopiclist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTopicListWithChan(request *GetTopicListRequest) (<-chan *GetTopicListResponse, <-chan error) {
+	responseChan := make(chan *GetTopicListResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetTopicList(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetTopicListWithCallback invokes the alikafka.GetTopicList API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/gettopiclist.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTopicListWithCallback(request *GetTopicListRequest, callback func(response *GetTopicListResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetTopicListResponse
+		var err error
+		defer close(result)
+		response, err = client.GetTopicList(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetTopicListRequest is the request struct for api GetTopicList
+type GetTopicListRequest struct {
+	*requests.RpcRequest
+	InstanceId  string `position:"Query" name:"InstanceId"`
+	PageSize    string `position:"Query" name:"PageSize"`
+	CurrentPage string `position:"Query" name:"CurrentPage"`
+}
+
+// GetTopicListResponse is the response struct for api GetTopicList
+type GetTopicListResponse struct {
+	*responses.BaseResponse
+	Success     bool                    `json:"Success" xml:"Success"`
+	RequestId   string                  `json:"RequestId" xml:"RequestId"`
+	Code        int                     `json:"Code" xml:"Code"`
+	Message     string                  `json:"Message" xml:"Message"`
+	Total       int                     `json:"Total" xml:"Total"`
+	PageSize    int                     `json:"PageSize" xml:"PageSize"`
+	CurrentPage int                     `json:"CurrentPage" xml:"CurrentPage"`
+	TopicList   TopicListInGetTopicList `json:"TopicList" xml:"TopicList"`
+}
+
+// CreateGetTopicListRequest creates a request to invoke GetTopicList API
+func CreateGetTopicListRequest() (request *GetTopicListRequest) {
+	request = &GetTopicListRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "GetTopicList", "alikafka", "openAPI")
+	return
+}
+
+// CreateGetTopicListResponse creates a response to parse from GetTopicList response
+func CreateGetTopicListResponse() (response *GetTopicListResponse) {
+	response = &GetTopicListResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/alikafka/get_topic_status.go

@@ -0,0 +1,108 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetTopicStatus invokes the alikafka.GetTopicStatus API synchronously
+// api document: https://help.aliyun.com/api/alikafka/gettopicstatus.html
+func (client *Client) GetTopicStatus(request *GetTopicStatusRequest) (response *GetTopicStatusResponse, err error) {
+	response = CreateGetTopicStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetTopicStatusWithChan invokes the alikafka.GetTopicStatus API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/gettopicstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTopicStatusWithChan(request *GetTopicStatusRequest) (<-chan *GetTopicStatusResponse, <-chan error) {
+	responseChan := make(chan *GetTopicStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetTopicStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetTopicStatusWithCallback invokes the alikafka.GetTopicStatus API asynchronously
+// api document: https://help.aliyun.com/api/alikafka/gettopicstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTopicStatusWithCallback(request *GetTopicStatusRequest, callback func(response *GetTopicStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetTopicStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.GetTopicStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetTopicStatusRequest is the request struct for api GetTopicStatus
+type GetTopicStatusRequest struct {
+	*requests.RpcRequest
+	InstanceId string `position:"Query" name:"InstanceId"`
+	Topic      string `position:"Query" name:"Topic"`
+}
+
+// GetTopicStatusResponse is the response struct for api GetTopicStatus
+type GetTopicStatusResponse struct {
+	*responses.BaseResponse
+	Success     bool        `json:"Success" xml:"Success"`
+	RequestId   string      `json:"RequestId" xml:"RequestId"`
+	Code        int         `json:"Code" xml:"Code"`
+	Message     string      `json:"Message" xml:"Message"`
+	TopicStatus TopicStatus `json:"TopicStatus" xml:"TopicStatus"`
+}
+
+// CreateGetTopicStatusRequest creates a request to invoke GetTopicStatus API
+func CreateGetTopicStatusRequest() (request *GetTopicStatusRequest) {
+	request = &GetTopicStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("alikafka", "2018-10-15", "GetTopicStatus", "alikafka", "openAPI")
+	return
+}
+
+// CreateGetTopicStatusResponse creates a response to parse from GetTopicStatus response
+func CreateGetTopicStatusResponse() (response *GetTopicStatusResponse) {
+	response = &GetTopicStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 21 - 0
services/alikafka/struct_consumer_list.go

@@ -0,0 +1,21 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// ConsumerList is a nested struct in alikafka response
+type ConsumerList struct {
+	ConsumerListItem []ConsumerListItem `json:"ConsumerListItem" xml:"ConsumerListItem"`
+}

+ 23 - 0
services/alikafka/struct_consumer_list_item.go

@@ -0,0 +1,23 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// ConsumerListItem is a nested struct in alikafka response
+type ConsumerListItem struct {
+	RegionId   string `json:"RegionId" xml:"RegionId"`
+	InstanceId string `json:"InstanceId" xml:"InstanceId"`
+	ConsumerId string `json:"ConsumerId" xml:"ConsumerId"`
+}

+ 23 - 0
services/alikafka/struct_consumer_progress.go

@@ -0,0 +1,23 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// ConsumerProgress is a nested struct in alikafka response
+type ConsumerProgress struct {
+	TotalDiff     int64                          `json:"TotalDiff" xml:"TotalDiff"`
+	LastTimestamp int64                          `json:"LastTimestamp" xml:"LastTimestamp"`
+	TopicList     TopicListInGetConsumerProgress `json:"TopicList" xml:"TopicList"`
+}

+ 21 - 0
services/alikafka/struct_instance_list.go

@@ -0,0 +1,21 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// InstanceList is a nested struct in alikafka response
+type InstanceList struct {
+	InstanceListItem []InstanceListItem `json:"InstanceListItem" xml:"InstanceListItem"`
+}

+ 31 - 0
services/alikafka/struct_instance_list_item.go

@@ -0,0 +1,31 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// InstanceListItem is a nested struct in alikafka response
+type InstanceListItem struct {
+	InstanceId    string `json:"InstanceId" xml:"InstanceId"`
+	RegionId      string `json:"RegionId" xml:"RegionId"`
+	ServiceStatus int    `json:"ServiceStatus" xml:"ServiceStatus"`
+	VpcId         string `json:"VpcId" xml:"VpcId"`
+	VSwitchId     string `json:"VSwitchId" xml:"VSwitchId"`
+	EndPoint      string `json:"EndPoint" xml:"EndPoint"`
+	CreateTime    int64  `json:"CreateTime" xml:"CreateTime"`
+	ExpiredTime   int64  `json:"ExpiredTime" xml:"ExpiredTime"`
+	DeployType    int    `json:"DeployType" xml:"DeployType"`
+	SslEndPoint   string `json:"SslEndPoint" xml:"SslEndPoint"`
+	Name          string `json:"Name" xml:"Name"`
+}

+ 21 - 0
services/alikafka/struct_offset_list.go

@@ -0,0 +1,21 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// OffsetList is a nested struct in alikafka response
+type OffsetList struct {
+	OffsetListItem []OffsetListItem `json:"OffsetListItem" xml:"OffsetListItem"`
+}

+ 24 - 0
services/alikafka/struct_offset_list_item.go

@@ -0,0 +1,24 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// OffsetListItem is a nested struct in alikafka response
+type OffsetListItem struct {
+	BrokerOffset   int64 `json:"BrokerOffset" xml:"BrokerOffset"`
+	ConsumerOffset int64 `json:"ConsumerOffset" xml:"ConsumerOffset"`
+	LastTimestamp  int64 `json:"LastTimestamp" xml:"LastTimestamp"`
+	Partition      int   `json:"Partition" xml:"Partition"`
+}

+ 21 - 0
services/alikafka/struct_offset_table.go

@@ -0,0 +1,21 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// OffsetTable is a nested struct in alikafka response
+type OffsetTable struct {
+	OffsetTableItem []OffsetTableItem `json:"OffsetTableItem" xml:"OffsetTableItem"`
+}

+ 25 - 0
services/alikafka/struct_offset_table_item.go

@@ -0,0 +1,25 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// OffsetTableItem is a nested struct in alikafka response
+type OffsetTableItem struct {
+	MinOffset           int64  `json:"MinOffset" xml:"MinOffset"`
+	MaxOffset           int64  `json:"MaxOffset" xml:"MaxOffset"`
+	LastUpdateTimestamp int64  `json:"LastUpdateTimestamp" xml:"LastUpdateTimestamp"`
+	Topic               string `json:"Topic" xml:"Topic"`
+	Partition           int    `json:"Partition" xml:"Partition"`
+}

+ 21 - 0
services/alikafka/struct_topic_list_in_get_consumer_progress.go

@@ -0,0 +1,21 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// TopicListInGetConsumerProgress is a nested struct in alikafka response
+type TopicListInGetConsumerProgress struct {
+	TopicListItem []TopicListItem `json:"TopicListItem" xml:"TopicListItem"`
+}

+ 21 - 0
services/alikafka/struct_topic_list_in_get_topic_list.go

@@ -0,0 +1,21 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// TopicListInGetTopicList is a nested struct in alikafka response
+type TopicListInGetTopicList struct {
+	TopicListItem []TopicListItem `json:"TopicListItem" xml:"TopicListItem"`
+}

+ 33 - 0
services/alikafka/struct_topic_list_item.go

@@ -0,0 +1,33 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// TopicListItem is a nested struct in alikafka response
+type TopicListItem struct {
+	Status        int        `json:"Status" xml:"Status"`
+	TotalDiff     int64      `json:"TotalDiff" xml:"TotalDiff"`
+	Remark        string     `json:"Remark" xml:"Remark"`
+	CreateTime    int64      `json:"CreateTime" xml:"CreateTime"`
+	PartitionNum  int        `json:"PartitionNum" xml:"PartitionNum"`
+	StatusName    string     `json:"StatusName" xml:"StatusName"`
+	RegionId      string     `json:"RegionId" xml:"RegionId"`
+	InstanceId    string     `json:"InstanceId" xml:"InstanceId"`
+	CompactTopic  bool       `json:"CompactTopic" xml:"CompactTopic"`
+	LocalTopic    bool       `json:"LocalTopic" xml:"LocalTopic"`
+	Topic         string     `json:"Topic" xml:"Topic"`
+	LastTimestamp int64      `json:"LastTimestamp" xml:"LastTimestamp"`
+	OffsetList    OffsetList `json:"OffsetList" xml:"OffsetList"`
+}

+ 23 - 0
services/alikafka/struct_topic_status.go

@@ -0,0 +1,23 @@
+package alikafka
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// TopicStatus is a nested struct in alikafka response
+type TopicStatus struct {
+	TotalCount    int64       `json:"TotalCount" xml:"TotalCount"`
+	LastTimeStamp int64       `json:"LastTimeStamp" xml:"LastTimeStamp"`
+	OffsetTable   OffsetTable `json:"OffsetTable" xml:"OffsetTable"`
+}