From 1a7db54e56ea2a20cafcf6c08d8260a346c59b56 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 3 Dec 2024 07:30:49 +0000 Subject: [PATCH] Generated 2022-01-17 for Safe. --- ChangeLog.txt | 4 + services/safe/change_cancel.go | 106 +++++++ services/safe/change_check.go | 288 ++++++++++++++++++ services/safe/change_end.go | 111 +++++++ services/safe/change_start.go | 115 +++++++ services/safe/client.go | 104 +++++++ services/safe/create_block.go | 217 +++++++++++++ services/safe/create_operator.go | 112 +++++++ services/safe/query.go | 108 +++++++ services/safe/query_approve_flow.go | 107 +++++++ services/safe/query_block_event.go | 123 ++++++++ services/safe/query_change_info.go | 133 ++++++++ services/safe/query_check_info.go | 106 +++++++ services/safe/query_customer.go | 107 +++++++ services/safe/query_execute_info.go | 132 ++++++++ services/safe/query_inner_product_info.go | 108 +++++++ services/safe/query_region_az.go | 108 +++++++ services/safe/safe_change_cancel.go | 107 +++++++ services/safe/safe_change_check.go | 279 +++++++++++++++++ services/safe/safe_change_end.go | 111 +++++++ services/safe/safe_change_query.go | 109 +++++++ .../safe/safe_change_query_approve_flow.go | 107 +++++++ services/safe/safe_change_start.go | 115 +++++++ services/safe/safe_change_start_approve.go | 108 +++++++ services/safe/safe_scope_data.go | 124 ++++++++ services/safe/start_approve.go | 108 +++++++ services/safe/struct_az_list.go | 21 ++ services/safe/struct_block_rule.go | 21 ++ services/safe/struct_block_rule_item.go | 27 ++ services/safe/struct_change_times.go | 21 ++ services/safe/struct_change_times_item.go | 22 ++ services/safe/struct_check_detail_list.go | 21 ++ .../safe/struct_check_detail_list_item.go | 27 ++ ...struct_checkhold_reason_in_change_check.go | 21 ++ ...t_checkhold_reason_in_safe_change_check.go | 21 ++ ...t_checkhold_reason_in_safe_change_query.go | 21 ++ services/safe/struct_data.go | 68 +++++ .../safe/struct_data_in_query_customer.go | 21 ++ ..._data_in_safe_change_query_approve_flow.go | 21 ++ .../safe/struct_data_in_safe_scope_data.go | 21 ++ .../struct_data_info_in_query_block_event.go | 21 ++ ...t_data_info_in_query_inner_product_info.go | 21 ++ .../struct_data_info_in_query_region_az.go | 21 ++ services/safe/struct_data_item.go | 27 ++ services/safe/struct_event_time.go | 24 ++ services/safe/struct_event_times.go | 21 ++ services/safe/struct_pagination.go | 22 ++ services/safe/struct_rule.go | 21 ++ ...ct_rule_detail_url_list_in_change_check.go | 21 ++ ...le_detail_url_list_in_safe_change_check.go | 21 ++ .../safe/struct_rule_detail_url_list_item.go | 23 ++ services/safe/struct_rule_item.go | 26 ++ services/safe/struct_scope_node_list.go | 21 ++ services/safe/struct_scope_node_list_item.go | 29 ++ services/safe/sync_product.go | 119 ++++++++ 55 files changed, 4049 insertions(+) create mode 100644 services/safe/change_cancel.go create mode 100644 services/safe/change_check.go create mode 100644 services/safe/change_end.go create mode 100644 services/safe/change_start.go create mode 100644 services/safe/client.go create mode 100644 services/safe/create_block.go create mode 100644 services/safe/create_operator.go create mode 100644 services/safe/query.go create mode 100644 services/safe/query_approve_flow.go create mode 100644 services/safe/query_block_event.go create mode 100644 services/safe/query_change_info.go create mode 100644 services/safe/query_check_info.go create mode 100644 services/safe/query_customer.go create mode 100644 services/safe/query_execute_info.go create mode 100644 services/safe/query_inner_product_info.go create mode 100644 services/safe/query_region_az.go create mode 100644 services/safe/safe_change_cancel.go create mode 100644 services/safe/safe_change_check.go create mode 100644 services/safe/safe_change_end.go create mode 100644 services/safe/safe_change_query.go create mode 100644 services/safe/safe_change_query_approve_flow.go create mode 100644 services/safe/safe_change_start.go create mode 100644 services/safe/safe_change_start_approve.go create mode 100644 services/safe/safe_scope_data.go create mode 100644 services/safe/start_approve.go create mode 100644 services/safe/struct_az_list.go create mode 100644 services/safe/struct_block_rule.go create mode 100644 services/safe/struct_block_rule_item.go create mode 100644 services/safe/struct_change_times.go create mode 100644 services/safe/struct_change_times_item.go create mode 100644 services/safe/struct_check_detail_list.go create mode 100644 services/safe/struct_check_detail_list_item.go create mode 100644 services/safe/struct_checkhold_reason_in_change_check.go create mode 100644 services/safe/struct_checkhold_reason_in_safe_change_check.go create mode 100644 services/safe/struct_checkhold_reason_in_safe_change_query.go create mode 100644 services/safe/struct_data.go create mode 100644 services/safe/struct_data_in_query_customer.go create mode 100644 services/safe/struct_data_in_safe_change_query_approve_flow.go create mode 100644 services/safe/struct_data_in_safe_scope_data.go create mode 100644 services/safe/struct_data_info_in_query_block_event.go create mode 100644 services/safe/struct_data_info_in_query_inner_product_info.go create mode 100644 services/safe/struct_data_info_in_query_region_az.go create mode 100644 services/safe/struct_data_item.go create mode 100644 services/safe/struct_event_time.go create mode 100644 services/safe/struct_event_times.go create mode 100644 services/safe/struct_pagination.go create mode 100644 services/safe/struct_rule.go create mode 100644 services/safe/struct_rule_detail_url_list_in_change_check.go create mode 100644 services/safe/struct_rule_detail_url_list_in_safe_change_check.go create mode 100644 services/safe/struct_rule_detail_url_list_item.go create mode 100644 services/safe/struct_rule_item.go create mode 100644 services/safe/struct_scope_node_list.go create mode 100644 services/safe/struct_scope_node_list_item.go create mode 100644 services/safe/sync_product.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 4416b1536..116ed3aa0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-12-03 Version: v1.63.63 +- Generated 2022-01-17 for `Safe`. +undefined + 2024-12-02 Version: v1.63.62 - Generated 2014-08-28 for `Ess`. - ScalingGroup support spot replace on demand instance. diff --git a/services/safe/change_cancel.go b/services/safe/change_cancel.go new file mode 100644 index 000000000..a2ff6c8d6 --- /dev/null +++ b/services/safe/change_cancel.go @@ -0,0 +1,106 @@ +package safe + +//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" +) + +// ChangeCancel invokes the safe.ChangeCancel API synchronously +func (client *Client) ChangeCancel(request *ChangeCancelRequest) (response *ChangeCancelResponse, err error) { + response = CreateChangeCancelResponse() + err = client.DoAction(request, response) + return +} + +// ChangeCancelWithChan invokes the safe.ChangeCancel API asynchronously +func (client *Client) ChangeCancelWithChan(request *ChangeCancelRequest) (<-chan *ChangeCancelResponse, <-chan error) { + responseChan := make(chan *ChangeCancelResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ChangeCancel(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ChangeCancelWithCallback invokes the safe.ChangeCancel API asynchronously +func (client *Client) ChangeCancelWithCallback(request *ChangeCancelRequest, callback func(response *ChangeCancelResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ChangeCancelResponse + var err error + defer close(result) + response, err = client.ChangeCancel(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ChangeCancelRequest is the request struct for api ChangeCancel +type ChangeCancelRequest struct { + *requests.RpcRequest + AuthKey string `position:"Query" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Query" name:"ReqTimestamp"` + SourceOrderId string `position:"Query" name:"SourceOrderId"` + AuthSign string `position:"Query" name:"AuthSign"` +} + +// ChangeCancelResponse is the response struct for api ChangeCancel +type ChangeCancelResponse struct { + *responses.BaseResponse + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateChangeCancelRequest creates a request to invoke ChangeCancel API +func CreateChangeCancelRequest() (request *ChangeCancelRequest) { + request = &ChangeCancelRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "ChangeCancel", "", "") + request.Method = requests.POST + return +} + +// CreateChangeCancelResponse creates a response to parse from ChangeCancel response +func CreateChangeCancelResponse() (response *ChangeCancelResponse) { + response = &ChangeCancelResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/change_check.go b/services/safe/change_check.go new file mode 100644 index 000000000..42daf5275 --- /dev/null +++ b/services/safe/change_check.go @@ -0,0 +1,288 @@ +package safe + +//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" +) + +// ChangeCheck invokes the safe.ChangeCheck API synchronously +func (client *Client) ChangeCheck(request *ChangeCheckRequest) (response *ChangeCheckResponse, err error) { + response = CreateChangeCheckResponse() + err = client.DoAction(request, response) + return +} + +// ChangeCheckWithChan invokes the safe.ChangeCheck API asynchronously +func (client *Client) ChangeCheckWithChan(request *ChangeCheckRequest) (<-chan *ChangeCheckResponse, <-chan error) { + responseChan := make(chan *ChangeCheckResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ChangeCheck(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ChangeCheckWithCallback invokes the safe.ChangeCheck API asynchronously +func (client *Client) ChangeCheckWithCallback(request *ChangeCheckRequest, callback func(response *ChangeCheckResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ChangeCheckResponse + var err error + defer close(result) + response, err = client.ChangeCheck(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ChangeCheckRequest is the request struct for api ChangeCheck +type ChangeCheckRequest struct { + *requests.RpcRequest + ChangeEnv string `position:"Body" name:"ChangeEnv"` + AuthKey string `position:"Body" name:"AuthKey"` + ChangeOptSubType string `position:"Body" name:"ChangeOptSubType"` + ReleasePackageInfos *[]ChangeCheckReleasePackageInfos `position:"Body" name:"ReleasePackageInfos" type:"Repeated"` + Instance ChangeCheckInstance `position:"Body" name:"Instance" type:"Struct"` + ChangeOptType string `position:"Body" name:"ChangeOptType"` + ChangeDataType string `position:"Body" name:"ChangeDataType"` + AuthSign string `position:"Body" name:"AuthSign"` + DamagedChangeNotices *[]ChangeCheckDamagedChangeNotices `position:"Body" name:"DamagedChangeNotices" type:"Json"` + InfluenceInfo ChangeCheckInfluenceInfo `position:"Body" name:"InfluenceInfo" type:"Struct"` + ExtraInfo string `position:"Body" name:"ExtraInfo"` + ChangeSchemes string `position:"Body" name:"ChangeSchemes"` + WhiteType requests.Integer `position:"Body" name:"WhiteType"` + ChangeTimes *[]ChangeCheckChangeTimes `position:"Body" name:"ChangeTimes" type:"Repeated"` + ReuseSourceOrderId string `position:"Body" name:"ReuseSourceOrderId"` + ChangeValidation string `position:"Body" name:"ChangeValidation"` + ChangeEndTime requests.Integer `position:"Body" name:"ChangeEndTime"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` + CallBackInfo ChangeCheckCallBackInfo `position:"Body" name:"CallBackInfo" type:"Struct"` + Rollback string `position:"Body" name:"Rollback"` + BlockInfos *[]ChangeCheckBlockInfos `position:"Body" name:"BlockInfos" type:"Repeated"` + GrayStatus string `position:"Body" name:"GrayStatus"` + Product *[]ChangeCheckProduct `position:"Body" name:"Product" type:"Repeated"` + BgCustomTemplateExtraDTO ChangeCheckBgCustomTemplateExtraDTO `position:"Body" name:"BgCustomTemplateExtraDTO" type:"Struct"` + Follower *[]string `position:"Body" name:"Follower" type:"Repeated"` + ChangeObject string `position:"Body" name:"ChangeObject"` + SourceName string `position:"Body" name:"SourceName"` + RiskLevel string `position:"Body" name:"RiskLevel"` + ChangeTitle string `position:"Body" name:"ChangeTitle"` + NeedModifyDoc string `position:"Body" name:"NeedModifyDoc"` + CreatorEmpId string `position:"Body" name:"CreatorEmpId"` + ChangeStartTime requests.Integer `position:"Body" name:"ChangeStartTime"` + SourceUrl string `position:"Body" name:"SourceUrl"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + HarmChangeNoticeEnum string `position:"Body" name:"HarmChangeNoticeEnum"` + ChangeDesc string `position:"Body" name:"ChangeDesc"` + ExecutorEmpId string `position:"Body" name:"ExecutorEmpId"` + BgVid string `position:"Body" name:"BgVid"` + AffectCustomer string `position:"Body" name:"AffectCustomer"` + ChangeSubTypeDesc string `position:"Body" name:"ChangeSubTypeDesc"` + ChangeSystem string `position:"Body" name:"ChangeSystem"` + Incidence string `position:"Body" name:"Incidence"` + ApproveFlowParam ChangeCheckApproveFlowParam `position:"Body" name:"ApproveFlowParam" type:"Struct"` + ChangeReason string `position:"Body" name:"ChangeReason"` + ChangeRmarks string `position:"Body" name:"ChangeRmarks"` + ChangeItems string `position:"Body" name:"ChangeItems"` +} + +// ChangeCheckDamagedChangeNotices is a repeated param struct in ChangeCheckRequest +type ChangeCheckDamagedChangeNotices struct { + EventId string `name:"EventId"` + BgCancelNoticeContent string `name:"BgCancelNoticeContent"` + Channel *[]string `name:"Channel" type:"Repeated"` + Type string `name:"Type"` + BgCancelNoticeEventId string `name:"BgCancelNoticeEventId"` + Content string `name:"Content"` + SensitiveCustomers *[]ChangeCheckDamagedChangeNoticesSensitiveCustomersItem `name:"SensitiveCustomers" type:"Repeated"` +} + +// ChangeCheckDamagedChangeNoticesSensitiveCustomersItem is a repeated param struct in ChangeCheckRequest +type ChangeCheckDamagedChangeNoticesSensitiveCustomersItem struct { + ProductCode string `name:"ProductCode"` + CustomerInfo *[]ChangeCheckDamagedChangeNoticesSensitiveCustomersItemCustomerInfoItem `name:"CustomerInfo" type:"Repeated"` +} + +// ChangeCheckDamagedChangeNoticesSensitiveCustomersItemCustomerInfoItem is a repeated param struct in ChangeCheckRequest +type ChangeCheckDamagedChangeNoticesSensitiveCustomersItemCustomerInfoItem struct { + Uid string `name:"Uid"` + Type string `name:"Type"` + ExtraInfo map[string]string `name:"ExtraInfo" type:"Map"` +} + +// ChangeCheckReleasePackageInfos is a repeated param struct in ChangeCheckRequest +type ChangeCheckReleasePackageInfos struct { + ReleasePackage *[]string `name:"ReleasePackage" type:"Repeated"` + ProductCode string `name:"ProductCode"` +} + +// ChangeCheckInstance is a repeated param struct in ChangeCheckRequest +type ChangeCheckInstance struct { + Instance *[]string `name:"Instance" type:"Repeated"` + Nc *[]string `name:"Nc" type:"Repeated"` + Uids *[]string `name:"Uids" type:"Repeated"` + InfluenceApp *[]string `name:"InfluenceApp" type:"Repeated"` + AttributionApp *[]string `name:"AttributionApp" type:"Repeated"` +} + +// ChangeCheckInfluenceInfo is a repeated param struct in ChangeCheckRequest +type ChangeCheckInfluenceInfo struct { + NoticeInfos *[]ChangeCheckInfluenceInfoNoticeInfosItem `name:"NoticeInfos" type:"Repeated"` + SensitiveCustomers *[]ChangeCheckInfluenceInfoSensitiveCustomersItem `name:"SensitiveCustomers" type:"Repeated"` +} + +// ChangeCheckChangeTimes is a repeated param struct in ChangeCheckRequest +type ChangeCheckChangeTimes struct { + ChangeEndTime string `name:"ChangeEndTime"` + ChangeStartTime string `name:"ChangeStartTime"` +} + +// ChangeCheckCallBackInfo is a repeated param struct in ChangeCheckRequest +type ChangeCheckCallBackInfo struct { + PopProduct string `name:"PopProduct"` + EndPoint string `name:"EndPoint"` + RegionId string `name:"RegionId"` + ApiVersion string `name:"ApiVersion"` + Api string `name:"Api"` + Type string `name:"Type"` + Url string `name:"Url"` + ExtraInfo string `name:"ExtraInfo"` +} + +// ChangeCheckBlockInfos is a repeated param struct in ChangeCheckRequest +type ChangeCheckBlockInfos struct { + HitInfos *[]ChangeCheckBlockInfosHitInfos `name:"HitInfos" type:"Repeated"` + Id string `name:"Id"` +} + +// ChangeCheckProduct is a repeated param struct in ChangeCheckRequest +type ChangeCheckProduct struct { + Code string `name:"Code"` + Name string `name:"Name"` +} + +// ChangeCheckBgCustomTemplateExtraDTO is a repeated param struct in ChangeCheckRequest +type ChangeCheckBgCustomTemplateExtraDTO struct { + BgCustomTemplateTitle string `name:"BgCustomTemplateTitle"` + BgVid string `name:"BgVid"` + BgCustomTemplateId string `name:"BgCustomTemplateId"` + BgCustomTemplate string `name:"BgCustomTemplate"` + BgCustomTemplateInfo string `name:"BgCustomTemplateInfo"` + ExtraInfo string `name:"ExtraInfo"` +} + +// ChangeCheckApproveFlowParam is a repeated param struct in ChangeCheckRequest +type ChangeCheckApproveFlowParam struct { + AuthKey string `name:"AuthKey"` + ApproveNodes *[]ChangeCheckApproveFlowParamApproveNodesItem `name:"ApproveNodes" type:"Repeated"` + FlowStatus string `name:"FlowStatus"` + BgVid string `name:"BgVid"` + AuthSign string `name:"AuthSign"` + Timestamp string `name:"Timestamp"` +} + +// ChangeCheckInfluenceInfoNoticeInfosItem is a repeated param struct in ChangeCheckRequest +type ChangeCheckInfluenceInfoNoticeInfosItem struct { + EventId string `name:"EventId"` + Channel *[]string `name:"Channel" type:"Repeated"` + Content string `name:"Content"` +} + +// ChangeCheckInfluenceInfoSensitiveCustomersItem is a repeated param struct in ChangeCheckRequest +type ChangeCheckInfluenceInfoSensitiveCustomersItem struct { + ProductCode string `name:"ProductCode"` + CustomerInfo *[]ChangeCheckInfluenceInfoSensitiveCustomersItemCustomerInfoItem `name:"CustomerInfo" type:"Repeated"` +} + +// ChangeCheckBlockInfosHitInfos is a repeated param struct in ChangeCheckRequest +type ChangeCheckBlockInfosHitInfos struct { + Scope string `name:"Scope"` + HitObject string `name:"HitObject"` + HitInfo string `name:"HitInfo"` +} + +// ChangeCheckApproveFlowParamApproveNodesItem is a repeated param struct in ChangeCheckRequest +type ChangeCheckApproveFlowParamApproveNodesItem struct { + ProcessName string `name:"ProcessName"` + NodeStatus string `name:"NodeStatus"` + ApproverDTO *[]ChangeCheckApproveFlowParamApproveNodesItemApproverDTOItem `name:"ApproverDTO" type:"Repeated"` + Strategy string `name:"Strategy"` + ProcessNodeOrder string `name:"ProcessNodeOrder"` +} + +// ChangeCheckInfluenceInfoSensitiveCustomersItemCustomerInfoItem is a repeated param struct in ChangeCheckRequest +type ChangeCheckInfluenceInfoSensitiveCustomersItemCustomerInfoItem struct { + Uid string `name:"Uid"` + Type string `name:"Type"` + ExtraInfo map[string]string `name:"ExtraInfo" type:"Map"` +} + +// ChangeCheckApproveFlowParamApproveNodesItemApproverDTOItem is a repeated param struct in ChangeCheckRequest +type ChangeCheckApproveFlowParamApproveNodesItemApproverDTOItem struct { + ApproveDesc string `name:"ApproveDesc"` + ApproverId string `name:"ApproverId"` + ApproverName string `name:"ApproverName"` + ApproveTime string `name:"ApproveTime"` + Opinion string `name:"Opinion"` +} + +// ChangeCheckResponse is the response struct for api ChangeCheck +type ChangeCheckResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateChangeCheckRequest creates a request to invoke ChangeCheck API +func CreateChangeCheckRequest() (request *ChangeCheckRequest) { + request = &ChangeCheckRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "ChangeCheck", "", "") + request.Method = requests.POST + return +} + +// CreateChangeCheckResponse creates a response to parse from ChangeCheck response +func CreateChangeCheckResponse() (response *ChangeCheckResponse) { + response = &ChangeCheckResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/change_end.go b/services/safe/change_end.go new file mode 100644 index 000000000..456b75a60 --- /dev/null +++ b/services/safe/change_end.go @@ -0,0 +1,111 @@ +package safe + +//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" +) + +// ChangeEnd invokes the safe.ChangeEnd API synchronously +func (client *Client) ChangeEnd(request *ChangeEndRequest) (response *ChangeEndResponse, err error) { + response = CreateChangeEndResponse() + err = client.DoAction(request, response) + return +} + +// ChangeEndWithChan invokes the safe.ChangeEnd API asynchronously +func (client *Client) ChangeEndWithChan(request *ChangeEndRequest) (<-chan *ChangeEndResponse, <-chan error) { + responseChan := make(chan *ChangeEndResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ChangeEnd(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ChangeEndWithCallback invokes the safe.ChangeEnd API asynchronously +func (client *Client) ChangeEndWithCallback(request *ChangeEndRequest, callback func(response *ChangeEndResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ChangeEndResponse + var err error + defer close(result) + response, err = client.ChangeEnd(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ChangeEndRequest is the request struct for api ChangeEnd +type ChangeEndRequest struct { + *requests.RpcRequest + AuthKey string `position:"Query" name:"AuthKey"` + TotalBatchNo requests.Integer `position:"Query" name:"TotalBatchNo"` + ReqTimestamp requests.Integer `position:"Query" name:"ReqTimestamp"` + ChangeEndTime requests.Integer `position:"Query" name:"ChangeEndTime"` + ExecutorEmpId string `position:"Query" name:"ExecutorEmpId"` + CurBatchNo requests.Integer `position:"Query" name:"CurBatchNo"` + SourceOrderId string `position:"Query" name:"SourceOrderId"` + AuthSign string `position:"Query" name:"AuthSign"` + ChangeResult string `position:"Query" name:"ChangeResult"` +} + +// ChangeEndResponse is the response struct for api ChangeEnd +type ChangeEndResponse struct { + *responses.BaseResponse + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateChangeEndRequest creates a request to invoke ChangeEnd API +func CreateChangeEndRequest() (request *ChangeEndRequest) { + request = &ChangeEndRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "ChangeEnd", "", "") + request.Method = requests.POST + return +} + +// CreateChangeEndResponse creates a response to parse from ChangeEnd response +func CreateChangeEndResponse() (response *ChangeEndResponse) { + response = &ChangeEndResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/change_start.go b/services/safe/change_start.go new file mode 100644 index 000000000..b4d7adeae --- /dev/null +++ b/services/safe/change_start.go @@ -0,0 +1,115 @@ +package safe + +//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" +) + +// ChangeStart invokes the safe.ChangeStart API synchronously +func (client *Client) ChangeStart(request *ChangeStartRequest) (response *ChangeStartResponse, err error) { + response = CreateChangeStartResponse() + err = client.DoAction(request, response) + return +} + +// ChangeStartWithChan invokes the safe.ChangeStart API asynchronously +func (client *Client) ChangeStartWithChan(request *ChangeStartRequest) (<-chan *ChangeStartResponse, <-chan error) { + responseChan := make(chan *ChangeStartResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ChangeStart(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ChangeStartWithCallback invokes the safe.ChangeStart API asynchronously +func (client *Client) ChangeStartWithCallback(request *ChangeStartRequest, callback func(response *ChangeStartResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ChangeStartResponse + var err error + defer close(result) + response, err = client.ChangeStart(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ChangeStartRequest is the request struct for api ChangeStart +type ChangeStartRequest struct { + *requests.RpcRequest + AuthKey string `position:"Query" name:"AuthKey"` + TotalBatchNo requests.Integer `position:"Query" name:"TotalBatchNo"` + ChangeOptType string `position:"Query" name:"ChangeOptType"` + ChangeObject string `position:"Query" name:"ChangeObject"` + AuthSign string `position:"Query" name:"AuthSign"` + ChangeTitle string `position:"Query" name:"ChangeTitle"` + CreatorEmpId string `position:"Query" name:"CreatorEmpId"` + ChangeStartTime requests.Integer `position:"Query" name:"ChangeStartTime"` + ReqTimestamp requests.Integer `position:"Query" name:"ReqTimestamp"` + ChangeEndTime requests.Integer `position:"Query" name:"ChangeEndTime"` + ExecutorEmpId string `position:"Query" name:"ExecutorEmpId"` + CurBatchNo requests.Integer `position:"Query" name:"CurBatchNo"` + SourceOrderId string `position:"Query" name:"SourceOrderId"` +} + +// ChangeStartResponse is the response struct for api ChangeStart +type ChangeStartResponse struct { + *responses.BaseResponse + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateChangeStartRequest creates a request to invoke ChangeStart API +func CreateChangeStartRequest() (request *ChangeStartRequest) { + request = &ChangeStartRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "ChangeStart", "", "") + request.Method = requests.POST + return +} + +// CreateChangeStartResponse creates a response to parse from ChangeStart response +func CreateChangeStartResponse() (response *ChangeStartResponse) { + response = &ChangeStartResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/client.go b/services/safe/client.go new file mode 100644 index 000000000..ece4bed6c --- /dev/null +++ b/services/safe/client.go @@ -0,0 +1,104 @@ +package safe + +//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/safe/create_block.go b/services/safe/create_block.go new file mode 100644 index 000000000..b9d1f2106 --- /dev/null +++ b/services/safe/create_block.go @@ -0,0 +1,217 @@ +package safe + +//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" +) + +// CreateBlock invokes the safe.CreateBlock API synchronously +func (client *Client) CreateBlock(request *CreateBlockRequest) (response *CreateBlockResponse, err error) { + response = CreateCreateBlockResponse() + err = client.DoAction(request, response) + return +} + +// CreateBlockWithChan invokes the safe.CreateBlock API asynchronously +func (client *Client) CreateBlockWithChan(request *CreateBlockRequest) (<-chan *CreateBlockResponse, <-chan error) { + responseChan := make(chan *CreateBlockResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateBlock(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateBlockWithCallback invokes the safe.CreateBlock API asynchronously +func (client *Client) CreateBlockWithCallback(request *CreateBlockRequest, callback func(response *CreateBlockResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateBlockResponse + var err error + defer close(result) + response, err = client.CreateBlock(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateBlockRequest is the request struct for api CreateBlock +type CreateBlockRequest struct { + *requests.RpcRequest + Reason string `position:"Body" name:"Reason"` + ApproveStrategyNodes *[]CreateBlockApproveStrategyNodes `position:"Body" name:"ApproveStrategyNodes" type:"Repeated"` + Director string `position:"Body" name:"Director"` + NoticeRequestLink string `position:"Body" name:"NoticeRequestLink"` + NoticeEnclosureInfos *[]CreateBlockNoticeEnclosureInfos `position:"Body" name:"NoticeEnclosureInfos" type:"Repeated"` + Title string `position:"Body" name:"Title"` + Type string `position:"Body" name:"Type"` + LabelName string `position:"Body" name:"LabelName"` + Scene requests.Integer `position:"Body" name:"Scene"` + BlockId requests.Integer `position:"Body" name:"BlockId"` + VersionId requests.Integer `position:"Body" name:"VersionId"` + IsNeedApprove requests.Integer `position:"Body" name:"IsNeedApprove"` + NoticeType requests.Integer `position:"Body" name:"NoticeType"` + IsRecall requests.Integer `position:"Body" name:"IsRecall"` + NoticeDesc string `position:"Body" name:"NoticeDesc"` + Scopes *[]CreateBlockScopes `position:"Body" name:"Scopes" type:"Repeated"` + IsTemplate requests.Integer `position:"Body" name:"IsTemplate"` + Status requests.Integer `position:"Body" name:"Status"` +} + +// CreateBlockApproveStrategyNodes is a repeated param struct in CreateBlockRequest +type CreateBlockApproveStrategyNodes struct { + RoleCode string `name:"RoleCode"` + ApproveType string `name:"ApproveType"` + Name string `name:"Name"` + NodeCode string `name:"NodeCode"` + RoleValue *[]string `name:"RoleValue" type:"Repeated"` + Id string `name:"Id"` + TemplateId string `name:"TemplateId"` + PriorityOrder string `name:"PriorityOrder"` + ApproveRuleType string `name:"ApproveRuleType"` +} + +// CreateBlockNoticeEnclosureInfos is a repeated param struct in CreateBlockRequest +type CreateBlockNoticeEnclosureInfos struct { + Name string `name:"Name"` + Url string `name:"url"` +} + +// CreateBlockScopes is a repeated param struct in CreateBlockRequest +type CreateBlockScopes struct { + BlockScope CreateBlockScopesBlockScope `name:"BlockScope" type:"Struct"` + BlockHarm *[]string `name:"BlockHarm" type:"Repeated"` + ScopeRule string `name:"ScopeRule"` + EffectTime *[]string `name:"EffectTime" type:"Repeated"` +} + +// CreateBlockScopesBlockScope is a repeated param struct in CreateBlockRequest +type CreateBlockScopesBlockScope struct { + App CreateBlockScopesBlockScopeApp `name:"App" type:"Struct"` + Cluster CreateBlockScopesBlockScopeCluster `name:"Cluster" type:"Struct"` + Product *[]CreateBlockScopesBlockScopeProductItem `name:"Product" type:"Repeated"` + BgSystem *[]CreateBlockScopesBlockScopeBgSystemItem `name:"BgSystem" type:"Repeated"` + Infrastructure *[]string `name:"Infrastructure" type:"Repeated"` + Express string `name:"Express"` + Dept *[]string `name:"Dept" type:"Repeated"` + Customer *[]CreateBlockScopesBlockScopeCustomerItem `name:"Customer" type:"Repeated"` +} + +// CreateBlockScopesBlockScopeApp is a repeated param struct in CreateBlockRequest +type CreateBlockScopesBlockScopeApp struct { + AppName *[]string `name:"AppName" type:"Repeated"` + Type string `name:"Type"` +} + +// CreateBlockScopesBlockScopeCluster is a repeated param struct in CreateBlockRequest +type CreateBlockScopesBlockScopeCluster struct { + CodeNames *[]string `name:"CodeNames" type:"Repeated"` + Relations *[]CreateBlockScopesBlockScopeClusterRelationsItem `name:"Relations" type:"Repeated"` +} + +// CreateBlockScopesBlockScopeProductItem is a repeated param struct in CreateBlockRequest +type CreateBlockScopesBlockScopeProductItem struct { + CodeNames *[]string `name:"CodeNames" type:"Repeated"` + ViewCode *[]string `name:"ViewCode" type:"Repeated"` + Relations *[]CreateBlockScopesBlockScopeProductItemRelationsItem `name:"Relations" type:"Repeated"` + Key string `name:"Key"` +} + +// CreateBlockScopesBlockScopeBgSystemItem is a repeated param struct in CreateBlockRequest +type CreateBlockScopesBlockScopeBgSystemItem struct { + SelfCodeName string `name:"SelfCodeName"` + RelateCodes *[]string `name:"RelateCodes" type:"Repeated"` +} + +// CreateBlockScopesBlockScopeCustomerItem is a repeated param struct in CreateBlockRequest +type CreateBlockScopesBlockScopeCustomerItem struct { + Uid string `name:"Uid"` + ViewCodes *[]string `name:"ViewCodes" type:"Repeated"` + CodeNames *[]string `name:"CodeNames" type:"Repeated"` + Relations *[]CreateBlockScopesBlockScopeCustomerItemRelationsItem `name:"Relations" type:"Repeated"` +} + +// CreateBlockScopesBlockScopeClusterRelationsItem is a repeated param struct in CreateBlockRequest +type CreateBlockScopesBlockScopeClusterRelationsItem struct { + AppCodes *[]string `name:"AppCodes" type:"Repeated"` + LabelCodes *[]string `name:"LabelCodes" type:"Repeated"` + RelateCodes *[]string `name:"RelateCodes" type:"Repeated"` + SelfCode string `name:"SelfCode"` +} + +// CreateBlockScopesBlockScopeProductItemRelationsItem is a repeated param struct in CreateBlockRequest +type CreateBlockScopesBlockScopeProductItemRelationsItem struct { + AppCodes *[]string `name:"AppCodes" type:"Repeated"` + LabelCodes *[]string `name:"LabelCodes" type:"Repeated"` + RelateCodes *[]string `name:"RelateCodes" type:"Repeated"` + SelfCode string `name:"SelfCode"` +} + +// CreateBlockScopesBlockScopeCustomerItemRelationsItem is a repeated param struct in CreateBlockRequest +type CreateBlockScopesBlockScopeCustomerItemRelationsItem struct { + AppCodes *[]string `name:"AppCodes" type:"Repeated"` + LabelCodes *[]string `name:"LabelCodes" type:"Repeated"` + RelateCodes *[]string `name:"RelateCodes" type:"Repeated"` + SelfCode string `name:"SelfCode"` +} + +// CreateBlockResponse is the response struct for api CreateBlock +type CreateBlockResponse struct { + *responses.BaseResponse + Data int64 `json:"Data" xml:"Data"` + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateCreateBlockRequest creates a request to invoke CreateBlock API +func CreateCreateBlockRequest() (request *CreateBlockRequest) { + request = &CreateBlockRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "CreateBlock", "", "") + request.Method = requests.POST + return +} + +// CreateCreateBlockResponse creates a response to parse from CreateBlock response +func CreateCreateBlockResponse() (response *CreateBlockResponse) { + response = &CreateBlockResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/create_operator.go b/services/safe/create_operator.go new file mode 100644 index 000000000..94ba64856 --- /dev/null +++ b/services/safe/create_operator.go @@ -0,0 +1,112 @@ +package safe + +//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" +) + +// CreateOperator invokes the safe.CreateOperator API synchronously +func (client *Client) CreateOperator(request *CreateOperatorRequest) (response *CreateOperatorResponse, err error) { + response = CreateCreateOperatorResponse() + err = client.DoAction(request, response) + return +} + +// CreateOperatorWithChan invokes the safe.CreateOperator API asynchronously +func (client *Client) CreateOperatorWithChan(request *CreateOperatorRequest) (<-chan *CreateOperatorResponse, <-chan error) { + responseChan := make(chan *CreateOperatorResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateOperator(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateOperatorWithCallback invokes the safe.CreateOperator API asynchronously +func (client *Client) CreateOperatorWithCallback(request *CreateOperatorRequest, callback func(response *CreateOperatorResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateOperatorResponse + var err error + defer close(result) + response, err = client.CreateOperator(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateOperatorRequest is the request struct for api CreateOperator +type CreateOperatorRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + BgObject string `position:"Body" name:"BgObject"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + Code string `position:"Body" name:"Code"` + BgSystem string `position:"Body" name:"BgSystem"` + NoRisk requests.Boolean `position:"Body" name:"NoRisk"` + Name string `position:"Body" name:"Name"` + AuthSign string `position:"Body" name:"AuthSign"` + CurEmpId string `position:"Body" name:"CurEmpId"` + NoCheck requests.Boolean `position:"Body" name:"NoCheck"` +} + +// CreateOperatorResponse is the response struct for api CreateOperator +type CreateOperatorResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateCreateOperatorRequest creates a request to invoke CreateOperator API +func CreateCreateOperatorRequest() (request *CreateOperatorRequest) { + request = &CreateOperatorRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "CreateOperator", "", "") + request.Method = requests.POST + return +} + +// CreateCreateOperatorResponse creates a response to parse from CreateOperator response +func CreateCreateOperatorResponse() (response *CreateOperatorResponse) { + response = &CreateOperatorResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/query.go b/services/safe/query.go new file mode 100644 index 000000000..deb0eac6e --- /dev/null +++ b/services/safe/query.go @@ -0,0 +1,108 @@ +package safe + +//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" +) + +// Query invokes the safe.Query API synchronously +func (client *Client) Query(request *QueryRequest) (response *QueryResponse, err error) { + response = CreateQueryResponse() + err = client.DoAction(request, response) + return +} + +// QueryWithChan invokes the safe.Query API asynchronously +func (client *Client) QueryWithChan(request *QueryRequest) (<-chan *QueryResponse, <-chan error) { + responseChan := make(chan *QueryResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.Query(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryWithCallback invokes the safe.Query API asynchronously +func (client *Client) QueryWithCallback(request *QueryRequest, callback func(response *QueryResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryResponse + var err error + defer close(result) + response, err = client.Query(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryRequest is the request struct for api Query +type QueryRequest struct { + *requests.RpcRequest + AuthKey string `position:"Query" name:"AuthKey"` + NeedValidate requests.Boolean `position:"Query" name:"NeedValidate"` + ReqTimestamp requests.Integer `position:"Query" name:"ReqTimestamp"` + AuthSign string `position:"Query" name:"AuthSign"` + SourceOrderId string `position:"Query" name:"SourceOrderId"` + QueryType string `position:"Query" name:"QueryType"` +} + +// QueryResponse is the response struct for api Query +type QueryResponse struct { + *responses.BaseResponse + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateQueryRequest creates a request to invoke Query API +func CreateQueryRequest() (request *QueryRequest) { + request = &QueryRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "Query", "", "") + request.Method = requests.POST + return +} + +// CreateQueryResponse creates a response to parse from Query response +func CreateQueryResponse() (response *QueryResponse) { + response = &QueryResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/query_approve_flow.go b/services/safe/query_approve_flow.go new file mode 100644 index 000000000..2a66786de --- /dev/null +++ b/services/safe/query_approve_flow.go @@ -0,0 +1,107 @@ +package safe + +//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" +) + +// QueryApproveFlow invokes the safe.QueryApproveFlow API synchronously +func (client *Client) QueryApproveFlow(request *QueryApproveFlowRequest) (response *QueryApproveFlowResponse, err error) { + response = CreateQueryApproveFlowResponse() + err = client.DoAction(request, response) + return +} + +// QueryApproveFlowWithChan invokes the safe.QueryApproveFlow API asynchronously +func (client *Client) QueryApproveFlowWithChan(request *QueryApproveFlowRequest) (<-chan *QueryApproveFlowResponse, <-chan error) { + responseChan := make(chan *QueryApproveFlowResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryApproveFlow(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryApproveFlowWithCallback invokes the safe.QueryApproveFlow API asynchronously +func (client *Client) QueryApproveFlowWithCallback(request *QueryApproveFlowRequest, callback func(response *QueryApproveFlowResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryApproveFlowResponse + var err error + defer close(result) + response, err = client.QueryApproveFlow(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryApproveFlowRequest is the request struct for api QueryApproveFlow +type QueryApproveFlowRequest struct { + *requests.RpcRequest + AuthKey string `position:"Query" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Query" name:"ReqTimestamp"` + Stage string `position:"Query" name:"Stage"` + SourceOrderId string `position:"Query" name:"SourceOrderId"` + AuthSign string `position:"Query" name:"AuthSign"` +} + +// QueryApproveFlowResponse is the response struct for api QueryApproveFlow +type QueryApproveFlowResponse struct { + *responses.BaseResponse + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateQueryApproveFlowRequest creates a request to invoke QueryApproveFlow API +func CreateQueryApproveFlowRequest() (request *QueryApproveFlowRequest) { + request = &QueryApproveFlowRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "QueryApproveFlow", "", "") + request.Method = requests.POST + return +} + +// CreateQueryApproveFlowResponse creates a response to parse from QueryApproveFlow response +func CreateQueryApproveFlowResponse() (response *QueryApproveFlowResponse) { + response = &QueryApproveFlowResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/query_block_event.go b/services/safe/query_block_event.go new file mode 100644 index 000000000..6b00f1192 --- /dev/null +++ b/services/safe/query_block_event.go @@ -0,0 +1,123 @@ +package safe + +//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" +) + +// QueryBlockEvent invokes the safe.QueryBlockEvent API synchronously +func (client *Client) QueryBlockEvent(request *QueryBlockEventRequest) (response *QueryBlockEventResponse, err error) { + response = CreateQueryBlockEventResponse() + err = client.DoAction(request, response) + return +} + +// QueryBlockEventWithChan invokes the safe.QueryBlockEvent API asynchronously +func (client *Client) QueryBlockEventWithChan(request *QueryBlockEventRequest) (<-chan *QueryBlockEventResponse, <-chan error) { + responseChan := make(chan *QueryBlockEventResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryBlockEvent(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryBlockEventWithCallback invokes the safe.QueryBlockEvent API asynchronously +func (client *Client) QueryBlockEventWithCallback(request *QueryBlockEventRequest, callback func(response *QueryBlockEventResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryBlockEventResponse + var err error + defer close(result) + response, err = client.QueryBlockEvent(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryBlockEventRequest is the request struct for api QueryBlockEvent +type QueryBlockEventRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + RegionReqs *[]QueryBlockEventRegionReqs `position:"Body" name:"RegionReqs" type:"Repeated"` + BlockHarm string `position:"Body" name:"BlockHarm"` + AuthSign string `position:"Body" name:"AuthSign"` + EndTime requests.Integer `position:"Body" name:"EndTime"` + StartTime requests.Integer `position:"Body" name:"StartTime"` + DeptNo string `position:"Body" name:"DeptNo"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + NeedRule requests.Boolean `position:"Body" name:"NeedRule"` + Scope *[]string `position:"Query" name:"Scope" type:"Repeated"` + Limit requests.Integer `position:"Body" name:"Limit"` + ProductCodes *[]string `position:"Body" name:"ProductCodes" type:"Repeated"` + Page requests.Integer `position:"Body" name:"Page"` + Category string `position:"Body" name:"Category"` + BgSystemName string `position:"Body" name:"BgSystemName"` +} + +// QueryBlockEventRegionReqs is a repeated param struct in QueryBlockEventRequest +type QueryBlockEventRegionReqs struct { + ProductCode string `name:"ProductCode"` + Regions *[]string `name:"Regions" type:"Repeated"` +} + +// QueryBlockEventResponse is the response struct for api QueryBlockEvent +type QueryBlockEventResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateQueryBlockEventRequest creates a request to invoke QueryBlockEvent API +func CreateQueryBlockEventRequest() (request *QueryBlockEventRequest) { + request = &QueryBlockEventRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "QueryBlockEvent", "", "") + request.Method = requests.POST + return +} + +// CreateQueryBlockEventResponse creates a response to parse from QueryBlockEvent response +func CreateQueryBlockEventResponse() (response *QueryBlockEventResponse) { + response = &QueryBlockEventResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/query_change_info.go b/services/safe/query_change_info.go new file mode 100644 index 000000000..a9ca8c0e7 --- /dev/null +++ b/services/safe/query_change_info.go @@ -0,0 +1,133 @@ +package safe + +//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" +) + +// QueryChangeInfo invokes the safe.QueryChangeInfo API synchronously +func (client *Client) QueryChangeInfo(request *QueryChangeInfoRequest) (response *QueryChangeInfoResponse, err error) { + response = CreateQueryChangeInfoResponse() + err = client.DoAction(request, response) + return +} + +// QueryChangeInfoWithChan invokes the safe.QueryChangeInfo API asynchronously +func (client *Client) QueryChangeInfoWithChan(request *QueryChangeInfoRequest) (<-chan *QueryChangeInfoResponse, <-chan error) { + responseChan := make(chan *QueryChangeInfoResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryChangeInfo(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryChangeInfoWithCallback invokes the safe.QueryChangeInfo API asynchronously +func (client *Client) QueryChangeInfoWithCallback(request *QueryChangeInfoRequest, callback func(response *QueryChangeInfoResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryChangeInfoResponse + var err error + defer close(result) + response, err = client.QueryChangeInfo(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryChangeInfoRequest is the request struct for api QueryChangeInfo +type QueryChangeInfoRequest struct { + *requests.RpcRequest + BuId string `position:"Body" name:"BuId"` + AuthKey string `position:"Body" name:"AuthKey"` + Product *[]string `position:"Body" name:"Product" type:"Repeated"` + EndTime requests.Integer `position:"Body" name:"EndTime"` + AuthSign string `position:"Body" name:"AuthSign"` + Source string `position:"Body" name:"Source"` + StartTime requests.Integer `position:"Body" name:"StartTime"` + Type string `position:"Query" name:"Type"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + LevelTree QueryChangeInfoLevelTree `position:"Body" name:"LevelTree" type:"Struct"` + Limit requests.Integer `position:"Body" name:"Limit"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` + BgVid string `position:"Body" name:"BgVid"` + Az *[]string `position:"Body" name:"Az" type:"Repeated"` + Page requests.Integer `position:"Body" name:"Page"` + Keyword string `position:"Body" name:"Keyword"` + Region *[]string `position:"Body" name:"Region" type:"Repeated"` + ChangeSystem string `position:"Body" name:"ChangeSystem"` +} + +// QueryChangeInfoLevelTree is a repeated param struct in QueryChangeInfoRequest +type QueryChangeInfoLevelTree struct { + DataType string `name:"DataType"` + TreeData *[]QueryChangeInfoLevelTreeTreeDataItem `name:"TreeData" type:"Repeated"` +} + +// QueryChangeInfoLevelTreeTreeDataItem is a repeated param struct in QueryChangeInfoRequest +type QueryChangeInfoLevelTreeTreeDataItem struct { + Data *[]string `name:"Data" type:"Repeated"` + Value *[]string `name:"Value" type:"Repeated"` + DataSubType string `name:"DataSubType"` +} + +// QueryChangeInfoResponse is the response struct for api QueryChangeInfo +type QueryChangeInfoResponse struct { + *responses.BaseResponse + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateQueryChangeInfoRequest creates a request to invoke QueryChangeInfo API +func CreateQueryChangeInfoRequest() (request *QueryChangeInfoRequest) { + request = &QueryChangeInfoRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "QueryChangeInfo", "", "") + request.Method = requests.POST + return +} + +// CreateQueryChangeInfoResponse creates a response to parse from QueryChangeInfo response +func CreateQueryChangeInfoResponse() (response *QueryChangeInfoResponse) { + response = &QueryChangeInfoResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/query_check_info.go b/services/safe/query_check_info.go new file mode 100644 index 000000000..340c67640 --- /dev/null +++ b/services/safe/query_check_info.go @@ -0,0 +1,106 @@ +package safe + +//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" +) + +// QueryCheckInfo invokes the safe.QueryCheckInfo API synchronously +func (client *Client) QueryCheckInfo(request *QueryCheckInfoRequest) (response *QueryCheckInfoResponse, err error) { + response = CreateQueryCheckInfoResponse() + err = client.DoAction(request, response) + return +} + +// QueryCheckInfoWithChan invokes the safe.QueryCheckInfo API asynchronously +func (client *Client) QueryCheckInfoWithChan(request *QueryCheckInfoRequest) (<-chan *QueryCheckInfoResponse, <-chan error) { + responseChan := make(chan *QueryCheckInfoResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryCheckInfo(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryCheckInfoWithCallback invokes the safe.QueryCheckInfo API asynchronously +func (client *Client) QueryCheckInfoWithCallback(request *QueryCheckInfoRequest, callback func(response *QueryCheckInfoResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryCheckInfoResponse + var err error + defer close(result) + response, err = client.QueryCheckInfo(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryCheckInfoRequest is the request struct for api QueryCheckInfo +type QueryCheckInfoRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + AuthSign string `position:"Body" name:"AuthSign"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` +} + +// QueryCheckInfoResponse is the response struct for api QueryCheckInfo +type QueryCheckInfoResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateQueryCheckInfoRequest creates a request to invoke QueryCheckInfo API +func CreateQueryCheckInfoRequest() (request *QueryCheckInfoRequest) { + request = &QueryCheckInfoRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "QueryCheckInfo", "", "") + request.Method = requests.POST + return +} + +// CreateQueryCheckInfoResponse creates a response to parse from QueryCheckInfo response +func CreateQueryCheckInfoResponse() (response *QueryCheckInfoResponse) { + response = &QueryCheckInfoResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/query_customer.go b/services/safe/query_customer.go new file mode 100644 index 000000000..65f7dcc3a --- /dev/null +++ b/services/safe/query_customer.go @@ -0,0 +1,107 @@ +package safe + +//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" +) + +// QueryCustomer invokes the safe.QueryCustomer API synchronously +func (client *Client) QueryCustomer(request *QueryCustomerRequest) (response *QueryCustomerResponse, err error) { + response = CreateQueryCustomerResponse() + err = client.DoAction(request, response) + return +} + +// QueryCustomerWithChan invokes the safe.QueryCustomer API asynchronously +func (client *Client) QueryCustomerWithChan(request *QueryCustomerRequest) (<-chan *QueryCustomerResponse, <-chan error) { + responseChan := make(chan *QueryCustomerResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryCustomer(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryCustomerWithCallback invokes the safe.QueryCustomer API asynchronously +func (client *Client) QueryCustomerWithCallback(request *QueryCustomerRequest, callback func(response *QueryCustomerResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryCustomerResponse + var err error + defer close(result) + response, err = client.QueryCustomer(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryCustomerRequest is the request struct for api QueryCustomer +type QueryCustomerRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + Product *[]string `position:"Body" name:"Product" type:"Repeated"` + AuthSign string `position:"Body" name:"AuthSign"` + Type string `position:"Body" name:"Type"` +} + +// QueryCustomerResponse is the response struct for api QueryCustomer +type QueryCustomerResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data []DataItem `json:"Data" xml:"Data"` +} + +// CreateQueryCustomerRequest creates a request to invoke QueryCustomer API +func CreateQueryCustomerRequest() (request *QueryCustomerRequest) { + request = &QueryCustomerRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "QueryCustomer", "", "") + request.Method = requests.POST + return +} + +// CreateQueryCustomerResponse creates a response to parse from QueryCustomer response +func CreateQueryCustomerResponse() (response *QueryCustomerResponse) { + response = &QueryCustomerResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/query_execute_info.go b/services/safe/query_execute_info.go new file mode 100644 index 000000000..2e61c4c89 --- /dev/null +++ b/services/safe/query_execute_info.go @@ -0,0 +1,132 @@ +package safe + +//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" +) + +// QueryExecuteInfo invokes the safe.QueryExecuteInfo API synchronously +func (client *Client) QueryExecuteInfo(request *QueryExecuteInfoRequest) (response *QueryExecuteInfoResponse, err error) { + response = CreateQueryExecuteInfoResponse() + err = client.DoAction(request, response) + return +} + +// QueryExecuteInfoWithChan invokes the safe.QueryExecuteInfo API asynchronously +func (client *Client) QueryExecuteInfoWithChan(request *QueryExecuteInfoRequest) (<-chan *QueryExecuteInfoResponse, <-chan error) { + responseChan := make(chan *QueryExecuteInfoResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryExecuteInfo(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryExecuteInfoWithCallback invokes the safe.QueryExecuteInfo API asynchronously +func (client *Client) QueryExecuteInfoWithCallback(request *QueryExecuteInfoRequest, callback func(response *QueryExecuteInfoResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryExecuteInfoResponse + var err error + defer close(result) + response, err = client.QueryExecuteInfo(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryExecuteInfoRequest is the request struct for api QueryExecuteInfo +type QueryExecuteInfoRequest struct { + *requests.RpcRequest + BuId string `position:"Body" name:"BuId"` + AuthKey string `position:"Body" name:"AuthKey"` + Product *[]string `position:"Body" name:"Product" type:"Repeated"` + EndTime requests.Integer `position:"Body" name:"EndTime"` + AuthSign string `position:"Body" name:"AuthSign"` + Source string `position:"Body" name:"Source"` + StartTime requests.Integer `position:"Body" name:"StartTime"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + LevelTree QueryExecuteInfoLevelTree `position:"Body" name:"LevelTree" type:"Struct"` + Limit requests.Integer `position:"Body" name:"Limit"` + BgVid string `position:"Body" name:"BgVid"` + ExVid string `position:"Body" name:"ExVid"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` + Az *[]string `position:"Body" name:"Az" type:"Repeated"` + Page requests.Integer `position:"Body" name:"Page"` + Keyword string `position:"Body" name:"Keyword"` + Region *[]string `position:"Body" name:"Region" type:"Repeated"` +} + +// QueryExecuteInfoLevelTree is a repeated param struct in QueryExecuteInfoRequest +type QueryExecuteInfoLevelTree struct { + DataType string `name:"DataType"` + TreeData *[]QueryExecuteInfoLevelTreeTreeDataItem `name:"TreeData" type:"Repeated"` +} + +// QueryExecuteInfoLevelTreeTreeDataItem is a repeated param struct in QueryExecuteInfoRequest +type QueryExecuteInfoLevelTreeTreeDataItem struct { + Data *[]string `name:"Data" type:"Repeated"` + Value *[]string `name:"Value" type:"Repeated"` + DataSubType string `name:"DataSubType"` +} + +// QueryExecuteInfoResponse is the response struct for api QueryExecuteInfo +type QueryExecuteInfoResponse struct { + *responses.BaseResponse + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateQueryExecuteInfoRequest creates a request to invoke QueryExecuteInfo API +func CreateQueryExecuteInfoRequest() (request *QueryExecuteInfoRequest) { + request = &QueryExecuteInfoRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "QueryExecuteInfo", "", "") + request.Method = requests.POST + return +} + +// CreateQueryExecuteInfoResponse creates a response to parse from QueryExecuteInfo response +func CreateQueryExecuteInfoResponse() (response *QueryExecuteInfoResponse) { + response = &QueryExecuteInfoResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/query_inner_product_info.go b/services/safe/query_inner_product_info.go new file mode 100644 index 000000000..6332cf2a6 --- /dev/null +++ b/services/safe/query_inner_product_info.go @@ -0,0 +1,108 @@ +package safe + +//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" +) + +// QueryInnerProductInfo invokes the safe.QueryInnerProductInfo API synchronously +func (client *Client) QueryInnerProductInfo(request *QueryInnerProductInfoRequest) (response *QueryInnerProductInfoResponse, err error) { + response = CreateQueryInnerProductInfoResponse() + err = client.DoAction(request, response) + return +} + +// QueryInnerProductInfoWithChan invokes the safe.QueryInnerProductInfo API asynchronously +func (client *Client) QueryInnerProductInfoWithChan(request *QueryInnerProductInfoRequest) (<-chan *QueryInnerProductInfoResponse, <-chan error) { + responseChan := make(chan *QueryInnerProductInfoResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryInnerProductInfo(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryInnerProductInfoWithCallback invokes the safe.QueryInnerProductInfo API asynchronously +func (client *Client) QueryInnerProductInfoWithCallback(request *QueryInnerProductInfoRequest, callback func(response *QueryInnerProductInfoResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryInnerProductInfoResponse + var err error + defer close(result) + response, err = client.QueryInnerProductInfo(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryInnerProductInfoRequest is the request struct for api QueryInnerProductInfo +type QueryInnerProductInfoRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + ProductCode string `position:"Body" name:"ProductCode"` + Limit requests.Integer `position:"Body" name:"Limit"` + AuthSign string `position:"Body" name:"AuthSign"` + Page requests.Integer `position:"Body" name:"Page"` +} + +// QueryInnerProductInfoResponse is the response struct for api QueryInnerProductInfo +type QueryInnerProductInfoResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateQueryInnerProductInfoRequest creates a request to invoke QueryInnerProductInfo API +func CreateQueryInnerProductInfoRequest() (request *QueryInnerProductInfoRequest) { + request = &QueryInnerProductInfoRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "QueryInnerProductInfo", "", "") + request.Method = requests.POST + return +} + +// CreateQueryInnerProductInfoResponse creates a response to parse from QueryInnerProductInfo response +func CreateQueryInnerProductInfoResponse() (response *QueryInnerProductInfoResponse) { + response = &QueryInnerProductInfoResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/query_region_az.go b/services/safe/query_region_az.go new file mode 100644 index 000000000..b370aa557 --- /dev/null +++ b/services/safe/query_region_az.go @@ -0,0 +1,108 @@ +package safe + +//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" +) + +// QueryRegionAz invokes the safe.QueryRegionAz API synchronously +func (client *Client) QueryRegionAz(request *QueryRegionAzRequest) (response *QueryRegionAzResponse, err error) { + response = CreateQueryRegionAzResponse() + err = client.DoAction(request, response) + return +} + +// QueryRegionAzWithChan invokes the safe.QueryRegionAz API asynchronously +func (client *Client) QueryRegionAzWithChan(request *QueryRegionAzRequest) (<-chan *QueryRegionAzResponse, <-chan error) { + responseChan := make(chan *QueryRegionAzResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryRegionAz(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryRegionAzWithCallback invokes the safe.QueryRegionAz API asynchronously +func (client *Client) QueryRegionAzWithCallback(request *QueryRegionAzRequest, callback func(response *QueryRegionAzResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryRegionAzResponse + var err error + defer close(result) + response, err = client.QueryRegionAz(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryRegionAzRequest is the request struct for api QueryRegionAz +type QueryRegionAzRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + Product string `position:"Body" name:"Product"` + Limit requests.Integer `position:"Body" name:"Limit"` + AuthSign string `position:"Body" name:"AuthSign"` + Page requests.Integer `position:"Body" name:"Page"` +} + +// QueryRegionAzResponse is the response struct for api QueryRegionAz +type QueryRegionAzResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateQueryRegionAzRequest creates a request to invoke QueryRegionAz API +func CreateQueryRegionAzRequest() (request *QueryRegionAzRequest) { + request = &QueryRegionAzRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "QueryRegionAz", "", "") + request.Method = requests.POST + return +} + +// CreateQueryRegionAzResponse creates a response to parse from QueryRegionAz response +func CreateQueryRegionAzResponse() (response *QueryRegionAzResponse) { + response = &QueryRegionAzResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/safe_change_cancel.go b/services/safe/safe_change_cancel.go new file mode 100644 index 000000000..fbfdd25b4 --- /dev/null +++ b/services/safe/safe_change_cancel.go @@ -0,0 +1,107 @@ +package safe + +//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" +) + +// SafeChangeCancel invokes the safe.SafeChangeCancel API synchronously +func (client *Client) SafeChangeCancel(request *SafeChangeCancelRequest) (response *SafeChangeCancelResponse, err error) { + response = CreateSafeChangeCancelResponse() + err = client.DoAction(request, response) + return +} + +// SafeChangeCancelWithChan invokes the safe.SafeChangeCancel API asynchronously +func (client *Client) SafeChangeCancelWithChan(request *SafeChangeCancelRequest) (<-chan *SafeChangeCancelResponse, <-chan error) { + responseChan := make(chan *SafeChangeCancelResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SafeChangeCancel(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SafeChangeCancelWithCallback invokes the safe.SafeChangeCancel API asynchronously +func (client *Client) SafeChangeCancelWithCallback(request *SafeChangeCancelRequest, callback func(response *SafeChangeCancelResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SafeChangeCancelResponse + var err error + defer close(result) + response, err = client.SafeChangeCancel(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SafeChangeCancelRequest is the request struct for api SafeChangeCancel +type SafeChangeCancelRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` + AuthSign string `position:"Body" name:"AuthSign"` + OperateEmpNo string `position:"Body" name:"OperateEmpNo"` +} + +// SafeChangeCancelResponse is the response struct for api SafeChangeCancel +type SafeChangeCancelResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateSafeChangeCancelRequest creates a request to invoke SafeChangeCancel API +func CreateSafeChangeCancelRequest() (request *SafeChangeCancelRequest) { + request = &SafeChangeCancelRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "SafeChangeCancel", "", "") + request.Method = requests.POST + return +} + +// CreateSafeChangeCancelResponse creates a response to parse from SafeChangeCancel response +func CreateSafeChangeCancelResponse() (response *SafeChangeCancelResponse) { + response = &SafeChangeCancelResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/safe_change_check.go b/services/safe/safe_change_check.go new file mode 100644 index 000000000..e32a77afe --- /dev/null +++ b/services/safe/safe_change_check.go @@ -0,0 +1,279 @@ +package safe + +//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" +) + +// SafeChangeCheck invokes the safe.SafeChangeCheck API synchronously +func (client *Client) SafeChangeCheck(request *SafeChangeCheckRequest) (response *SafeChangeCheckResponse, err error) { + response = CreateSafeChangeCheckResponse() + err = client.DoAction(request, response) + return +} + +// SafeChangeCheckWithChan invokes the safe.SafeChangeCheck API asynchronously +func (client *Client) SafeChangeCheckWithChan(request *SafeChangeCheckRequest) (<-chan *SafeChangeCheckResponse, <-chan error) { + responseChan := make(chan *SafeChangeCheckResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SafeChangeCheck(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SafeChangeCheckWithCallback invokes the safe.SafeChangeCheck API asynchronously +func (client *Client) SafeChangeCheckWithCallback(request *SafeChangeCheckRequest, callback func(response *SafeChangeCheckResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SafeChangeCheckResponse + var err error + defer close(result) + response, err = client.SafeChangeCheck(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SafeChangeCheckRequest is the request struct for api SafeChangeCheck +type SafeChangeCheckRequest struct { + *requests.RpcRequest + ChangeEnv string `position:"Body" name:"ChangeEnv"` + ChangeOptSubType string `position:"Body" name:"ChangeOptSubType"` + AuthKey string `position:"Body" name:"AuthKey"` + ReleasePackageInfos *[]SafeChangeCheckReleasePackageInfos `position:"Body" name:"ReleasePackageInfos" type:"Repeated"` + Instance SafeChangeCheckInstance `position:"Body" name:"Instance" type:"Struct"` + ChangeOptType string `position:"Body" name:"ChangeOptType"` + ChangeDataType string `position:"Body" name:"ChangeDataType"` + AuthSign string `position:"Body" name:"AuthSign"` + DamagedChangeNotices *[]SafeChangeCheckDamagedChangeNotices `position:"Body" name:"DamagedChangeNotices" type:"Repeated"` + InfluenceInfo SafeChangeCheckInfluenceInfo `position:"Body" name:"InfluenceInfo" type:"Struct"` + Checker *[]string `position:"Query" name:"Checker" type:"Repeated"` + OperateEmpNo string `position:"Body" name:"OperateEmpNo"` + ExtraInfo string `position:"Body" name:"ExtraInfo"` + ChangeSchemes string `position:"Body" name:"ChangeSchemes"` + WhiteType requests.Integer `position:"Body" name:"whiteType"` + ChangeTimes *[]SafeChangeCheckChangeTimes `position:"Body" name:"ChangeTimes" type:"Repeated"` + ChangeValidation string `position:"Body" name:"ChangeValidation"` + ReuseSourceOrderId string `position:"Body" name:"ReuseSourceOrderId"` + ChangeEndTime requests.Integer `position:"Body" name:"ChangeEndTime"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` + CallBackInfo SafeChangeCheckCallBackInfo `position:"Body" name:"CallBackInfo" type:"Struct"` + Rollback string `position:"Body" name:"Rollback"` + BlockInfos *[]SafeChangeCheckBlockInfos `position:"Body" name:"BlockInfos" type:"Repeated"` + GrayStatus string `position:"Body" name:"GrayStatus"` + Product *[]SafeChangeCheckProduct `position:"Body" name:"Product" type:"Repeated"` + BgCustomTemplateExtraDTO SafeChangeCheckBgCustomTemplateExtraDTO `position:"Body" name:"BgCustomTemplateExtraDTO" type:"Struct"` + Follower *[]string `position:"Body" name:"Follower" type:"Repeated"` + ChangeObject string `position:"Body" name:"ChangeObject"` + SourceName string `position:"Body" name:"SourceName"` + RiskLevel string `position:"Body" name:"RiskLevel"` + ChangeTitle string `position:"Body" name:"ChangeTitle"` + NeedModifyDoc string `position:"Body" name:"NeedModifyDoc"` + CreatorEmpId string `position:"Body" name:"CreatorEmpId"` + ChangeStartTime requests.Integer `position:"Body" name:"ChangeStartTime"` + SourceUrl string `position:"Body" name:"SourceUrl"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + HarmChangeNoticeEnum string `position:"Query" name:"HarmChangeNoticeEnum"` + ChangeDesc string `position:"Body" name:"ChangeDesc"` + ExecutorEmpId string `position:"Body" name:"ExecutorEmpId"` + AffectCustomer string `position:"Body" name:"AffectCustomer"` + ChangeSubTypeDesc string `position:"Body" name:"ChangeSubTypeDesc"` + ChangeSystem string `position:"Body" name:"ChangeSystem"` + Incidence string `position:"Body" name:"Incidence"` + ApproveFlowParam SafeChangeCheckApproveFlowParam `position:"Body" name:"ApproveFlowParam" type:"Struct"` + ChangeReason string `position:"Body" name:"ChangeReason"` + ChangeRmarks string `position:"Body" name:"ChangeRmarks"` + ChangeItems string `position:"Body" name:"ChangeItems"` +} + +// SafeChangeCheckDamagedChangeNotices is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckDamagedChangeNotices struct { + EventId string `name:"EventId"` + BgCancelNoticeContent string `name:"BgCancelNoticeContent"` + Channel *[]string `name:"Channel" type:"Repeated"` + Type string `name:"Type"` + BgCancelNoticeEventId string `name:"BgCancelNoticeEventId"` + Content string `name:"Content"` + SensitiveCustomers *[]SafeChangeCheckDamagedChangeNoticesSensitiveCustomersItem `name:"SensitiveCustomers" type:"Repeated"` +} + +// SafeChangeCheckDamagedChangeNoticesSensitiveCustomersItem is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckDamagedChangeNoticesSensitiveCustomersItem struct { + ProductCode string `name:"ProductCode"` + CustomerInfo *[]SafeChangeCheckDamagedChangeNoticesSensitiveCustomersItemCustomerInfoItem `name:"CustomerInfo" type:"Repeated"` +} + +// SafeChangeCheckDamagedChangeNoticesSensitiveCustomersItemCustomerInfoItem is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckDamagedChangeNoticesSensitiveCustomersItemCustomerInfoItem struct { + Uid string `name:"Uid"` + Type string `name:"Type"` + ExtraInfo map[string]string `name:"ExtraInfo" type:"Map"` +} + +// SafeChangeCheckReleasePackageInfos is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckReleasePackageInfos struct { + ReleasePackage *[]string `name:"ReleasePackage" type:"Repeated"` + ProductCode string `name:"ProductCode"` +} + +// SafeChangeCheckInstance is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckInstance struct { + Instance *[]string `name:"instance" type:"Repeated"` + Nc *[]string `name:"Nc" type:"Repeated"` + Uids *[]string `name:"Uids" type:"Repeated"` + InfluenceApp *[]string `name:"influenceApp" type:"Repeated"` + AttributionApp *[]string `name:"attributionApp" type:"Repeated"` +} + +// SafeChangeCheckInfluenceInfo is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckInfluenceInfo struct { + NoticeInfos *[]SafeChangeCheckInfluenceInfoNoticeInfosItem `name:"NoticeInfos" type:"Repeated"` + SensitiveCustomers *[]SafeChangeCheckInfluenceInfoSensitiveCustomersItem `name:"SensitiveCustomers" type:"Repeated"` +} + +// SafeChangeCheckChangeTimes is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckChangeTimes struct { + ChangeEndTime string `name:"ChangeEndTime"` + ChangeStartTime string `name:"ChangeStartTime"` +} + +// SafeChangeCheckCallBackInfo is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckCallBackInfo struct { + PopProduct string `name:"PopProduct"` + EndPoint string `name:"EndPoint"` + RegionId string `name:"RegionId"` + ApiVersion string `name:"ApiVersion"` + Api string `name:"Api"` + Type string `name:"Type"` + Url string `name:"Url"` +} + +// SafeChangeCheckBlockInfos is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckBlockInfos struct { + HitInfos *[]SafeChangeCheckBlockInfosHitInfos `name:"HitInfos" type:"Repeated"` + Id string `name:"Id"` +} + +// SafeChangeCheckProduct is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckProduct struct { + Code string `name:"Code"` + Name string `name:"Name"` +} + +// SafeChangeCheckBgCustomTemplateExtraDTO is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckBgCustomTemplateExtraDTO struct { + BgCustomTemplateInfo string `name:"BgCustomTemplateInfo"` +} + +// SafeChangeCheckApproveFlowParam is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckApproveFlowParam struct { + ApproveNodes *[]SafeChangeCheckApproveFlowParamApproveNodesItem `name:"ApproveNodes" type:"Repeated"` + FlowStatus string `name:"FlowStatus"` +} + +// SafeChangeCheckInfluenceInfoNoticeInfosItem is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckInfluenceInfoNoticeInfosItem struct { + EventId string `name:"EventId"` + Channel *[]string `name:"Channel" type:"Repeated"` + Content string `name:"Content"` +} + +// SafeChangeCheckInfluenceInfoSensitiveCustomersItem is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckInfluenceInfoSensitiveCustomersItem struct { + ProductCode string `name:"ProductCode"` + CustomerInfo *[]SafeChangeCheckInfluenceInfoSensitiveCustomersItemCustomerInfoItem `name:"CustomerInfo" type:"Repeated"` +} + +// SafeChangeCheckBlockInfosHitInfos is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckBlockInfosHitInfos struct { + Scope string `name:"Scope"` + HitObject string `name:"HitObject"` + HitInfo string `name:"HitInfo"` +} + +// SafeChangeCheckApproveFlowParamApproveNodesItem is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckApproveFlowParamApproveNodesItem struct { + ProcessName string `name:"ProcessName"` + NodeStatus string `name:"NodeStatus"` + ApproverDTO *[]SafeChangeCheckApproveFlowParamApproveNodesItemApproverDTOItem `name:"ApproverDTO" type:"Repeated"` + Strategy string `name:"Strategy"` + ProcessNodeOrder string `name:"ProcessNodeOrder"` +} + +// SafeChangeCheckInfluenceInfoSensitiveCustomersItemCustomerInfoItem is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckInfluenceInfoSensitiveCustomersItemCustomerInfoItem struct { + Uid string `name:"Uid"` + Type string `name:"Type"` + ExtraInfo map[string]string `name:"ExtraInfo" type:"Map"` +} + +// SafeChangeCheckApproveFlowParamApproveNodesItemApproverDTOItem is a repeated param struct in SafeChangeCheckRequest +type SafeChangeCheckApproveFlowParamApproveNodesItemApproverDTOItem struct { + ApproveDesc string `name:"ApproveDesc"` + ApproverId string `name:"ApproverId"` + ApproverName string `name:"ApproverName"` + ApproveTime string `name:"ApproveTime"` + Opinion string `name:"Opinion"` +} + +// SafeChangeCheckResponse is the response struct for api SafeChangeCheck +type SafeChangeCheckResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateSafeChangeCheckRequest creates a request to invoke SafeChangeCheck API +func CreateSafeChangeCheckRequest() (request *SafeChangeCheckRequest) { + request = &SafeChangeCheckRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "SafeChangeCheck", "", "") + request.Method = requests.POST + return +} + +// CreateSafeChangeCheckResponse creates a response to parse from SafeChangeCheck response +func CreateSafeChangeCheckResponse() (response *SafeChangeCheckResponse) { + response = &SafeChangeCheckResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/safe_change_end.go b/services/safe/safe_change_end.go new file mode 100644 index 000000000..e092f49aa --- /dev/null +++ b/services/safe/safe_change_end.go @@ -0,0 +1,111 @@ +package safe + +//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" +) + +// SafeChangeEnd invokes the safe.SafeChangeEnd API synchronously +func (client *Client) SafeChangeEnd(request *SafeChangeEndRequest) (response *SafeChangeEndResponse, err error) { + response = CreateSafeChangeEndResponse() + err = client.DoAction(request, response) + return +} + +// SafeChangeEndWithChan invokes the safe.SafeChangeEnd API asynchronously +func (client *Client) SafeChangeEndWithChan(request *SafeChangeEndRequest) (<-chan *SafeChangeEndResponse, <-chan error) { + responseChan := make(chan *SafeChangeEndResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SafeChangeEnd(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SafeChangeEndWithCallback invokes the safe.SafeChangeEnd API asynchronously +func (client *Client) SafeChangeEndWithCallback(request *SafeChangeEndRequest, callback func(response *SafeChangeEndResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SafeChangeEndResponse + var err error + defer close(result) + response, err = client.SafeChangeEnd(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SafeChangeEndRequest is the request struct for api SafeChangeEnd +type SafeChangeEndRequest struct { + *requests.RpcRequest + TotalBatchNo requests.Integer `position:"Body" name:"TotalBatchNo"` + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + ExecutorEmpId string `position:"Body" name:"ExecutorEmpId"` + ChangeEndTime requests.Integer `position:"Body" name:"ChangeEndTime"` + CurBatchNo requests.Integer `position:"Body" name:"CurBatchNo"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` + AuthSign string `position:"Body" name:"AuthSign"` + ChangeResult string `position:"Body" name:"ChangeResult"` +} + +// SafeChangeEndResponse is the response struct for api SafeChangeEnd +type SafeChangeEndResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateSafeChangeEndRequest creates a request to invoke SafeChangeEnd API +func CreateSafeChangeEndRequest() (request *SafeChangeEndRequest) { + request = &SafeChangeEndRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "SafeChangeEnd", "", "") + request.Method = requests.POST + return +} + +// CreateSafeChangeEndResponse creates a response to parse from SafeChangeEnd response +func CreateSafeChangeEndResponse() (response *SafeChangeEndResponse) { + response = &SafeChangeEndResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/safe_change_query.go b/services/safe/safe_change_query.go new file mode 100644 index 000000000..593f60f90 --- /dev/null +++ b/services/safe/safe_change_query.go @@ -0,0 +1,109 @@ +package safe + +//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" +) + +// SafeChangeQuery invokes the safe.SafeChangeQuery API synchronously +func (client *Client) SafeChangeQuery(request *SafeChangeQueryRequest) (response *SafeChangeQueryResponse, err error) { + response = CreateSafeChangeQueryResponse() + err = client.DoAction(request, response) + return +} + +// SafeChangeQueryWithChan invokes the safe.SafeChangeQuery API asynchronously +func (client *Client) SafeChangeQueryWithChan(request *SafeChangeQueryRequest) (<-chan *SafeChangeQueryResponse, <-chan error) { + responseChan := make(chan *SafeChangeQueryResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SafeChangeQuery(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SafeChangeQueryWithCallback invokes the safe.SafeChangeQuery API asynchronously +func (client *Client) SafeChangeQueryWithCallback(request *SafeChangeQueryRequest, callback func(response *SafeChangeQueryResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SafeChangeQueryResponse + var err error + defer close(result) + response, err = client.SafeChangeQuery(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SafeChangeQueryRequest is the request struct for api SafeChangeQuery +type SafeChangeQueryRequest struct { + *requests.RpcRequest + NeedValidate requests.Boolean `position:"Body" name:"NeedValidate"` + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + ReturnType requests.Boolean `position:"Query" name:"ReturnType"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` + AuthSign string `position:"Body" name:"AuthSign"` + QueryType string `position:"Body" name:"QueryType"` +} + +// SafeChangeQueryResponse is the response struct for api SafeChangeQuery +type SafeChangeQueryResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateSafeChangeQueryRequest creates a request to invoke SafeChangeQuery API +func CreateSafeChangeQueryRequest() (request *SafeChangeQueryRequest) { + request = &SafeChangeQueryRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "SafeChangeQuery", "", "") + request.Method = requests.POST + return +} + +// CreateSafeChangeQueryResponse creates a response to parse from SafeChangeQuery response +func CreateSafeChangeQueryResponse() (response *SafeChangeQueryResponse) { + response = &SafeChangeQueryResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/safe_change_query_approve_flow.go b/services/safe/safe_change_query_approve_flow.go new file mode 100644 index 000000000..e9fe0f222 --- /dev/null +++ b/services/safe/safe_change_query_approve_flow.go @@ -0,0 +1,107 @@ +package safe + +//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" +) + +// SafeChangeQueryApproveFlow invokes the safe.SafeChangeQueryApproveFlow API synchronously +func (client *Client) SafeChangeQueryApproveFlow(request *SafeChangeQueryApproveFlowRequest) (response *SafeChangeQueryApproveFlowResponse, err error) { + response = CreateSafeChangeQueryApproveFlowResponse() + err = client.DoAction(request, response) + return +} + +// SafeChangeQueryApproveFlowWithChan invokes the safe.SafeChangeQueryApproveFlow API asynchronously +func (client *Client) SafeChangeQueryApproveFlowWithChan(request *SafeChangeQueryApproveFlowRequest) (<-chan *SafeChangeQueryApproveFlowResponse, <-chan error) { + responseChan := make(chan *SafeChangeQueryApproveFlowResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SafeChangeQueryApproveFlow(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SafeChangeQueryApproveFlowWithCallback invokes the safe.SafeChangeQueryApproveFlow API asynchronously +func (client *Client) SafeChangeQueryApproveFlowWithCallback(request *SafeChangeQueryApproveFlowRequest, callback func(response *SafeChangeQueryApproveFlowResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SafeChangeQueryApproveFlowResponse + var err error + defer close(result) + response, err = client.SafeChangeQueryApproveFlow(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SafeChangeQueryApproveFlowRequest is the request struct for api SafeChangeQueryApproveFlow +type SafeChangeQueryApproveFlowRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + Stage string `position:"Body" name:"Stage"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` + AuthSign string `position:"Body" name:"AuthSign"` +} + +// SafeChangeQueryApproveFlowResponse is the response struct for api SafeChangeQueryApproveFlow +type SafeChangeQueryApproveFlowResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data []DataItem `json:"Data" xml:"Data"` +} + +// CreateSafeChangeQueryApproveFlowRequest creates a request to invoke SafeChangeQueryApproveFlow API +func CreateSafeChangeQueryApproveFlowRequest() (request *SafeChangeQueryApproveFlowRequest) { + request = &SafeChangeQueryApproveFlowRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "SafeChangeQueryApproveFlow", "", "") + request.Method = requests.POST + return +} + +// CreateSafeChangeQueryApproveFlowResponse creates a response to parse from SafeChangeQueryApproveFlow response +func CreateSafeChangeQueryApproveFlowResponse() (response *SafeChangeQueryApproveFlowResponse) { + response = &SafeChangeQueryApproveFlowResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/safe_change_start.go b/services/safe/safe_change_start.go new file mode 100644 index 000000000..86dbe73bf --- /dev/null +++ b/services/safe/safe_change_start.go @@ -0,0 +1,115 @@ +package safe + +//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" +) + +// SafeChangeStart invokes the safe.SafeChangeStart API synchronously +func (client *Client) SafeChangeStart(request *SafeChangeStartRequest) (response *SafeChangeStartResponse, err error) { + response = CreateSafeChangeStartResponse() + err = client.DoAction(request, response) + return +} + +// SafeChangeStartWithChan invokes the safe.SafeChangeStart API asynchronously +func (client *Client) SafeChangeStartWithChan(request *SafeChangeStartRequest) (<-chan *SafeChangeStartResponse, <-chan error) { + responseChan := make(chan *SafeChangeStartResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SafeChangeStart(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SafeChangeStartWithCallback invokes the safe.SafeChangeStart API asynchronously +func (client *Client) SafeChangeStartWithCallback(request *SafeChangeStartRequest, callback func(response *SafeChangeStartResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SafeChangeStartResponse + var err error + defer close(result) + response, err = client.SafeChangeStart(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SafeChangeStartRequest is the request struct for api SafeChangeStart +type SafeChangeStartRequest struct { + *requests.RpcRequest + TotalBatchNo requests.Integer `position:"Body" name:"TotalBatchNo"` + AuthKey string `position:"Body" name:"AuthKey"` + ChangeOptType string `position:"Body" name:"ChangeOptType"` + ChangeObject string `position:"Body" name:"ChangeObject"` + AuthSign string `position:"Body" name:"AuthSign"` + ChangeTitle string `position:"Body" name:"ChangeTitle"` + CreatorEmpId string `position:"Body" name:"CreatorEmpId"` + ChangeStartTime requests.Integer `position:"Body" name:"ChangeStartTime"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + ExecutorEmpId string `position:"Body" name:"ExecutorEmpId"` + ChangeEndTime requests.Integer `position:"Body" name:"ChangeEndTime"` + CurBatchNo requests.Integer `position:"Body" name:"CurBatchNo"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` +} + +// SafeChangeStartResponse is the response struct for api SafeChangeStart +type SafeChangeStartResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateSafeChangeStartRequest creates a request to invoke SafeChangeStart API +func CreateSafeChangeStartRequest() (request *SafeChangeStartRequest) { + request = &SafeChangeStartRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "SafeChangeStart", "", "") + request.Method = requests.POST + return +} + +// CreateSafeChangeStartResponse creates a response to parse from SafeChangeStart response +func CreateSafeChangeStartResponse() (response *SafeChangeStartResponse) { + response = &SafeChangeStartResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/safe_change_start_approve.go b/services/safe/safe_change_start_approve.go new file mode 100644 index 000000000..504efedc9 --- /dev/null +++ b/services/safe/safe_change_start_approve.go @@ -0,0 +1,108 @@ +package safe + +//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" +) + +// SafeChangeStartApprove invokes the safe.SafeChangeStartApprove API synchronously +func (client *Client) SafeChangeStartApprove(request *SafeChangeStartApproveRequest) (response *SafeChangeStartApproveResponse, err error) { + response = CreateSafeChangeStartApproveResponse() + err = client.DoAction(request, response) + return +} + +// SafeChangeStartApproveWithChan invokes the safe.SafeChangeStartApprove API asynchronously +func (client *Client) SafeChangeStartApproveWithChan(request *SafeChangeStartApproveRequest) (<-chan *SafeChangeStartApproveResponse, <-chan error) { + responseChan := make(chan *SafeChangeStartApproveResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SafeChangeStartApprove(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SafeChangeStartApproveWithCallback invokes the safe.SafeChangeStartApprove API asynchronously +func (client *Client) SafeChangeStartApproveWithCallback(request *SafeChangeStartApproveRequest, callback func(response *SafeChangeStartApproveResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SafeChangeStartApproveResponse + var err error + defer close(result) + response, err = client.SafeChangeStartApprove(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SafeChangeStartApproveRequest is the request struct for api SafeChangeStartApprove +type SafeChangeStartApproveRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + SourceOrderId string `position:"Body" name:"SourceOrderId"` + AuthSign string `position:"Body" name:"AuthSign"` + CreatorEmpId string `position:"Body" name:"CreatorEmpId"` + ExtraInfo string `position:"Body" name:"ExtraInfo"` +} + +// SafeChangeStartApproveResponse is the response struct for api SafeChangeStartApprove +type SafeChangeStartApproveResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateSafeChangeStartApproveRequest creates a request to invoke SafeChangeStartApprove API +func CreateSafeChangeStartApproveRequest() (request *SafeChangeStartApproveRequest) { + request = &SafeChangeStartApproveRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "SafeChangeStartApprove", "", "") + request.Method = requests.POST + return +} + +// CreateSafeChangeStartApproveResponse creates a response to parse from SafeChangeStartApprove response +func CreateSafeChangeStartApproveResponse() (response *SafeChangeStartApproveResponse) { + response = &SafeChangeStartApproveResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/safe_scope_data.go b/services/safe/safe_scope_data.go new file mode 100644 index 000000000..70eb3ee54 --- /dev/null +++ b/services/safe/safe_scope_data.go @@ -0,0 +1,124 @@ +package safe + +//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" +) + +// SafeScopeData invokes the safe.SafeScopeData API synchronously +func (client *Client) SafeScopeData(request *SafeScopeDataRequest) (response *SafeScopeDataResponse, err error) { + response = CreateSafeScopeDataResponse() + err = client.DoAction(request, response) + return +} + +// SafeScopeDataWithChan invokes the safe.SafeScopeData API asynchronously +func (client *Client) SafeScopeDataWithChan(request *SafeScopeDataRequest) (<-chan *SafeScopeDataResponse, <-chan error) { + responseChan := make(chan *SafeScopeDataResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SafeScopeData(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SafeScopeDataWithCallback invokes the safe.SafeScopeData API asynchronously +func (client *Client) SafeScopeDataWithCallback(request *SafeScopeDataRequest, callback func(response *SafeScopeDataResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SafeScopeDataResponse + var err error + defer close(result) + response, err = client.SafeScopeData(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SafeScopeDataRequest is the request struct for api SafeScopeData +type SafeScopeDataRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + Item string `position:"Body" name:"Item"` + ProductCode string `position:"Body" name:"ProductCode"` + ProductId requests.Integer `position:"Body" name:"ProductId"` + CodeList string `position:"Body" name:"CodeList"` + ParentCode string `position:"Body" name:"ParentCode"` + OrderDirection string `position:"Body" name:"OrderDirection"` + OrderBy string `position:"Body" name:"OrderBy"` + AuthSign string `position:"Body" name:"AuthSign"` + RegionNameEn string `position:"Body" name:"RegionNameEn"` + GroupBy string `position:"Body" name:"GroupBy"` + Type requests.Integer `position:"Body" name:"Type"` + ParentId requests.Integer `position:"Body" name:"ParentId"` + Uid string `position:"Body" name:"Uid"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + NeedTotalCount requests.Boolean `position:"Body" name:"NeedTotalCount"` + Limit requests.Integer `position:"Body" name:"Limit"` + IdList string `position:"Body" name:"IdList"` + Page requests.Integer `position:"Body" name:"Page"` + Factor string `position:"Body" name:"Factor"` + Category string `position:"Body" name:"Category"` + SearchValue string `position:"Body" name:"SearchValue"` +} + +// SafeScopeDataResponse is the response struct for api SafeScopeData +type SafeScopeDataResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateSafeScopeDataRequest creates a request to invoke SafeScopeData API +func CreateSafeScopeDataRequest() (request *SafeScopeDataRequest) { + request = &SafeScopeDataRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "SafeScopeData", "", "") + request.Method = requests.POST + return +} + +// CreateSafeScopeDataResponse creates a response to parse from SafeScopeData response +func CreateSafeScopeDataResponse() (response *SafeScopeDataResponse) { + response = &SafeScopeDataResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/start_approve.go b/services/safe/start_approve.go new file mode 100644 index 000000000..d201911a9 --- /dev/null +++ b/services/safe/start_approve.go @@ -0,0 +1,108 @@ +package safe + +//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" +) + +// StartApprove invokes the safe.StartApprove API synchronously +func (client *Client) StartApprove(request *StartApproveRequest) (response *StartApproveResponse, err error) { + response = CreateStartApproveResponse() + err = client.DoAction(request, response) + return +} + +// StartApproveWithChan invokes the safe.StartApprove API asynchronously +func (client *Client) StartApproveWithChan(request *StartApproveRequest) (<-chan *StartApproveResponse, <-chan error) { + responseChan := make(chan *StartApproveResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StartApprove(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StartApproveWithCallback invokes the safe.StartApprove API asynchronously +func (client *Client) StartApproveWithCallback(request *StartApproveRequest, callback func(response *StartApproveResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StartApproveResponse + var err error + defer close(result) + response, err = client.StartApprove(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StartApproveRequest is the request struct for api StartApprove +type StartApproveRequest struct { + *requests.RpcRequest + AuthKey string `position:"Query" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Query" name:"ReqTimestamp"` + SourceOrderId string `position:"Query" name:"SourceOrderId"` + AuthSign string `position:"Query" name:"AuthSign"` + CreatorEmpId string `position:"Query" name:"CreatorEmpId"` + ExtraInfo string `position:"Query" name:"ExtraInfo"` +} + +// StartApproveResponse is the response struct for api StartApprove +type StartApproveResponse struct { + *responses.BaseResponse + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` + Code int `json:"Code" xml:"Code"` + Success bool `json:"Success" xml:"Success"` +} + +// CreateStartApproveRequest creates a request to invoke StartApprove API +func CreateStartApproveRequest() (request *StartApproveRequest) { + request = &StartApproveRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "StartApprove", "", "") + request.Method = requests.POST + return +} + +// CreateStartApproveResponse creates a response to parse from StartApprove response +func CreateStartApproveResponse() (response *StartApproveResponse) { + response = &StartApproveResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/safe/struct_az_list.go b/services/safe/struct_az_list.go new file mode 100644 index 000000000..65a7dd1df --- /dev/null +++ b/services/safe/struct_az_list.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// AzList is a nested struct in safe response +type AzList struct { + AzList []string `json:"AzList" xml:"AzList"` +} diff --git a/services/safe/struct_block_rule.go b/services/safe/struct_block_rule.go new file mode 100644 index 000000000..e9164d74b --- /dev/null +++ b/services/safe/struct_block_rule.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// BlockRule is a nested struct in safe response +type BlockRule struct { + BlockRuleItem []BlockRuleItem `json:"BlockRule" xml:"BlockRule"` +} diff --git a/services/safe/struct_block_rule_item.go b/services/safe/struct_block_rule_item.go new file mode 100644 index 000000000..e601dff70 --- /dev/null +++ b/services/safe/struct_block_rule_item.go @@ -0,0 +1,27 @@ +package safe + +//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. + +// BlockRuleItem is a nested struct in safe response +type BlockRuleItem struct { + BlockId int64 `json:"BlockId" xml:"BlockId"` + ScopeRuleId int64 `json:"ScopeRuleId" xml:"ScopeRuleId"` + BlockHarm string `json:"BlockHarm" xml:"BlockHarm"` + ScopeStartTime int64 `json:"ScopeStartTime" xml:"ScopeStartTime"` + ScopeEndTime int64 `json:"ScopeEndTime" xml:"ScopeEndTime"` + Express string `json:"Express" xml:"Express"` + ScopeNodeList []ScopeNodeListItem `json:"ScopeNodeList" xml:"ScopeNodeList"` +} diff --git a/services/safe/struct_change_times.go b/services/safe/struct_change_times.go new file mode 100644 index 000000000..c966e7a32 --- /dev/null +++ b/services/safe/struct_change_times.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// ChangeTimes is a nested struct in safe response +type ChangeTimes struct { + ChangeTimesItem []ChangeTimesItem `json:"ChangeTimes" xml:"ChangeTimes"` +} diff --git a/services/safe/struct_change_times_item.go b/services/safe/struct_change_times_item.go new file mode 100644 index 000000000..e106b9ef2 --- /dev/null +++ b/services/safe/struct_change_times_item.go @@ -0,0 +1,22 @@ +package safe + +//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. + +// ChangeTimesItem is a nested struct in safe response +type ChangeTimesItem struct { + ChangeStartTime int64 `json:"ChangeStartTime" xml:"ChangeStartTime"` + ChangeEndTime int64 `json:"ChangeEndTime" xml:"ChangeEndTime"` +} diff --git a/services/safe/struct_check_detail_list.go b/services/safe/struct_check_detail_list.go new file mode 100644 index 000000000..0eecee552 --- /dev/null +++ b/services/safe/struct_check_detail_list.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// CheckDetailList is a nested struct in safe response +type CheckDetailList struct { + CheckDetailListItem []CheckDetailListItem `json:"CheckDetailList" xml:"CheckDetailList"` +} diff --git a/services/safe/struct_check_detail_list_item.go b/services/safe/struct_check_detail_list_item.go new file mode 100644 index 000000000..362f69fe2 --- /dev/null +++ b/services/safe/struct_check_detail_list_item.go @@ -0,0 +1,27 @@ +package safe + +//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. + +// CheckDetailListItem is a nested struct in safe response +type CheckDetailListItem struct { + CheckholdReason string `json:"CheckholdReason" xml:"CheckholdReason"` + Title string `json:"Title" xml:"Title"` + Url string `json:"Url" xml:"Url"` + Desc string `json:"Desc" xml:"Desc"` + PicInfo string `json:"PicInfo" xml:"PicInfo"` + RiskExplain string `json:"RiskExplain" xml:"RiskExplain"` + BlockRule []BlockRuleItem `json:"BlockRule" xml:"BlockRule"` +} diff --git a/services/safe/struct_checkhold_reason_in_change_check.go b/services/safe/struct_checkhold_reason_in_change_check.go new file mode 100644 index 000000000..e5c84dda1 --- /dev/null +++ b/services/safe/struct_checkhold_reason_in_change_check.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// CheckholdReasonInChangeCheck is a nested struct in safe response +type CheckholdReasonInChangeCheck struct { + CheckholdReason []string `json:"CheckholdReason" xml:"CheckholdReason"` +} diff --git a/services/safe/struct_checkhold_reason_in_safe_change_check.go b/services/safe/struct_checkhold_reason_in_safe_change_check.go new file mode 100644 index 000000000..569e1c1f1 --- /dev/null +++ b/services/safe/struct_checkhold_reason_in_safe_change_check.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// CheckholdReasonInSafeChangeCheck is a nested struct in safe response +type CheckholdReasonInSafeChangeCheck struct { + CheckholdReason []string `json:"CheckholdReason" xml:"CheckholdReason"` +} diff --git a/services/safe/struct_checkhold_reason_in_safe_change_query.go b/services/safe/struct_checkhold_reason_in_safe_change_query.go new file mode 100644 index 000000000..bb6105919 --- /dev/null +++ b/services/safe/struct_checkhold_reason_in_safe_change_query.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// CheckholdReasonInSafeChangeQuery is a nested struct in safe response +type CheckholdReasonInSafeChangeQuery struct { + CheckholdReason []string `json:"CheckholdReason" xml:"CheckholdReason"` +} diff --git a/services/safe/struct_data.go b/services/safe/struct_data.go new file mode 100644 index 000000000..7acd621ec --- /dev/null +++ b/services/safe/struct_data.go @@ -0,0 +1,68 @@ +package safe + +//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 safe response +type Data struct { + ChangeResult string `json:"ChangeResult" xml:"ChangeResult"` + ChangeCancel string `json:"ChangeCancel" xml:"ChangeCancel"` + SubSatus string `json:"SubSatus" xml:"SubSatus"` + EndTime int64 `json:"EndTime" xml:"EndTime"` + ChangeTitle string `json:"ChangeTitle" xml:"ChangeTitle"` + StartTime int64 `json:"StartTime" xml:"StartTime"` + RuleId int64 `json:"RuleId" xml:"RuleId"` + Id int64 `json:"Id" xml:"Id"` + BgVid string `json:"BgVid" xml:"BgVid"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + ApproveStrategyId int64 `json:"ApproveStrategyId" xml:"ApproveStrategyId"` + GmtCreate int64 `json:"GmtCreate" xml:"GmtCreate"` + ApproveResultUrl string `json:"ApproveResultUrl" xml:"ApproveResultUrl"` + ApproveStatus string `json:"ApproveStatus" xml:"ApproveStatus"` + GmtModified int64 `json:"GmtModified" xml:"GmtModified"` + InnerProductName string `json:"InnerProductName" xml:"InnerProductName"` + Status string `json:"Status" xml:"Status"` + InnerProductCode string `json:"InnerProductCode" xml:"InnerProductCode"` + ChangeObject string `json:"ChangeObject" xml:"ChangeObject"` + ExtraInfo map[string]interface{} `json:"ExtraInfo" xml:"ExtraInfo"` + ExecutorEmpName string `json:"ExecutorEmpName" xml:"ExecutorEmpName"` + CheckStatus string `json:"CheckStatus" xml:"CheckStatus"` + ProductName string `json:"ProductName" xml:"ProductName"` + EmpId string `json:"EmpId" xml:"EmpId"` + ChangeStatus string `json:"ChangeStatus" xml:"ChangeStatus"` + Title string `json:"Title" xml:"Title"` + SourceOrderId string `json:"SourceOrderId" xml:"SourceOrderId"` + ChangeSystem string `json:"ChangeSystem" xml:"ChangeSystem"` + Reason string `json:"Reason" xml:"Reason"` + ChangeEndTime int64 `json:"ChangeEndTime" xml:"ChangeEndTime"` + ChangeStartTime int64 `json:"ChangeStartTime" xml:"ChangeStartTime"` + ExecutorEmpId string `json:"ExecutorEmpId" xml:"ExecutorEmpId"` + CheckResultUrl string `json:"CheckResultUrl" xml:"CheckResultUrl"` + ChangeOptType string `json:"ChangeOptType" xml:"ChangeOptType"` + BgCheckStatus string `json:"BgCheckStatus" xml:"BgCheckStatus"` + RegionName string `json:"RegionName" xml:"RegionName"` + Url string `json:"Url" xml:"Url"` + RegionCode string `json:"RegionCode" xml:"RegionCode"` + Total int64 `json:"Total" xml:"Total"` + AzList []string `json:"AzList" xml:"AzList"` + CheckholdReason []string `json:"CheckholdReason" xml:"CheckholdReason"` + Data []string `json:"Data" xml:"Data"` + Pagination Pagination `json:"Pagination" xml:"Pagination"` + ChangeTimes []ChangeTimesItem `json:"ChangeTimes" xml:"ChangeTimes"` + DataInfo []Data `json:"DataInfo" xml:"DataInfo"` + CheckDetailList []CheckDetailListItem `json:"CheckDetailList" xml:"CheckDetailList"` + EventTimes []EventTime `json:"EventTimes" xml:"EventTimes"` + RuleDetailUrlList []RuleDetailUrlListItem `json:"RuleDetailUrlList" xml:"RuleDetailUrlList"` +} diff --git a/services/safe/struct_data_in_query_customer.go b/services/safe/struct_data_in_query_customer.go new file mode 100644 index 000000000..056239e68 --- /dev/null +++ b/services/safe/struct_data_in_query_customer.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// DataInQueryCustomer is a nested struct in safe response +type DataInQueryCustomer struct { + DataItem []DataItem `json:"Data" xml:"Data"` +} diff --git a/services/safe/struct_data_in_safe_change_query_approve_flow.go b/services/safe/struct_data_in_safe_change_query_approve_flow.go new file mode 100644 index 000000000..ff5692db1 --- /dev/null +++ b/services/safe/struct_data_in_safe_change_query_approve_flow.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// DataInSafeChangeQueryApproveFlow is a nested struct in safe response +type DataInSafeChangeQueryApproveFlow struct { + DataItem []DataItem `json:"Data" xml:"Data"` +} diff --git a/services/safe/struct_data_in_safe_scope_data.go b/services/safe/struct_data_in_safe_scope_data.go new file mode 100644 index 000000000..88a78be16 --- /dev/null +++ b/services/safe/struct_data_in_safe_scope_data.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// DataInSafeScopeData is a nested struct in safe response +type DataInSafeScopeData struct { + Data []string `json:"Data" xml:"Data"` +} diff --git a/services/safe/struct_data_info_in_query_block_event.go b/services/safe/struct_data_info_in_query_block_event.go new file mode 100644 index 000000000..6e85a08ba --- /dev/null +++ b/services/safe/struct_data_info_in_query_block_event.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// DataInfoInQueryBlockEvent is a nested struct in safe response +type DataInfoInQueryBlockEvent struct { + Data []Data `json:"Data" xml:"Data"` +} diff --git a/services/safe/struct_data_info_in_query_inner_product_info.go b/services/safe/struct_data_info_in_query_inner_product_info.go new file mode 100644 index 000000000..75cc0652a --- /dev/null +++ b/services/safe/struct_data_info_in_query_inner_product_info.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// DataInfoInQueryInnerProductInfo is a nested struct in safe response +type DataInfoInQueryInnerProductInfo struct { + Data []Data `json:"Data" xml:"Data"` +} diff --git a/services/safe/struct_data_info_in_query_region_az.go b/services/safe/struct_data_info_in_query_region_az.go new file mode 100644 index 000000000..455795e14 --- /dev/null +++ b/services/safe/struct_data_info_in_query_region_az.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// DataInfoInQueryRegionAz is a nested struct in safe response +type DataInfoInQueryRegionAz struct { + Data []Data `json:"Data" xml:"Data"` +} diff --git a/services/safe/struct_data_item.go b/services/safe/struct_data_item.go new file mode 100644 index 000000000..d94b2d51f --- /dev/null +++ b/services/safe/struct_data_item.go @@ -0,0 +1,27 @@ +package safe + +//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 safe response +type DataItem struct { + Uid string `json:"Uid" xml:"Uid"` + Approver string `json:"Approver" xml:"Approver"` + Product string `json:"Product" xml:"Product"` + NodeName string `json:"NodeName" xml:"NodeName"` + ApproveStrategy string `json:"ApproveStrategy" xml:"ApproveStrategy"` + NodeStatus string `json:"NodeStatus" xml:"NodeStatus"` + Type string `json:"Type" xml:"Type"` +} diff --git a/services/safe/struct_event_time.go b/services/safe/struct_event_time.go new file mode 100644 index 000000000..41fa15551 --- /dev/null +++ b/services/safe/struct_event_time.go @@ -0,0 +1,24 @@ +package safe + +//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. + +// EventTime is a nested struct in safe response +type EventTime struct { + StartTime int64 `json:"StartTime" xml:"StartTime"` + EndTime int64 `json:"EndTime" xml:"EndTime"` + Express string `json:"Express" xml:"Express"` + Rule []RuleItem `json:"Rule" xml:"Rule"` +} diff --git a/services/safe/struct_event_times.go b/services/safe/struct_event_times.go new file mode 100644 index 000000000..24c4f4a4a --- /dev/null +++ b/services/safe/struct_event_times.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// EventTimes is a nested struct in safe response +type EventTimes struct { + EventTime []EventTime `json:"EventTime" xml:"EventTime"` +} diff --git a/services/safe/struct_pagination.go b/services/safe/struct_pagination.go new file mode 100644 index 000000000..e6b864fa4 --- /dev/null +++ b/services/safe/struct_pagination.go @@ -0,0 +1,22 @@ +package safe + +//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. + +// Pagination is a nested struct in safe response +type Pagination struct { + Page int `json:"Page" xml:"Page"` + Limit int `json:"Limit" xml:"Limit"` +} diff --git a/services/safe/struct_rule.go b/services/safe/struct_rule.go new file mode 100644 index 000000000..b6770b42d --- /dev/null +++ b/services/safe/struct_rule.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// Rule is a nested struct in safe response +type Rule struct { + RuleItem []RuleItem `json:"Rule" xml:"Rule"` +} diff --git a/services/safe/struct_rule_detail_url_list_in_change_check.go b/services/safe/struct_rule_detail_url_list_in_change_check.go new file mode 100644 index 000000000..fe7a377dd --- /dev/null +++ b/services/safe/struct_rule_detail_url_list_in_change_check.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// RuleDetailUrlListInChangeCheck is a nested struct in safe response +type RuleDetailUrlListInChangeCheck struct { + RuleDetailUrlListItem []RuleDetailUrlListItem `json:"RuleDetailUrlList" xml:"RuleDetailUrlList"` +} diff --git a/services/safe/struct_rule_detail_url_list_in_safe_change_check.go b/services/safe/struct_rule_detail_url_list_in_safe_change_check.go new file mode 100644 index 000000000..4aa3b1f3f --- /dev/null +++ b/services/safe/struct_rule_detail_url_list_in_safe_change_check.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// RuleDetailUrlListInSafeChangeCheck is a nested struct in safe response +type RuleDetailUrlListInSafeChangeCheck struct { + RuleDetailUrlListItem []RuleDetailUrlListItem `json:"RuleDetailUrlList" xml:"RuleDetailUrlList"` +} diff --git a/services/safe/struct_rule_detail_url_list_item.go b/services/safe/struct_rule_detail_url_list_item.go new file mode 100644 index 000000000..5d89be0ca --- /dev/null +++ b/services/safe/struct_rule_detail_url_list_item.go @@ -0,0 +1,23 @@ +package safe + +//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. + +// RuleDetailUrlListItem is a nested struct in safe response +type RuleDetailUrlListItem struct { + SceneEnum string `json:"SceneEnum" xml:"SceneEnum"` + Title string `json:"Title" xml:"Title"` + Url string `json:"Url" xml:"Url"` +} diff --git a/services/safe/struct_rule_item.go b/services/safe/struct_rule_item.go new file mode 100644 index 000000000..c772588cb --- /dev/null +++ b/services/safe/struct_rule_item.go @@ -0,0 +1,26 @@ +package safe + +//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. + +// RuleItem is a nested struct in safe response +type RuleItem struct { + Type string `json:"Type" xml:"Type"` + Level1 string `json:"Level1" xml:"Level1"` + Level2 string `json:"Level2" xml:"Level2"` + Level3 string `json:"Level3" xml:"Level3"` + Level4 string `json:"Level4" xml:"Level4"` + Level5 string `json:"Level5" xml:"Level5"` +} diff --git a/services/safe/struct_scope_node_list.go b/services/safe/struct_scope_node_list.go new file mode 100644 index 000000000..22d235eec --- /dev/null +++ b/services/safe/struct_scope_node_list.go @@ -0,0 +1,21 @@ +package safe + +//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. + +// ScopeNodeList is a nested struct in safe response +type ScopeNodeList struct { + ScopeNodeListItem []ScopeNodeListItem `json:"ScopeNodeList" xml:"ScopeNodeList"` +} diff --git a/services/safe/struct_scope_node_list_item.go b/services/safe/struct_scope_node_list_item.go new file mode 100644 index 000000000..06cd2c9ee --- /dev/null +++ b/services/safe/struct_scope_node_list_item.go @@ -0,0 +1,29 @@ +package safe + +//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. + +// ScopeNodeListItem is a nested struct in safe response +type ScopeNodeListItem struct { + RuleId int64 `json:"RuleId" xml:"RuleId"` + Type string `json:"Type" xml:"Type"` + Level1 string `json:"Level1" xml:"Level1"` + Level2 string `json:"Level2" xml:"Level2"` + Level3 string `json:"Level3" xml:"Level3"` + Level4 string `json:"Level4" xml:"Level4"` + Level5 string `json:"Level5" xml:"Level5"` + LeafLevel string `json:"LeafLevel" xml:"LeafLevel"` + Path string `json:"Path" xml:"Path"` +} diff --git a/services/safe/sync_product.go b/services/safe/sync_product.go new file mode 100644 index 000000000..a74b2dab6 --- /dev/null +++ b/services/safe/sync_product.go @@ -0,0 +1,119 @@ +package safe + +//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" +) + +// SyncProduct invokes the safe.SyncProduct API synchronously +func (client *Client) SyncProduct(request *SyncProductRequest) (response *SyncProductResponse, err error) { + response = CreateSyncProductResponse() + err = client.DoAction(request, response) + return +} + +// SyncProductWithChan invokes the safe.SyncProduct API asynchronously +func (client *Client) SyncProductWithChan(request *SyncProductRequest) (<-chan *SyncProductResponse, <-chan error) { + responseChan := make(chan *SyncProductResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SyncProduct(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SyncProductWithCallback invokes the safe.SyncProduct API asynchronously +func (client *Client) SyncProductWithCallback(request *SyncProductRequest, callback func(response *SyncProductResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SyncProductResponse + var err error + defer close(result) + response, err = client.SyncProduct(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SyncProductRequest is the request struct for api SyncProduct +type SyncProductRequest struct { + *requests.RpcRequest + AuthKey string `position:"Body" name:"AuthKey"` + ReqTimestamp requests.Integer `position:"Body" name:"ReqTimestamp"` + SyncProductList *[]SyncProductSyncProductList `position:"Body" name:"SyncProductList" type:"Repeated"` + AuthSign string `position:"Body" name:"AuthSign"` +} + +// SyncProductSyncProductList is a repeated param struct in SyncProductRequest +type SyncProductSyncProductList struct { + InnerProductList *[]SyncProductSyncProductListInnerProductList `name:"InnerProductList" type:"Repeated"` + Code string `name:"Code"` + Name string `name:"Name"` +} + +// SyncProductSyncProductListInnerProductList is a repeated param struct in SyncProductRequest +type SyncProductSyncProductListInnerProductList struct { + Code string `name:"Code"` + Name string `name:"Name"` +} + +// SyncProductResponse is the response struct for api SyncProduct +type SyncProductResponse struct { + *responses.BaseResponse + Data bool `json:"Data" xml:"Data"` + Success bool `json:"Success" xml:"Success"` + Code int `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateSyncProductRequest creates a request to invoke SyncProduct API +func CreateSyncProductRequest() (request *SyncProductRequest) { + request = &SyncProductRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Safe", "2022-01-17", "SyncProduct", "", "") + request.Method = requests.POST + return +} + +// CreateSyncProductResponse creates a response to parse from SyncProduct response +func CreateSyncProductResponse() (response *SyncProductResponse) { + response = &SyncProductResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}