1package r_kvstore
2
3//Licensed under the Apache License, Version 2.0 (the "License");
4//you may not use this file except in compliance with the License.
5//You may obtain a copy of the License at
6//
7//http://www.apache.org/licenses/LICENSE-2.0
8//
9//Unless required by applicable law or agreed to in writing, software
10//distributed under the License is distributed on an "AS IS" BASIS,
11//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//See the License for the specific language governing permissions and
13//limitations under the License.
14//
15// Code generated by Alibaba Cloud SDK Code Generator.
16// Changes may cause incorrect behavior and will be lost if the code is regenerated.
17
18import (
19	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
20	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
21)
22
23// UntagResources invokes the r_kvstore.UntagResources API synchronously
24// api document: https://help.aliyun.com/api/r-kvstore/untagresources.html
25func (client *Client) UntagResources(request *UntagResourcesRequest) (response *UntagResourcesResponse, err error) {
26	response = CreateUntagResourcesResponse()
27	err = client.DoAction(request, response)
28	return
29}
30
31// UntagResourcesWithChan invokes the r_kvstore.UntagResources API asynchronously
32// api document: https://help.aliyun.com/api/r-kvstore/untagresources.html
33// asynchronous document: https://help.aliyun.com/document_detail/66220.html
34func (client *Client) UntagResourcesWithChan(request *UntagResourcesRequest) (<-chan *UntagResourcesResponse, <-chan error) {
35	responseChan := make(chan *UntagResourcesResponse, 1)
36	errChan := make(chan error, 1)
37	err := client.AddAsyncTask(func() {
38		defer close(responseChan)
39		defer close(errChan)
40		response, err := client.UntagResources(request)
41		if err != nil {
42			errChan <- err
43		} else {
44			responseChan <- response
45		}
46	})
47	if err != nil {
48		errChan <- err
49		close(responseChan)
50		close(errChan)
51	}
52	return responseChan, errChan
53}
54
55// UntagResourcesWithCallback invokes the r_kvstore.UntagResources API asynchronously
56// api document: https://help.aliyun.com/api/r-kvstore/untagresources.html
57// asynchronous document: https://help.aliyun.com/document_detail/66220.html
58func (client *Client) UntagResourcesWithCallback(request *UntagResourcesRequest, callback func(response *UntagResourcesResponse, err error)) <-chan int {
59	result := make(chan int, 1)
60	err := client.AddAsyncTask(func() {
61		var response *UntagResourcesResponse
62		var err error
63		defer close(result)
64		response, err = client.UntagResources(request)
65		callback(response, err)
66		result <- 1
67	})
68	if err != nil {
69		defer close(result)
70		callback(nil, err)
71		result <- 0
72	}
73	return result
74}
75
76// UntagResourcesRequest is the request struct for api UntagResources
77type UntagResourcesRequest struct {
78	*requests.RpcRequest
79	ResourceId47         string           `position:"Query" name:"ResourceId.47"`
80	ResourceId48         string           `position:"Query" name:"ResourceId.48"`
81	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
82	ResourceId49         string           `position:"Query" name:"ResourceId.49"`
83	ResourceId40         string           `position:"Query" name:"ResourceId.40"`
84	ResourceId41         string           `position:"Query" name:"ResourceId.41"`
85	ResourceId42         string           `position:"Query" name:"ResourceId.42"`
86	TagKey9              string           `position:"Query" name:"TagKey.9"`
87	ResourceId1          string           `position:"Query" name:"ResourceId.1"`
88	ResourceId43         string           `position:"Query" name:"ResourceId.43"`
89	ResourceId2          string           `position:"Query" name:"ResourceId.2"`
90	ResourceId44         string           `position:"Query" name:"ResourceId.44"`
91	ResourceId3          string           `position:"Query" name:"ResourceId.3"`
92	ResourceId45         string           `position:"Query" name:"ResourceId.45"`
93	ResourceId4          string           `position:"Query" name:"ResourceId.4"`
94	ResourceId46         string           `position:"Query" name:"ResourceId.46"`
95	ResourceId5          string           `position:"Query" name:"ResourceId.5"`
96	TagKey4              string           `position:"Query" name:"TagKey.4"`
97	ResourceId6          string           `position:"Query" name:"ResourceId.6"`
98	TagKey3              string           `position:"Query" name:"TagKey.3"`
99	ResourceId7          string           `position:"Query" name:"ResourceId.7"`
100	TagKey2              string           `position:"Query" name:"TagKey.2"`
101	ResourceId8          string           `position:"Query" name:"ResourceId.8"`
102	TagKey1              string           `position:"Query" name:"TagKey.1"`
103	ResourceId9          string           `position:"Query" name:"ResourceId.9"`
104	TagKey8              string           `position:"Query" name:"TagKey.8"`
105	TagKey20             string           `position:"Query" name:"TagKey.20"`
106	SecurityToken        string           `position:"Query" name:"SecurityToken"`
107	TagKey7              string           `position:"Query" name:"TagKey.7"`
108	TagKey6              string           `position:"Query" name:"TagKey.6"`
109	TagKey5              string           `position:"Query" name:"TagKey.5"`
110	ResourceId36         string           `position:"Query" name:"ResourceId.36"`
111	ResourceId37         string           `position:"Query" name:"ResourceId.37"`
112	ResourceId38         string           `position:"Query" name:"ResourceId.38"`
113	ResourceId39         string           `position:"Query" name:"ResourceId.39"`
114	ResourceId30         string           `position:"Query" name:"ResourceId.30"`
115	ResourceId31         string           `position:"Query" name:"ResourceId.31"`
116	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
117	ResourceId32         string           `position:"Query" name:"ResourceId.32"`
118	ResourceId33         string           `position:"Query" name:"ResourceId.33"`
119	ResourceId34         string           `position:"Query" name:"ResourceId.34"`
120	ResourceId35         string           `position:"Query" name:"ResourceId.35"`
121	ResourceId25         string           `position:"Query" name:"ResourceId.25"`
122	ResourceId26         string           `position:"Query" name:"ResourceId.26"`
123	ResourceId27         string           `position:"Query" name:"ResourceId.27"`
124	ResourceId28         string           `position:"Query" name:"ResourceId.28"`
125	ResourceId29         string           `position:"Query" name:"ResourceId.29"`
126	ResourceId20         string           `position:"Query" name:"ResourceId.20"`
127	ResourceId21         string           `position:"Query" name:"ResourceId.21"`
128	ResourceId22         string           `position:"Query" name:"ResourceId.22"`
129	ResourceId23         string           `position:"Query" name:"ResourceId.23"`
130	ResourceId24         string           `position:"Query" name:"ResourceId.24"`
131	Scope                string           `position:"Query" name:"Scope"`
132	ResourceId14         string           `position:"Query" name:"ResourceId.14"`
133	ResourceId15         string           `position:"Query" name:"ResourceId.15"`
134	ResourceId16         string           `position:"Query" name:"ResourceId.16"`
135	TagKey19             string           `position:"Query" name:"TagKey.19"`
136	ResourceId17         string           `position:"Query" name:"ResourceId.17"`
137	TagKey18             string           `position:"Query" name:"TagKey.18"`
138	ResourceId18         string           `position:"Query" name:"ResourceId.18"`
139	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
140	ResourceId19         string           `position:"Query" name:"ResourceId.19"`
141	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
142	ResourceId50         string           `position:"Query" name:"ResourceId.50"`
143	ResourceId10         string           `position:"Query" name:"ResourceId.10"`
144	ResourceType         string           `position:"Query" name:"ResourceType"`
145	ResourceId11         string           `position:"Query" name:"ResourceId.11"`
146	ResourceId12         string           `position:"Query" name:"ResourceId.12"`
147	ResourceId13         string           `position:"Query" name:"ResourceId.13"`
148	TagKey13             string           `position:"Query" name:"TagKey.13"`
149	TagKey12             string           `position:"Query" name:"TagKey.12"`
150	TagKey11             string           `position:"Query" name:"TagKey.11"`
151	TagKey10             string           `position:"Query" name:"TagKey.10"`
152	TagKey17             string           `position:"Query" name:"TagKey.17"`
153	TagKey16             string           `position:"Query" name:"TagKey.16"`
154	TagKey15             string           `position:"Query" name:"TagKey.15"`
155	TagKey14             string           `position:"Query" name:"TagKey.14"`
156}
157
158// UntagResourcesResponse is the response struct for api UntagResources
159type UntagResourcesResponse struct {
160	*responses.BaseResponse
161	RequestId string `json:"RequestId" xml:"RequestId"`
162}
163
164// CreateUntagResourcesRequest creates a request to invoke UntagResources API
165func CreateUntagResourcesRequest() (request *UntagResourcesRequest) {
166	request = &UntagResourcesRequest{
167		RpcRequest: &requests.RpcRequest{},
168	}
169	request.InitWithApiInfo("R-kvstore", "2015-01-01", "UntagResources", "redisa", "openAPI")
170	return
171}
172
173// CreateUntagResourcesResponse creates a response to parse from UntagResources response
174func CreateUntagResourcesResponse() (response *UntagResourcesResponse) {
175	response = &UntagResourcesResponse{
176		BaseResponse: &responses.BaseResponse{},
177	}
178	return
179}
180