From 6e81da001aca3593455fe2802efc6d59d130494e Mon Sep 17 00:00:00 2001 From: sdk-team Date: Sun, 26 Apr 2020 16:17:38 +0800 Subject: [PATCH] Generated 2020-03-26 for Workorder. --- ChangeLog.txt | 4 + services/workorder/client.go | 129 ++++++++++++++++++ services/workorder/close_ticket.go | 107 +++++++++++++++ services/workorder/create_ticket.go | 115 ++++++++++++++++ services/workorder/endpoint.go | 23 ++++ services/workorder/list_categories.go | 108 +++++++++++++++ services/workorder/list_products.go | 107 +++++++++++++++ services/workorder/list_ticket_notes.go | 108 +++++++++++++++ services/workorder/list_tickets.go | 115 ++++++++++++++++ services/workorder/reply_ticket.go | 109 +++++++++++++++ .../workorder/struct_consultation_more.go | 21 +++ .../struct_consultation_more_item.go | 23 ++++ services/workorder/struct_data.go | 28 ++++ services/workorder/struct_hot_consultation.go | 21 +++ .../workorder/struct_hot_consultation_item.go | 23 ++++ services/workorder/struct_hot_tech.go | 21 +++ services/workorder/struct_hot_tech_item.go | 23 ++++ .../struct_list_in_list_categories.go | 21 +++ .../struct_list_in_list_ticket_notes.go | 21 +++ .../workorder/struct_list_in_list_tickets.go | 21 +++ services/workorder/struct_list_item.go | 26 ++++ .../struct_list_item_in_list_tickets.go | 25 ++++ services/workorder/struct_product_list.go | 21 +++ .../workorder/struct_product_list_item.go | 23 ++++ services/workorder/struct_tech_more.go | 21 +++ services/workorder/struct_tech_more_item.go | 22 +++ 26 files changed, 1286 insertions(+) create mode 100644 services/workorder/client.go create mode 100644 services/workorder/close_ticket.go create mode 100644 services/workorder/create_ticket.go create mode 100644 services/workorder/endpoint.go create mode 100644 services/workorder/list_categories.go create mode 100644 services/workorder/list_products.go create mode 100644 services/workorder/list_ticket_notes.go create mode 100644 services/workorder/list_tickets.go create mode 100644 services/workorder/reply_ticket.go create mode 100644 services/workorder/struct_consultation_more.go create mode 100644 services/workorder/struct_consultation_more_item.go create mode 100644 services/workorder/struct_data.go create mode 100644 services/workorder/struct_hot_consultation.go create mode 100644 services/workorder/struct_hot_consultation_item.go create mode 100644 services/workorder/struct_hot_tech.go create mode 100644 services/workorder/struct_hot_tech_item.go create mode 100644 services/workorder/struct_list_in_list_categories.go create mode 100644 services/workorder/struct_list_in_list_ticket_notes.go create mode 100644 services/workorder/struct_list_in_list_tickets.go create mode 100644 services/workorder/struct_list_item.go create mode 100644 services/workorder/struct_list_item_in_list_tickets.go create mode 100644 services/workorder/struct_product_list.go create mode 100644 services/workorder/struct_product_list_item.go create mode 100644 services/workorder/struct_tech_more.go create mode 100644 services/workorder/struct_tech_more_item.go diff --git a/ChangeLog.txt b/ChangeLog.txt index ecf8f65517..62ad205ee5 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2020-04-26 Version: v1.61.143 +- Generated 2020-03-26 for `Workorder`. +- New api publish. + 2020-04-25 Version: v1.61.142 - Generated 2015-01-01 for `R-kvstore`. - Generated 2015-01-01 for `R-kvstore`. diff --git a/services/workorder/client.go b/services/workorder/client.go new file mode 100644 index 0000000000..73e8d352cd --- /dev/null +++ b/services/workorder/client.go @@ -0,0 +1,129 @@ +package workorder + +//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 +} diff --git a/services/workorder/close_ticket.go b/services/workorder/close_ticket.go new file mode 100644 index 0000000000..70ac043844 --- /dev/null +++ b/services/workorder/close_ticket.go @@ -0,0 +1,107 @@ +package workorder + +//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" +) + +// CloseTicket invokes the workorder.CloseTicket API synchronously +// api document: https://help.aliyun.com/api/workorder/closeticket.html +func (client *Client) CloseTicket(request *CloseTicketRequest) (response *CloseTicketResponse, err error) { + response = CreateCloseTicketResponse() + err = client.DoAction(request, response) + return +} + +// CloseTicketWithChan invokes the workorder.CloseTicket API asynchronously +// api document: https://help.aliyun.com/api/workorder/closeticket.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CloseTicketWithChan(request *CloseTicketRequest) (<-chan *CloseTicketResponse, <-chan error) { + responseChan := make(chan *CloseTicketResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CloseTicket(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CloseTicketWithCallback invokes the workorder.CloseTicket API asynchronously +// api document: https://help.aliyun.com/api/workorder/closeticket.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CloseTicketWithCallback(request *CloseTicketRequest, callback func(response *CloseTicketResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CloseTicketResponse + var err error + defer close(result) + response, err = client.CloseTicket(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CloseTicketRequest is the request struct for api CloseTicket +type CloseTicketRequest struct { + *requests.RpcRequest + Language string `position:"Query" name:"Language"` + TicketId string `position:"Query" name:"TicketId"` +} + +// CloseTicketResponse is the response struct for api CloseTicket +type CloseTicketResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateCloseTicketRequest creates a request to invoke CloseTicket API +func CreateCloseTicketRequest() (request *CloseTicketRequest) { + request = &CloseTicketRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Workorder", "2020-03-26", "CloseTicket", "workorder", "openAPI") + return +} + +// CreateCloseTicketResponse creates a response to parse from CloseTicket response +func CreateCloseTicketResponse() (response *CloseTicketResponse) { + response = &CloseTicketResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/workorder/create_ticket.go b/services/workorder/create_ticket.go new file mode 100644 index 0000000000..33fedf8f34 --- /dev/null +++ b/services/workorder/create_ticket.go @@ -0,0 +1,115 @@ +package workorder + +//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" +) + +// CreateTicket invokes the workorder.CreateTicket API synchronously +// api document: https://help.aliyun.com/api/workorder/createticket.html +func (client *Client) CreateTicket(request *CreateTicketRequest) (response *CreateTicketResponse, err error) { + response = CreateCreateTicketResponse() + err = client.DoAction(request, response) + return +} + +// CreateTicketWithChan invokes the workorder.CreateTicket API asynchronously +// api document: https://help.aliyun.com/api/workorder/createticket.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateTicketWithChan(request *CreateTicketRequest) (<-chan *CreateTicketResponse, <-chan error) { + responseChan := make(chan *CreateTicketResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateTicket(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateTicketWithCallback invokes the workorder.CreateTicket API asynchronously +// api document: https://help.aliyun.com/api/workorder/createticket.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateTicketWithCallback(request *CreateTicketRequest, callback func(response *CreateTicketResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateTicketResponse + var err error + defer close(result) + response, err = client.CreateTicket(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateTicketRequest is the request struct for api CreateTicket +type CreateTicketRequest struct { + *requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + Language string `position:"Query" name:"Language"` + Title string `position:"Query" name:"Title"` + Content string `position:"Query" name:"Content"` + NotifyTimeRange string `position:"Query" name:"NotifyTimeRange"` + Phone string `position:"Query" name:"Phone"` + Category string `position:"Query" name:"Category"` + Email string `position:"Query" name:"Email"` + SecretContent string `position:"Query" name:"SecretContent"` +} + +// CreateTicketResponse is the response struct for api CreateTicket +type CreateTicketResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` + Message string `json:"Message" xml:"Message"` + Data string `json:"Data" xml:"Data"` +} + +// CreateCreateTicketRequest creates a request to invoke CreateTicket API +func CreateCreateTicketRequest() (request *CreateTicketRequest) { + request = &CreateTicketRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Workorder", "2020-03-26", "CreateTicket", "workorder", "openAPI") + return +} + +// CreateCreateTicketResponse creates a response to parse from CreateTicket response +func CreateCreateTicketResponse() (response *CreateTicketResponse) { + response = &CreateTicketResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/workorder/endpoint.go b/services/workorder/endpoint.go new file mode 100644 index 0000000000..5e0c3369c0 --- /dev/null +++ b/services/workorder/endpoint.go @@ -0,0 +1,23 @@ +package workorder + +// EndpointMap Endpoint Data +var EndpointMap map[string]string + +// EndpointType regional or central +var EndpointType = "central" + +// GetEndpointMap Get Endpoint Data Map +func GetEndpointMap() map[string]string { + if EndpointMap == nil { + EndpointMap = map[string]string{ + "ap-southeast-1": "workorder.ap-southeast-1.aliyuncs.com", + "ap-northeast-1": "workorder.ap-northeast-1.aliyuncs.com", + } + } + return EndpointMap +} + +// GetEndpointType Get Endpoint Type Value +func GetEndpointType() string { + return EndpointType +} diff --git a/services/workorder/list_categories.go b/services/workorder/list_categories.go new file mode 100644 index 0000000000..8ecd05c213 --- /dev/null +++ b/services/workorder/list_categories.go @@ -0,0 +1,108 @@ +package workorder + +//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" +) + +// ListCategories invokes the workorder.ListCategories API synchronously +// api document: https://help.aliyun.com/api/workorder/listcategories.html +func (client *Client) ListCategories(request *ListCategoriesRequest) (response *ListCategoriesResponse, err error) { + response = CreateListCategoriesResponse() + err = client.DoAction(request, response) + return +} + +// ListCategoriesWithChan invokes the workorder.ListCategories API asynchronously +// api document: https://help.aliyun.com/api/workorder/listcategories.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListCategoriesWithChan(request *ListCategoriesRequest) (<-chan *ListCategoriesResponse, <-chan error) { + responseChan := make(chan *ListCategoriesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListCategories(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListCategoriesWithCallback invokes the workorder.ListCategories API asynchronously +// api document: https://help.aliyun.com/api/workorder/listcategories.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListCategoriesWithCallback(request *ListCategoriesRequest, callback func(response *ListCategoriesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListCategoriesResponse + var err error + defer close(result) + response, err = client.ListCategories(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListCategoriesRequest is the request struct for api ListCategories +type ListCategoriesRequest struct { + *requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + Language string `position:"Query" name:"Language"` +} + +// ListCategoriesResponse is the response struct for api ListCategories +type ListCategoriesResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Success bool `json:"Success" xml:"Success"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateListCategoriesRequest creates a request to invoke ListCategories API +func CreateListCategoriesRequest() (request *ListCategoriesRequest) { + request = &ListCategoriesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Workorder", "2020-03-26", "ListCategories", "workorder", "openAPI") + return +} + +// CreateListCategoriesResponse creates a response to parse from ListCategories response +func CreateListCategoriesResponse() (response *ListCategoriesResponse) { + response = &ListCategoriesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/workorder/list_products.go b/services/workorder/list_products.go new file mode 100644 index 0000000000..9cf7007a35 --- /dev/null +++ b/services/workorder/list_products.go @@ -0,0 +1,107 @@ +package workorder + +//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" +) + +// ListProducts invokes the workorder.ListProducts API synchronously +// api document: https://help.aliyun.com/api/workorder/listproducts.html +func (client *Client) ListProducts(request *ListProductsRequest) (response *ListProductsResponse, err error) { + response = CreateListProductsResponse() + err = client.DoAction(request, response) + return +} + +// ListProductsWithChan invokes the workorder.ListProducts API asynchronously +// api document: https://help.aliyun.com/api/workorder/listproducts.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListProductsWithChan(request *ListProductsRequest) (<-chan *ListProductsResponse, <-chan error) { + responseChan := make(chan *ListProductsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListProducts(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListProductsWithCallback invokes the workorder.ListProducts API asynchronously +// api document: https://help.aliyun.com/api/workorder/listproducts.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListProductsWithCallback(request *ListProductsRequest, callback func(response *ListProductsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListProductsResponse + var err error + defer close(result) + response, err = client.ListProducts(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListProductsRequest is the request struct for api ListProducts +type ListProductsRequest struct { + *requests.RpcRequest + Language string `position:"Query" name:"Language"` +} + +// ListProductsResponse is the response struct for api ListProducts +type ListProductsResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateListProductsRequest creates a request to invoke ListProducts API +func CreateListProductsRequest() (request *ListProductsRequest) { + request = &ListProductsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Workorder", "2020-03-26", "ListProducts", "workorder", "openAPI") + return +} + +// CreateListProductsResponse creates a response to parse from ListProducts response +func CreateListProductsResponse() (response *ListProductsResponse) { + response = &ListProductsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/workorder/list_ticket_notes.go b/services/workorder/list_ticket_notes.go new file mode 100644 index 0000000000..61e89bdbb4 --- /dev/null +++ b/services/workorder/list_ticket_notes.go @@ -0,0 +1,108 @@ +package workorder + +//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" +) + +// ListTicketNotes invokes the workorder.ListTicketNotes API synchronously +// api document: https://help.aliyun.com/api/workorder/listticketnotes.html +func (client *Client) ListTicketNotes(request *ListTicketNotesRequest) (response *ListTicketNotesResponse, err error) { + response = CreateListTicketNotesResponse() + err = client.DoAction(request, response) + return +} + +// ListTicketNotesWithChan invokes the workorder.ListTicketNotes API asynchronously +// api document: https://help.aliyun.com/api/workorder/listticketnotes.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListTicketNotesWithChan(request *ListTicketNotesRequest) (<-chan *ListTicketNotesResponse, <-chan error) { + responseChan := make(chan *ListTicketNotesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListTicketNotes(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListTicketNotesWithCallback invokes the workorder.ListTicketNotes API asynchronously +// api document: https://help.aliyun.com/api/workorder/listticketnotes.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListTicketNotesWithCallback(request *ListTicketNotesRequest, callback func(response *ListTicketNotesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListTicketNotesResponse + var err error + defer close(result) + response, err = client.ListTicketNotes(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListTicketNotesRequest is the request struct for api ListTicketNotes +type ListTicketNotesRequest struct { + *requests.RpcRequest + Language string `position:"Query" name:"Language"` + TicketId string `position:"Query" name:"TicketId"` +} + +// ListTicketNotesResponse is the response struct for api ListTicketNotes +type ListTicketNotesResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateListTicketNotesRequest creates a request to invoke ListTicketNotes API +func CreateListTicketNotesRequest() (request *ListTicketNotesRequest) { + request = &ListTicketNotesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Workorder", "2020-03-26", "ListTicketNotes", "workorder", "openAPI") + return +} + +// CreateListTicketNotesResponse creates a response to parse from ListTicketNotes response +func CreateListTicketNotesResponse() (response *ListTicketNotesResponse) { + response = &ListTicketNotesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/workorder/list_tickets.go b/services/workorder/list_tickets.go new file mode 100644 index 0000000000..bbada3a80b --- /dev/null +++ b/services/workorder/list_tickets.go @@ -0,0 +1,115 @@ +package workorder + +//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" +) + +// ListTickets invokes the workorder.ListTickets API synchronously +// api document: https://help.aliyun.com/api/workorder/listtickets.html +func (client *Client) ListTickets(request *ListTicketsRequest) (response *ListTicketsResponse, err error) { + response = CreateListTicketsResponse() + err = client.DoAction(request, response) + return +} + +// ListTicketsWithChan invokes the workorder.ListTickets API asynchronously +// api document: https://help.aliyun.com/api/workorder/listtickets.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListTicketsWithChan(request *ListTicketsRequest) (<-chan *ListTicketsResponse, <-chan error) { + responseChan := make(chan *ListTicketsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListTickets(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListTicketsWithCallback invokes the workorder.ListTickets API asynchronously +// api document: https://help.aliyun.com/api/workorder/listtickets.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListTicketsWithCallback(request *ListTicketsRequest, callback func(response *ListTicketsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListTicketsResponse + var err error + defer close(result) + response, err = client.ListTickets(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListTicketsRequest is the request struct for api ListTickets +type ListTicketsRequest struct { + *requests.RpcRequest + ProductCode string `position:"Query" name:"ProductCode"` + Language string `position:"Query" name:"Language"` + SubUserId string `position:"Query" name:"SubUserId"` + CreatedBeforeTime requests.Integer `position:"Query" name:"CreatedBeforeTime"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + Ids string `position:"Query" name:"Ids"` + TicketStatus string `position:"Query" name:"TicketStatus"` + PageStart requests.Integer `position:"Query" name:"PageStart"` + CreatedAfterTime requests.Integer `position:"Query" name:"CreatedAfterTime"` +} + +// ListTicketsResponse is the response struct for api ListTickets +type ListTicketsResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateListTicketsRequest creates a request to invoke ListTickets API +func CreateListTicketsRequest() (request *ListTicketsRequest) { + request = &ListTicketsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Workorder", "2020-03-26", "ListTickets", "workorder", "openAPI") + return +} + +// CreateListTicketsResponse creates a response to parse from ListTickets response +func CreateListTicketsResponse() (response *ListTicketsResponse) { + response = &ListTicketsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/workorder/reply_ticket.go b/services/workorder/reply_ticket.go new file mode 100644 index 0000000000..3e930e816f --- /dev/null +++ b/services/workorder/reply_ticket.go @@ -0,0 +1,109 @@ +package workorder + +//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" +) + +// ReplyTicket invokes the workorder.ReplyTicket API synchronously +// api document: https://help.aliyun.com/api/workorder/replyticket.html +func (client *Client) ReplyTicket(request *ReplyTicketRequest) (response *ReplyTicketResponse, err error) { + response = CreateReplyTicketResponse() + err = client.DoAction(request, response) + return +} + +// ReplyTicketWithChan invokes the workorder.ReplyTicket API asynchronously +// api document: https://help.aliyun.com/api/workorder/replyticket.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ReplyTicketWithChan(request *ReplyTicketRequest) (<-chan *ReplyTicketResponse, <-chan error) { + responseChan := make(chan *ReplyTicketResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ReplyTicket(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ReplyTicketWithCallback invokes the workorder.ReplyTicket API asynchronously +// api document: https://help.aliyun.com/api/workorder/replyticket.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ReplyTicketWithCallback(request *ReplyTicketRequest, callback func(response *ReplyTicketResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ReplyTicketResponse + var err error + defer close(result) + response, err = client.ReplyTicket(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ReplyTicketRequest is the request struct for api ReplyTicket +type ReplyTicketRequest struct { + *requests.RpcRequest + Language string `position:"Query" name:"Language"` + TicketId string `position:"Query" name:"TicketId"` + Content string `position:"Query" name:"Content"` + SecretContent string `position:"Query" name:"SecretContent"` +} + +// ReplyTicketResponse is the response struct for api ReplyTicket +type ReplyTicketResponse struct { + *responses.BaseResponse + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateReplyTicketRequest creates a request to invoke ReplyTicket API +func CreateReplyTicketRequest() (request *ReplyTicketRequest) { + request = &ReplyTicketRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Workorder", "2020-03-26", "ReplyTicket", "workorder", "openAPI") + return +} + +// CreateReplyTicketResponse creates a response to parse from ReplyTicket response +func CreateReplyTicketResponse() (response *ReplyTicketResponse) { + response = &ReplyTicketResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/workorder/struct_consultation_more.go b/services/workorder/struct_consultation_more.go new file mode 100644 index 0000000000..d0b1806031 --- /dev/null +++ b/services/workorder/struct_consultation_more.go @@ -0,0 +1,21 @@ +package workorder + +//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. + +// ConsultationMore is a nested struct in workorder response +type ConsultationMore struct { + ConsultationMoreItem []ConsultationMoreItem `json:"ConsultationMore" xml:"ConsultationMore"` +} diff --git a/services/workorder/struct_consultation_more_item.go b/services/workorder/struct_consultation_more_item.go new file mode 100644 index 0000000000..19e4342390 --- /dev/null +++ b/services/workorder/struct_consultation_more_item.go @@ -0,0 +1,23 @@ +package workorder + +//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. + +// ConsultationMoreItem is a nested struct in workorder response +type ConsultationMoreItem struct { + Name string `json:"Name" xml:"Name"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + Description string `json:"Description" xml:"Description"` +} diff --git a/services/workorder/struct_data.go b/services/workorder/struct_data.go new file mode 100644 index 0000000000..781ca3cffe --- /dev/null +++ b/services/workorder/struct_data.go @@ -0,0 +1,28 @@ +package workorder + +//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 workorder response +type Data struct { + CurrentPage int `json:"CurrentPage" xml:"CurrentPage"` + Total int `json:"Total" xml:"Total"` + PageSize int `json:"PageSize" xml:"PageSize"` + HotTech []HotTechItem `json:"HotTech" xml:"HotTech"` + TechMore []TechMoreItem `json:"TechMore" xml:"TechMore"` + List []ListItemInListTickets `json:"List" xml:"List"` + ConsultationMore []ConsultationMoreItem `json:"ConsultationMore" xml:"ConsultationMore"` + HotConsultation []HotConsultationItem `json:"HotConsultation" xml:"HotConsultation"` +} diff --git a/services/workorder/struct_hot_consultation.go b/services/workorder/struct_hot_consultation.go new file mode 100644 index 0000000000..933670262c --- /dev/null +++ b/services/workorder/struct_hot_consultation.go @@ -0,0 +1,21 @@ +package workorder + +//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. + +// HotConsultation is a nested struct in workorder response +type HotConsultation struct { + HotConsultationItem []HotConsultationItem `json:"HotConsultation" xml:"HotConsultation"` +} diff --git a/services/workorder/struct_hot_consultation_item.go b/services/workorder/struct_hot_consultation_item.go new file mode 100644 index 0000000000..48ac32b795 --- /dev/null +++ b/services/workorder/struct_hot_consultation_item.go @@ -0,0 +1,23 @@ +package workorder + +//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. + +// HotConsultationItem is a nested struct in workorder response +type HotConsultationItem struct { + Name string `json:"Name" xml:"Name"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + Description string `json:"Description" xml:"Description"` +} diff --git a/services/workorder/struct_hot_tech.go b/services/workorder/struct_hot_tech.go new file mode 100644 index 0000000000..41ea9e2686 --- /dev/null +++ b/services/workorder/struct_hot_tech.go @@ -0,0 +1,21 @@ +package workorder + +//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. + +// HotTech is a nested struct in workorder response +type HotTech struct { + HotTechItem []HotTechItem `json:"HotTech" xml:"HotTech"` +} diff --git a/services/workorder/struct_hot_tech_item.go b/services/workorder/struct_hot_tech_item.go new file mode 100644 index 0000000000..874a7f0690 --- /dev/null +++ b/services/workorder/struct_hot_tech_item.go @@ -0,0 +1,23 @@ +package workorder + +//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. + +// HotTechItem is a nested struct in workorder response +type HotTechItem struct { + Name string `json:"Name" xml:"Name"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + Description string `json:"Description" xml:"Description"` +} diff --git a/services/workorder/struct_list_in_list_categories.go b/services/workorder/struct_list_in_list_categories.go new file mode 100644 index 0000000000..460dc6ec19 --- /dev/null +++ b/services/workorder/struct_list_in_list_categories.go @@ -0,0 +1,21 @@ +package workorder + +//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. + +// ListInListCategories is a nested struct in workorder response +type ListInListCategories struct { + ListItem []ListItem `json:"List" xml:"List"` +} diff --git a/services/workorder/struct_list_in_list_ticket_notes.go b/services/workorder/struct_list_in_list_ticket_notes.go new file mode 100644 index 0000000000..a1d7aea401 --- /dev/null +++ b/services/workorder/struct_list_in_list_ticket_notes.go @@ -0,0 +1,21 @@ +package workorder + +//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. + +// ListInListTicketNotes is a nested struct in workorder response +type ListInListTicketNotes struct { + ListItem []ListItem `json:"List" xml:"List"` +} diff --git a/services/workorder/struct_list_in_list_tickets.go b/services/workorder/struct_list_in_list_tickets.go new file mode 100644 index 0000000000..815f0190d2 --- /dev/null +++ b/services/workorder/struct_list_in_list_tickets.go @@ -0,0 +1,21 @@ +package workorder + +//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. + +// ListInListTickets is a nested struct in workorder response +type ListInListTickets struct { + ListItem []ListItemInListTickets `json:"List" xml:"List"` +} diff --git a/services/workorder/struct_list_item.go b/services/workorder/struct_list_item.go new file mode 100644 index 0000000000..1dde630b42 --- /dev/null +++ b/services/workorder/struct_list_item.go @@ -0,0 +1,26 @@ +package workorder + +//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. + +// ListItem is a nested struct in workorder response +type ListItem struct { + Name string `json:"Name" xml:"Name"` + Id int `json:"Id" xml:"Id"` + FromOfficial bool `json:"FromOfficial" xml:"FromOfficial"` + Content string `json:"Content" xml:"Content"` + GmtCreated int `json:"GmtCreated" xml:"GmtCreated"` + NoteId string `json:"NoteId" xml:"NoteId"` +} diff --git a/services/workorder/struct_list_item_in_list_tickets.go b/services/workorder/struct_list_item_in_list_tickets.go new file mode 100644 index 0000000000..d4242b3efa --- /dev/null +++ b/services/workorder/struct_list_item_in_list_tickets.go @@ -0,0 +1,25 @@ +package workorder + +//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. + +// ListItemInListTickets is a nested struct in workorder response +type ListItemInListTickets struct { + AddTime int `json:"AddTime" xml:"AddTime"` + TicketStatus string `json:"TicketStatus" xml:"TicketStatus"` + CreatorId string `json:"CreatorId" xml:"CreatorId"` + Id string `json:"Id" xml:"Id"` + Title string `json:"Title" xml:"Title"` +} diff --git a/services/workorder/struct_product_list.go b/services/workorder/struct_product_list.go new file mode 100644 index 0000000000..30d583d33a --- /dev/null +++ b/services/workorder/struct_product_list.go @@ -0,0 +1,21 @@ +package workorder + +//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. + +// ProductList is a nested struct in workorder response +type ProductList struct { + ProductListItem []ProductListItem `json:"ProductList" xml:"ProductList"` +} diff --git a/services/workorder/struct_product_list_item.go b/services/workorder/struct_product_list_item.go new file mode 100644 index 0000000000..35444df5d3 --- /dev/null +++ b/services/workorder/struct_product_list_item.go @@ -0,0 +1,23 @@ +package workorder + +//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. + +// ProductListItem is a nested struct in workorder response +type ProductListItem struct { + Name string `json:"Name" xml:"Name"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + Description string `json:"Description" xml:"Description"` +} diff --git a/services/workorder/struct_tech_more.go b/services/workorder/struct_tech_more.go new file mode 100644 index 0000000000..d2b8f2d4c6 --- /dev/null +++ b/services/workorder/struct_tech_more.go @@ -0,0 +1,21 @@ +package workorder + +//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. + +// TechMore is a nested struct in workorder response +type TechMore struct { + TechMoreItem []TechMoreItem `json:"TechMore" xml:"TechMore"` +} diff --git a/services/workorder/struct_tech_more_item.go b/services/workorder/struct_tech_more_item.go new file mode 100644 index 0000000000..10bcd70521 --- /dev/null +++ b/services/workorder/struct_tech_more_item.go @@ -0,0 +1,22 @@ +package workorder + +//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. + +// TechMoreItem is a nested struct in workorder response +type TechMoreItem struct { + GroupName string `json:"GroupName" xml:"GroupName"` + ProductList []ProductListItem `json:"ProductList" xml:"ProductList"` +}