diff --git a/ChangeLog.txt b/ChangeLog.txt index ede9f2f70..acd35583b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-11-22 Version: v1.63.54 +- Generated 2021-11-11 for `qianzhou`. +undefined + 2024-11-19 Version: v1.63.53 - Generated 2024-11-14 for `AIMath`. - Init. diff --git a/services/qianzhou/ai_create_session_message.go b/services/qianzhou/ai_create_session_message.go new file mode 100644 index 000000000..d91e654cf --- /dev/null +++ b/services/qianzhou/ai_create_session_message.go @@ -0,0 +1,124 @@ +package qianzhou + +//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" +) + +// AICreateSessionMessage invokes the qianzhou.AICreateSessionMessage API synchronously +func (client *Client) AICreateSessionMessage(request *AICreateSessionMessageRequest) (response *AICreateSessionMessageResponse, err error) { + response = CreateAICreateSessionMessageResponse() + err = client.DoAction(request, response) + return +} + +// AICreateSessionMessageWithChan invokes the qianzhou.AICreateSessionMessage API asynchronously +func (client *Client) AICreateSessionMessageWithChan(request *AICreateSessionMessageRequest) (<-chan *AICreateSessionMessageResponse, <-chan error) { + responseChan := make(chan *AICreateSessionMessageResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.AICreateSessionMessage(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// AICreateSessionMessageWithCallback invokes the qianzhou.AICreateSessionMessage API asynchronously +func (client *Client) AICreateSessionMessageWithCallback(request *AICreateSessionMessageRequest, callback func(response *AICreateSessionMessageResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *AICreateSessionMessageResponse + var err error + defer close(result) + response, err = client.AICreateSessionMessage(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// AICreateSessionMessageRequest is the request struct for api AICreateSessionMessage +type AICreateSessionMessageRequest struct { + *requests.RoaRequest + EmployeeId string `position:"Query" name:"employee_id"` + Body AICreateSessionMessageBody `position:"Body" name:"body" type:"Struct"` +} + +// AICreateSessionMessageBody is a repeated param struct in AICreateSessionMessageRequest +type AICreateSessionMessageBody struct { + Context AICreateSessionMessageBodyContext `name:"context" type:"Struct"` + SessionId string `name:"session_id"` + Language string `name:"language"` + Type string `name:"type"` + Message string `name:"message"` +} + +// AICreateSessionMessageBodyContext is a repeated param struct in AICreateSessionMessageRequest +type AICreateSessionMessageBodyContext struct { + ClusterId string `name:"cluster_id"` + Kind string `name:"kind"` + Namespace string `name:"namespace"` + Name string `name:"name"` + Error string `name:"error"` + Uuid string `name:"uuid"` +} + +// AICreateSessionMessageResponse is the response struct for api AICreateSessionMessage +type AICreateSessionMessageResponse struct { + *responses.BaseResponse + Answer string `json:"answer" xml:"answer"` + SessionId string `json:"session_id" xml:"session_id"` + RequestId string `json:"requestId" xml:"requestId"` + Code int64 `json:"code" xml:"code"` + Data string `json:"data" xml:"data"` + Msg string `json:"msg" xml:"msg"` +} + +// CreateAICreateSessionMessageRequest creates a request to invoke AICreateSessionMessage API +func CreateAICreateSessionMessageRequest() (request *AICreateSessionMessageRequest) { + request = &AICreateSessionMessageRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "AICreateSessionMessage", "/popapi/AICreateSessionMessage", "", "") + request.Method = requests.POST + return +} + +// CreateAICreateSessionMessageResponse creates a response to parse from AICreateSessionMessage response +func CreateAICreateSessionMessageResponse() (response *AICreateSessionMessageResponse) { + response = &AICreateSessionMessageResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/client.go b/services/qianzhou/client.go new file mode 100644 index 000000000..24c717982 --- /dev/null +++ b/services/qianzhou/client.go @@ -0,0 +1,104 @@ +package qianzhou + +//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" + "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 +} + +// NewClient creates a sdk client with environment variables +func NewClient() (client *Client, err error) { + client = &Client{} + err = client.Init() + 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) + 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) + 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) + 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) + 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) + 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) + 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) + 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) + return +} diff --git a/services/qianzhou/create_diagnosis.go b/services/qianzhou/create_diagnosis.go new file mode 100644 index 000000000..2069f3bc6 --- /dev/null +++ b/services/qianzhou/create_diagnosis.go @@ -0,0 +1,103 @@ +package qianzhou + +//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" +) + +// CreateDiagnosis invokes the qianzhou.CreateDiagnosis API synchronously +func (client *Client) CreateDiagnosis(request *CreateDiagnosisRequest) (response *CreateDiagnosisResponse, err error) { + response = CreateCreateDiagnosisResponse() + err = client.DoAction(request, response) + return +} + +// CreateDiagnosisWithChan invokes the qianzhou.CreateDiagnosis API asynchronously +func (client *Client) CreateDiagnosisWithChan(request *CreateDiagnosisRequest) (<-chan *CreateDiagnosisResponse, <-chan error) { + responseChan := make(chan *CreateDiagnosisResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateDiagnosis(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateDiagnosisWithCallback invokes the qianzhou.CreateDiagnosis API asynchronously +func (client *Client) CreateDiagnosisWithCallback(request *CreateDiagnosisRequest, callback func(response *CreateDiagnosisResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateDiagnosisResponse + var err error + defer close(result) + response, err = client.CreateDiagnosis(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateDiagnosisRequest is the request struct for api CreateDiagnosis +type CreateDiagnosisRequest struct { + *requests.RoaRequest + DiagnosisType string `position:"Query" name:"diagnosisType"` + ClusterID string `position:"Query" name:"clusterID"` + Body string `position:"Body" name:"body"` +} + +// CreateDiagnosisResponse is the response struct for api CreateDiagnosis +type CreateDiagnosisResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` + Code int64 `json:"code" xml:"code"` + Data string `json:"data" xml:"data"` +} + +// CreateCreateDiagnosisRequest creates a request to invoke CreateDiagnosis API +func CreateCreateDiagnosisRequest() (request *CreateDiagnosisRequest) { + request = &CreateDiagnosisRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "CreateDiagnosis", "/popapi/createDiagnosis", "", "") + request.Method = requests.POST + return +} + +// CreateCreateDiagnosisResponse creates a response to parse from CreateDiagnosis response +func CreateCreateDiagnosisResponse() (response *CreateDiagnosisResponse) { + response = &CreateDiagnosisResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/get_cluster.go b/services/qianzhou/get_cluster.go new file mode 100644 index 000000000..567c8149c --- /dev/null +++ b/services/qianzhou/get_cluster.go @@ -0,0 +1,100 @@ +package qianzhou + +//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" +) + +// GetCluster invokes the qianzhou.GetCluster API synchronously +func (client *Client) GetCluster(request *GetClusterRequest) (response *GetClusterResponse, err error) { + response = CreateGetClusterResponse() + err = client.DoAction(request, response) + return +} + +// GetClusterWithChan invokes the qianzhou.GetCluster API asynchronously +func (client *Client) GetClusterWithChan(request *GetClusterRequest) (<-chan *GetClusterResponse, <-chan error) { + responseChan := make(chan *GetClusterResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetCluster(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetClusterWithCallback invokes the qianzhou.GetCluster API asynchronously +func (client *Client) GetClusterWithCallback(request *GetClusterRequest, callback func(response *GetClusterResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetClusterResponse + var err error + defer close(result) + response, err = client.GetCluster(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetClusterRequest is the request struct for api GetCluster +type GetClusterRequest struct { + *requests.RoaRequest + ClusterID string `position:"Query" name:"clusterID"` +} + +// GetClusterResponse is the response struct for api GetCluster +type GetClusterResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` + Data Data `json:"data" xml:"data"` +} + +// CreateGetClusterRequest creates a request to invoke GetCluster API +func CreateGetClusterRequest() (request *GetClusterRequest) { + request = &GetClusterRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "GetCluster", "/popapi/getCluster", "", "") + request.Method = requests.GET + return +} + +// CreateGetClusterResponse creates a response to parse from GetCluster response +func CreateGetClusterResponse() (response *GetClusterResponse) { + response = &GetClusterResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/get_cluster_warning.go b/services/qianzhou/get_cluster_warning.go new file mode 100644 index 000000000..b393ef5f5 --- /dev/null +++ b/services/qianzhou/get_cluster_warning.go @@ -0,0 +1,99 @@ +package qianzhou + +//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" +) + +// GetClusterWarning invokes the qianzhou.GetClusterWarning API synchronously +func (client *Client) GetClusterWarning(request *GetClusterWarningRequest) (response *GetClusterWarningResponse, err error) { + response = CreateGetClusterWarningResponse() + err = client.DoAction(request, response) + return +} + +// GetClusterWarningWithChan invokes the qianzhou.GetClusterWarning API asynchronously +func (client *Client) GetClusterWarningWithChan(request *GetClusterWarningRequest) (<-chan *GetClusterWarningResponse, <-chan error) { + responseChan := make(chan *GetClusterWarningResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetClusterWarning(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetClusterWarningWithCallback invokes the qianzhou.GetClusterWarning API asynchronously +func (client *Client) GetClusterWarningWithCallback(request *GetClusterWarningRequest, callback func(response *GetClusterWarningResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetClusterWarningResponse + var err error + defer close(result) + response, err = client.GetClusterWarning(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetClusterWarningRequest is the request struct for api GetClusterWarning +type GetClusterWarningRequest struct { + *requests.RoaRequest + ClusterID string `position:"Query" name:"clusterID"` +} + +// GetClusterWarningResponse is the response struct for api GetClusterWarning +type GetClusterWarningResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` +} + +// CreateGetClusterWarningRequest creates a request to invoke GetClusterWarning API +func CreateGetClusterWarningRequest() (request *GetClusterWarningRequest) { + request = &GetClusterWarningRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "GetClusterWarning", "/popapi/getKeyClusterWarningList", "", "") + request.Method = requests.GET + return +} + +// CreateGetClusterWarningResponse creates a response to parse from GetClusterWarning response +func CreateGetClusterWarningResponse() (response *GetClusterWarningResponse) { + response = &GetClusterWarningResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/get_diagnosis_result.go b/services/qianzhou/get_diagnosis_result.go new file mode 100644 index 000000000..ab98789bb --- /dev/null +++ b/services/qianzhou/get_diagnosis_result.go @@ -0,0 +1,103 @@ +package qianzhou + +//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" +) + +// GetDiagnosisResult invokes the qianzhou.GetDiagnosisResult API synchronously +func (client *Client) GetDiagnosisResult(request *GetDiagnosisResultRequest) (response *GetDiagnosisResultResponse, err error) { + response = CreateGetDiagnosisResultResponse() + err = client.DoAction(request, response) + return +} + +// GetDiagnosisResultWithChan invokes the qianzhou.GetDiagnosisResult API asynchronously +func (client *Client) GetDiagnosisResultWithChan(request *GetDiagnosisResultRequest) (<-chan *GetDiagnosisResultResponse, <-chan error) { + responseChan := make(chan *GetDiagnosisResultResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetDiagnosisResult(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetDiagnosisResultWithCallback invokes the qianzhou.GetDiagnosisResult API asynchronously +func (client *Client) GetDiagnosisResultWithCallback(request *GetDiagnosisResultRequest, callback func(response *GetDiagnosisResultResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetDiagnosisResultResponse + var err error + defer close(result) + response, err = client.GetDiagnosisResult(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetDiagnosisResultRequest is the request struct for api GetDiagnosisResult +type GetDiagnosisResultRequest struct { + *requests.RoaRequest + DiagnosisId string `position:"Query" name:"diagnosisId"` + OwnerUid string `position:"Query" name:"ownerUid"` +} + +// GetDiagnosisResultResponse is the response struct for api GetDiagnosisResult +type GetDiagnosisResultResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` + Data string `json:"data" xml:"data"` + Code string `json:"code" xml:"code"` + Msg string `json:"msg" xml:"msg"` +} + +// CreateGetDiagnosisResultRequest creates a request to invoke GetDiagnosisResult API +func CreateGetDiagnosisResultRequest() (request *GetDiagnosisResultRequest) { + request = &GetDiagnosisResultRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "GetDiagnosisResult", "/popapi/GetDiagnosisResult", "", "") + request.Method = requests.GET + return +} + +// CreateGetDiagnosisResultResponse creates a response to parse from GetDiagnosisResult response +func CreateGetDiagnosisResultResponse() (response *GetDiagnosisResultResponse) { + response = &GetDiagnosisResultResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/get_user_cluster_warning.go b/services/qianzhou/get_user_cluster_warning.go new file mode 100644 index 000000000..825025b83 --- /dev/null +++ b/services/qianzhou/get_user_cluster_warning.go @@ -0,0 +1,99 @@ +package qianzhou + +//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" +) + +// GetUserClusterWarning invokes the qianzhou.GetUserClusterWarning API synchronously +func (client *Client) GetUserClusterWarning(request *GetUserClusterWarningRequest) (response *GetUserClusterWarningResponse, err error) { + response = CreateGetUserClusterWarningResponse() + err = client.DoAction(request, response) + return +} + +// GetUserClusterWarningWithChan invokes the qianzhou.GetUserClusterWarning API asynchronously +func (client *Client) GetUserClusterWarningWithChan(request *GetUserClusterWarningRequest) (<-chan *GetUserClusterWarningResponse, <-chan error) { + responseChan := make(chan *GetUserClusterWarningResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetUserClusterWarning(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetUserClusterWarningWithCallback invokes the qianzhou.GetUserClusterWarning API asynchronously +func (client *Client) GetUserClusterWarningWithCallback(request *GetUserClusterWarningRequest, callback func(response *GetUserClusterWarningResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetUserClusterWarningResponse + var err error + defer close(result) + response, err = client.GetUserClusterWarning(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetUserClusterWarningRequest is the request struct for api GetUserClusterWarning +type GetUserClusterWarningRequest struct { + *requests.RoaRequest + UserID string `position:"Query" name:"userID"` +} + +// GetUserClusterWarningResponse is the response struct for api GetUserClusterWarning +type GetUserClusterWarningResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` +} + +// CreateGetUserClusterWarningRequest creates a request to invoke GetUserClusterWarning API +func CreateGetUserClusterWarningRequest() (request *GetUserClusterWarningRequest) { + request = &GetUserClusterWarningRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "GetUserClusterWarning", "/popapi/listUserKeyClusters", "", "") + request.Method = requests.GET + return +} + +// CreateGetUserClusterWarningResponse creates a response to parse from GetUserClusterWarning response +func CreateGetUserClusterWarningResponse() (response *GetUserClusterWarningResponse) { + response = &GetUserClusterWarningResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/get_webshell_token.go b/services/qianzhou/get_webshell_token.go new file mode 100644 index 000000000..b30a8608e --- /dev/null +++ b/services/qianzhou/get_webshell_token.go @@ -0,0 +1,98 @@ +package qianzhou + +//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" +) + +// GetWebshellToken invokes the qianzhou.GetWebshellToken API synchronously +func (client *Client) GetWebshellToken(request *GetWebshellTokenRequest) (response *GetWebshellTokenResponse, err error) { + response = CreateGetWebshellTokenResponse() + err = client.DoAction(request, response) + return +} + +// GetWebshellTokenWithChan invokes the qianzhou.GetWebshellToken API asynchronously +func (client *Client) GetWebshellTokenWithChan(request *GetWebshellTokenRequest) (<-chan *GetWebshellTokenResponse, <-chan error) { + responseChan := make(chan *GetWebshellTokenResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetWebshellToken(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetWebshellTokenWithCallback invokes the qianzhou.GetWebshellToken API asynchronously +func (client *Client) GetWebshellTokenWithCallback(request *GetWebshellTokenRequest, callback func(response *GetWebshellTokenResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetWebshellTokenResponse + var err error + defer close(result) + response, err = client.GetWebshellToken(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetWebshellTokenRequest is the request struct for api GetWebshellToken +type GetWebshellTokenRequest struct { + *requests.RoaRequest +} + +// GetWebshellTokenResponse is the response struct for api GetWebshellToken +type GetWebshellTokenResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` +} + +// CreateGetWebshellTokenRequest creates a request to invoke GetWebshellToken API +func CreateGetWebshellTokenRequest() (request *GetWebshellTokenRequest) { + request = &GetWebshellTokenRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "GetWebshellToken", "/popapi/getChorusToken", "", "") + request.Method = requests.GET + return +} + +// CreateGetWebshellTokenResponse creates a response to parse from GetWebshellToken response +func CreateGetWebshellTokenResponse() (response *GetWebshellTokenResponse) { + response = &GetWebshellTokenResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/hello.go b/services/qianzhou/hello.go new file mode 100644 index 000000000..490418045 --- /dev/null +++ b/services/qianzhou/hello.go @@ -0,0 +1,102 @@ +package qianzhou + +//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" +) + +// Hello invokes the qianzhou.Hello API synchronously +func (client *Client) Hello(request *HelloRequest) (response *HelloResponse, err error) { + response = CreateHelloResponse() + err = client.DoAction(request, response) + return +} + +// HelloWithChan invokes the qianzhou.Hello API asynchronously +func (client *Client) HelloWithChan(request *HelloRequest) (<-chan *HelloResponse, <-chan error) { + responseChan := make(chan *HelloResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.Hello(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// HelloWithCallback invokes the qianzhou.Hello API asynchronously +func (client *Client) HelloWithCallback(request *HelloRequest, callback func(response *HelloResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *HelloResponse + var err error + defer close(result) + response, err = client.Hello(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// HelloRequest is the request struct for api Hello +type HelloRequest struct { + *requests.RoaRequest + User string `position:"Query" name:"user"` +} + +// HelloResponse is the response struct for api Hello +type HelloResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` + Code string `json:"code" xml:"code"` + Msg string `json:"msg" xml:"msg"` + Data Data `json:"data" xml:"data"` +} + +// CreateHelloRequest creates a request to invoke Hello API +func CreateHelloRequest() (request *HelloRequest) { + request = &HelloRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "Hello", "/popapi/hello", "", "") + request.Method = requests.GET + return +} + +// CreateHelloResponse creates a response to parse from Hello response +func CreateHelloResponse() (response *HelloResponse) { + response = &HelloResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/list_cluster_deprecated_api.go b/services/qianzhou/list_cluster_deprecated_api.go new file mode 100644 index 000000000..d48ad2861 --- /dev/null +++ b/services/qianzhou/list_cluster_deprecated_api.go @@ -0,0 +1,105 @@ +package qianzhou + +//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" +) + +// ListClusterDeprecatedAPI invokes the qianzhou.ListClusterDeprecatedAPI API synchronously +func (client *Client) ListClusterDeprecatedAPI(request *ListClusterDeprecatedAPIRequest) (response *ListClusterDeprecatedAPIResponse, err error) { + response = CreateListClusterDeprecatedAPIResponse() + err = client.DoAction(request, response) + return +} + +// ListClusterDeprecatedAPIWithChan invokes the qianzhou.ListClusterDeprecatedAPI API asynchronously +func (client *Client) ListClusterDeprecatedAPIWithChan(request *ListClusterDeprecatedAPIRequest) (<-chan *ListClusterDeprecatedAPIResponse, <-chan error) { + responseChan := make(chan *ListClusterDeprecatedAPIResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListClusterDeprecatedAPI(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListClusterDeprecatedAPIWithCallback invokes the qianzhou.ListClusterDeprecatedAPI API asynchronously +func (client *Client) ListClusterDeprecatedAPIWithCallback(request *ListClusterDeprecatedAPIRequest, callback func(response *ListClusterDeprecatedAPIResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListClusterDeprecatedAPIResponse + var err error + defer close(result) + response, err = client.ListClusterDeprecatedAPI(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListClusterDeprecatedAPIRequest is the request struct for api ListClusterDeprecatedAPI +type ListClusterDeprecatedAPIRequest struct { + *requests.RoaRequest + ClusterId string `position:"Query" name:"cluster_id"` + PageNo requests.Integer `position:"Query" name:"page_no"` + TargetVersion string `position:"Query" name:"target_version"` + PageSize requests.Integer `position:"Query" name:"page_size"` +} + +// ListClusterDeprecatedAPIResponse is the response struct for api ListClusterDeprecatedAPI +type ListClusterDeprecatedAPIResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` + Code int `json:"code" xml:"code"` + Msg string `json:"msg" xml:"msg"` + Datas Datas `json:"datas" xml:"datas"` +} + +// CreateListClusterDeprecatedAPIRequest creates a request to invoke ListClusterDeprecatedAPI API +func CreateListClusterDeprecatedAPIRequest() (request *ListClusterDeprecatedAPIRequest) { + request = &ListClusterDeprecatedAPIRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "ListClusterDeprecatedAPI", "/popapi/listDeprecatedK8sAPI", "", "") + request.Method = requests.POST + return +} + +// CreateListClusterDeprecatedAPIResponse creates a response to parse from ListClusterDeprecatedAPI response +func CreateListClusterDeprecatedAPIResponse() (response *ListClusterDeprecatedAPIResponse) { + response = &ListClusterDeprecatedAPIResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/list_cluster_images.go b/services/qianzhou/list_cluster_images.go new file mode 100644 index 000000000..f7d8a20d3 --- /dev/null +++ b/services/qianzhou/list_cluster_images.go @@ -0,0 +1,107 @@ +package qianzhou + +//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" +) + +// ListClusterImages invokes the qianzhou.ListClusterImages API synchronously +func (client *Client) ListClusterImages(request *ListClusterImagesRequest) (response *ListClusterImagesResponse, err error) { + response = CreateListClusterImagesResponse() + err = client.DoAction(request, response) + return +} + +// ListClusterImagesWithChan invokes the qianzhou.ListClusterImages API asynchronously +func (client *Client) ListClusterImagesWithChan(request *ListClusterImagesRequest) (<-chan *ListClusterImagesResponse, <-chan error) { + responseChan := make(chan *ListClusterImagesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListClusterImages(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListClusterImagesWithCallback invokes the qianzhou.ListClusterImages API asynchronously +func (client *Client) ListClusterImagesWithCallback(request *ListClusterImagesRequest, callback func(response *ListClusterImagesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListClusterImagesResponse + var err error + defer close(result) + response, err = client.ListClusterImages(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListClusterImagesRequest is the request struct for api ListClusterImages +type ListClusterImagesRequest struct { + *requests.RoaRequest + ImageName string `position:"Query" name:"image_name"` + Uid string `position:"Query" name:"uid"` + ClusterId string `position:"Query" name:"cluster_id"` + ImageHash string `position:"Query" name:"image_hash"` + PageNo requests.Integer `position:"Query" name:"page_no"` + PageSize requests.Integer `position:"Query" name:"page_size"` +} + +// ListClusterImagesResponse is the response struct for api ListClusterImages +type ListClusterImagesResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` + Code int `json:"code" xml:"code"` + Msg string `json:"msg" xml:"msg"` + Datas Datas `json:"datas" xml:"datas"` +} + +// CreateListClusterImagesRequest creates a request to invoke ListClusterImages API +func CreateListClusterImagesRequest() (request *ListClusterImagesRequest) { + request = &ListClusterImagesRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "ListClusterImages", "/popapi/listClusterPodImages", "", "") + request.Method = requests.POST + return +} + +// CreateListClusterImagesResponse creates a response to parse from ListClusterImages response +func CreateListClusterImagesResponse() (response *ListClusterImagesResponse) { + response = &ListClusterImagesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/list_user_clusters.go b/services/qianzhou/list_user_clusters.go new file mode 100644 index 000000000..794ba47c1 --- /dev/null +++ b/services/qianzhou/list_user_clusters.go @@ -0,0 +1,104 @@ +package qianzhou + +//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" +) + +// ListUserClusters invokes the qianzhou.ListUserClusters API synchronously +func (client *Client) ListUserClusters(request *ListUserClustersRequest) (response *ListUserClustersResponse, err error) { + response = CreateListUserClustersResponse() + err = client.DoAction(request, response) + return +} + +// ListUserClustersWithChan invokes the qianzhou.ListUserClusters API asynchronously +func (client *Client) ListUserClustersWithChan(request *ListUserClustersRequest) (<-chan *ListUserClustersResponse, <-chan error) { + responseChan := make(chan *ListUserClustersResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListUserClusters(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListUserClustersWithCallback invokes the qianzhou.ListUserClusters API asynchronously +func (client *Client) ListUserClustersWithCallback(request *ListUserClustersRequest, callback func(response *ListUserClustersResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListUserClustersResponse + var err error + defer close(result) + response, err = client.ListUserClusters(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListUserClustersRequest is the request struct for api ListUserClusters +type ListUserClustersRequest struct { + *requests.RoaRequest + Current string `position:"Query" name:"current"` + PageSize string `position:"Query" name:"pageSize"` + UserID string `position:"Query" name:"userID"` +} + +// ListUserClustersResponse is the response struct for api ListUserClusters +type ListUserClustersResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` + Msg string `json:"msg" xml:"msg"` + Data string `json:"data" xml:"data"` + Code int64 `json:"code" xml:"code"` +} + +// CreateListUserClustersRequest creates a request to invoke ListUserClusters API +func CreateListUserClustersRequest() (request *ListUserClustersRequest) { + request = &ListUserClustersRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "ListUserClusters", "/popapi/listUserClusters", "", "") + request.Method = requests.GET + return +} + +// CreateListUserClustersResponse creates a response to parse from ListUserClusters response +func CreateListUserClustersResponse() (response *ListUserClustersResponse) { + response = &ListUserClustersResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/query_by_instance_info.go b/services/qianzhou/query_by_instance_info.go new file mode 100644 index 000000000..887f84957 --- /dev/null +++ b/services/qianzhou/query_by_instance_info.go @@ -0,0 +1,102 @@ +package qianzhou + +//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" +) + +// QueryByInstanceInfo invokes the qianzhou.QueryByInstanceInfo API synchronously +func (client *Client) QueryByInstanceInfo(request *QueryByInstanceInfoRequest) (response *QueryByInstanceInfoResponse, err error) { + response = CreateQueryByInstanceInfoResponse() + err = client.DoAction(request, response) + return +} + +// QueryByInstanceInfoWithChan invokes the qianzhou.QueryByInstanceInfo API asynchronously +func (client *Client) QueryByInstanceInfoWithChan(request *QueryByInstanceInfoRequest) (<-chan *QueryByInstanceInfoResponse, <-chan error) { + responseChan := make(chan *QueryByInstanceInfoResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryByInstanceInfo(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryByInstanceInfoWithCallback invokes the qianzhou.QueryByInstanceInfo API asynchronously +func (client *Client) QueryByInstanceInfoWithCallback(request *QueryByInstanceInfoRequest, callback func(response *QueryByInstanceInfoResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryByInstanceInfoResponse + var err error + defer close(result) + response, err = client.QueryByInstanceInfo(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryByInstanceInfoRequest is the request struct for api QueryByInstanceInfo +type QueryByInstanceInfoRequest struct { + *requests.RoaRequest + Body string `position:"Body" name:"body"` +} + +// QueryByInstanceInfoResponse is the response struct for api QueryByInstanceInfo +type QueryByInstanceInfoResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` + Code int `json:"code" xml:"code"` + Msg string `json:"msg" xml:"msg"` + Data []DataItem `json:"data" xml:"data"` +} + +// CreateQueryByInstanceInfoRequest creates a request to invoke QueryByInstanceInfo API +func CreateQueryByInstanceInfoRequest() (request *QueryByInstanceInfoRequest) { + request = &QueryByInstanceInfoRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "QueryByInstanceInfo", "/popapi/queryByInstanceInfo", "", "") + request.Method = requests.POST + return +} + +// CreateQueryByInstanceInfoResponse creates a response to parse from QueryByInstanceInfo response +func CreateQueryByInstanceInfoResponse() (response *QueryByInstanceInfoResponse) { + response = &QueryByInstanceInfoResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/query_node_info.go b/services/qianzhou/query_node_info.go new file mode 100644 index 000000000..6e8ba55c2 --- /dev/null +++ b/services/qianzhou/query_node_info.go @@ -0,0 +1,102 @@ +package qianzhou + +//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" +) + +// QueryNodeInfo invokes the qianzhou.QueryNodeInfo API synchronously +func (client *Client) QueryNodeInfo(request *QueryNodeInfoRequest) (response *QueryNodeInfoResponse, err error) { + response = CreateQueryNodeInfoResponse() + err = client.DoAction(request, response) + return +} + +// QueryNodeInfoWithChan invokes the qianzhou.QueryNodeInfo API asynchronously +func (client *Client) QueryNodeInfoWithChan(request *QueryNodeInfoRequest) (<-chan *QueryNodeInfoResponse, <-chan error) { + responseChan := make(chan *QueryNodeInfoResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryNodeInfo(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryNodeInfoWithCallback invokes the qianzhou.QueryNodeInfo API asynchronously +func (client *Client) QueryNodeInfoWithCallback(request *QueryNodeInfoRequest, callback func(response *QueryNodeInfoResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryNodeInfoResponse + var err error + defer close(result) + response, err = client.QueryNodeInfo(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryNodeInfoRequest is the request struct for api QueryNodeInfo +type QueryNodeInfoRequest struct { + *requests.RoaRequest + InstanceId string `position:"Query" name:"instanceId"` +} + +// QueryNodeInfoResponse is the response struct for api QueryNodeInfo +type QueryNodeInfoResponse struct { + *responses.BaseResponse + RequestId string `json:"requestId" xml:"requestId"` + Code int `json:"code" xml:"code"` + Msg string `json:"msg" xml:"msg"` + Data []DataItem `json:"data" xml:"data"` +} + +// CreateQueryNodeInfoRequest creates a request to invoke QueryNodeInfo API +func CreateQueryNodeInfoRequest() (request *QueryNodeInfoRequest) { + request = &QueryNodeInfoRequest{ + RoaRequest: &requests.RoaRequest{}, + } + request.InitWithApiInfo("qianzhou", "2021-11-11", "QueryNodeInfo", "/popapi/queryByInstanceId", "", "") + request.Method = requests.GET + return +} + +// CreateQueryNodeInfoResponse creates a response to parse from QueryNodeInfo response +func CreateQueryNodeInfoResponse() (response *QueryNodeInfoResponse) { + response = &QueryNodeInfoResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/qianzhou/struct_data.go b/services/qianzhou/struct_data.go new file mode 100644 index 000000000..3402f1d75 --- /dev/null +++ b/services/qianzhou/struct_data.go @@ -0,0 +1,32 @@ +package qianzhou + +//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. + +// Data is a nested struct in qianzhou response +type Data struct { + ClusterID string `json:"clusterID" xml:"clusterID"` + UserID string `json:"userID" xml:"userID"` + CurrentVersion string `json:"currentVersion" xml:"currentVersion"` + RegionID string `json:"regionID" xml:"regionID"` + Profile string `json:"profile" xml:"profile"` + Date string `json:"date" xml:"date"` + State string `json:"state" xml:"state"` + Spec string `json:"spec" xml:"spec"` + Success bool `json:"success" xml:"success"` + SecurityGroupId string `json:"securityGroupId" xml:"securityGroupId"` + ClusterType string `json:"clusterType" xml:"clusterType"` + Name string `json:"name" xml:"name"` +} diff --git a/services/qianzhou/struct_data_in_list_cluster_deprecated_api.go b/services/qianzhou/struct_data_in_list_cluster_deprecated_api.go new file mode 100644 index 000000000..3f1d651d1 --- /dev/null +++ b/services/qianzhou/struct_data_in_list_cluster_deprecated_api.go @@ -0,0 +1,21 @@ +package qianzhou + +//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. + +// DataInListClusterDeprecatedAPI is a nested struct in qianzhou response +type DataInListClusterDeprecatedAPI struct { + DataItem []DataItem `json:"data" xml:"data"` +} diff --git a/services/qianzhou/struct_data_in_list_cluster_images.go b/services/qianzhou/struct_data_in_list_cluster_images.go new file mode 100644 index 000000000..7b1f2bdbc --- /dev/null +++ b/services/qianzhou/struct_data_in_list_cluster_images.go @@ -0,0 +1,21 @@ +package qianzhou + +//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. + +// DataInListClusterImages is a nested struct in qianzhou response +type DataInListClusterImages struct { + DataItem []DataItem `json:"data" xml:"data"` +} diff --git a/services/qianzhou/struct_data_in_query_by_instance_info.go b/services/qianzhou/struct_data_in_query_by_instance_info.go new file mode 100644 index 000000000..0a04b0e19 --- /dev/null +++ b/services/qianzhou/struct_data_in_query_by_instance_info.go @@ -0,0 +1,21 @@ +package qianzhou + +//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. + +// DataInQueryByInstanceInfo is a nested struct in qianzhou response +type DataInQueryByInstanceInfo struct { + DataItem []DataItem `json:"data" xml:"data"` +} diff --git a/services/qianzhou/struct_data_in_query_node_info.go b/services/qianzhou/struct_data_in_query_node_info.go new file mode 100644 index 000000000..9e1561366 --- /dev/null +++ b/services/qianzhou/struct_data_in_query_node_info.go @@ -0,0 +1,21 @@ +package qianzhou + +//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. + +// DataInQueryNodeInfo is a nested struct in qianzhou response +type DataInQueryNodeInfo struct { + DataItem []DataItem `json:"data" xml:"data"` +} diff --git a/services/qianzhou/struct_data_item.go b/services/qianzhou/struct_data_item.go new file mode 100644 index 000000000..92e9acefc --- /dev/null +++ b/services/qianzhou/struct_data_item.go @@ -0,0 +1,45 @@ +package qianzhou + +//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. + +// DataItem is a nested struct in qianzhou response +type DataItem struct { + ClusterId string `json:"clusterId" xml:"clusterId"` + ImageHash string `json:"image_hash" xml:"image_hash"` + DeprecatedK8sVersion string `json:"deprecated_k8s_version" xml:"deprecated_k8s_version"` + SourceIps string `json:"source_ips" xml:"source_ips"` + CurrentVersion string `json:"current_version" xml:"current_version"` + RequestUri string `json:"request_uri" xml:"request_uri"` + ImageName string `json:"image_name" xml:"image_name"` + Namespace string `json:"namespace" xml:"namespace"` + Label string `json:"label" xml:"label"` + Uid string `json:"uid" xml:"uid"` + ControllerType string `json:"controller_type" xml:"controller_type"` + Updated string `json:"updated" xml:"updated"` + TargetVersion string `json:"target_version" xml:"target_version"` + LastTime string `json:"last_time" xml:"last_time"` + ControllerName string `json:"controller_name" xml:"controller_name"` + Content string `json:"content" xml:"content"` + RegionId string `json:"regionId" xml:"regionId"` + InstanceId string `json:"instanceId" xml:"instanceId"` + Count int `json:"count" xml:"count"` + Created string `json:"created" xml:"created"` + ClusterName string `json:"clusterName" xml:"clusterName"` + Region string `json:"region" xml:"region"` + Ds string `json:"ds" xml:"ds"` + CluserName string `json:"cluserName" xml:"cluserName"` + UserAgent string `json:"user_agent" xml:"user_agent"` +} diff --git a/services/qianzhou/struct_datas.go b/services/qianzhou/struct_datas.go new file mode 100644 index 000000000..998444b5b --- /dev/null +++ b/services/qianzhou/struct_datas.go @@ -0,0 +1,24 @@ +package qianzhou + +//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. + +// Datas is a nested struct in qianzhou response +type Datas struct { + Current int `json:"current" xml:"current"` + Total int `json:"total" xml:"total"` + PageSize int `json:"pageSize" xml:"pageSize"` + Data []DataItem `json:"data" xml:"data"` +}