Pārlūkot izejas kodu

XSPACE SDK Auto Released By xiaoyan.yan,Version:1.53.22

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 6 gadi atpakaļ
vecāks
revīzija
c186ee3183

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2019-03-11 Version: 1.53.22
+1,  add agency infomation
+2,  update sdk core resources
+
 2019-03-11 Version: 1.53.21
 1, Add face grouping feature .
 2, Add head pose and face quality.

+ 81 - 0
services/xspace/client.go

@@ -0,0 +1,81 @@
+package xspace
+
+//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"
+)
+
+// 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
+}
+
+// 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://help.aliyun.com/document_detail/66217.html
+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://help.aliyun.com/document_detail/66222.html
+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://help.aliyun.com/document_detail/66222.html
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://help.aliyun.com/document_detail/66223.html
+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
+// attention: rsa key pair auth is only Japan regions available
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	return
+}

+ 108 - 0
services/xspace/query_customer_by_id.go

@@ -0,0 +1,108 @@
+package xspace
+
+//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"
+)
+
+// QueryCustomerById invokes the xspace.QueryCustomerById API synchronously
+// api document: https://help.aliyun.com/api/xspace/querycustomerbyid.html
+func (client *Client) QueryCustomerById(request *QueryCustomerByIdRequest) (response *QueryCustomerByIdResponse, err error) {
+	response = CreateQueryCustomerByIdResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryCustomerByIdWithChan invokes the xspace.QueryCustomerById API asynchronously
+// api document: https://help.aliyun.com/api/xspace/querycustomerbyid.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCustomerByIdWithChan(request *QueryCustomerByIdRequest) (<-chan *QueryCustomerByIdResponse, <-chan error) {
+	responseChan := make(chan *QueryCustomerByIdResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryCustomerById(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryCustomerByIdWithCallback invokes the xspace.QueryCustomerById API asynchronously
+// api document: https://help.aliyun.com/api/xspace/querycustomerbyid.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCustomerByIdWithCallback(request *QueryCustomerByIdRequest, callback func(response *QueryCustomerByIdResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryCustomerByIdResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryCustomerById(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryCustomerByIdRequest is the request struct for api QueryCustomerById
+type QueryCustomerByIdRequest struct {
+	*requests.RoaRequest
+	Id string `position:"Query" name:"Id"`
+}
+
+// QueryCustomerByIdResponse is the response struct for api QueryCustomerById
+type QueryCustomerByIdResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryCustomerByIdRequest creates a request to invoke QueryCustomerById API
+func CreateQueryCustomerByIdRequest() (request *QueryCustomerByIdRequest) {
+	request = &QueryCustomerByIdRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("xspace", "2017-07-20", "QueryCustomerById", "/customer", "", "")
+	request.Method = requests.PUT
+	return
+}
+
+// CreateQueryCustomerByIdResponse creates a response to parse from QueryCustomerById response
+func CreateQueryCustomerByIdResponse() (response *QueryCustomerByIdResponse) {
+	response = &QueryCustomerByIdResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/xspace/query_customer_by_phone.go

@@ -0,0 +1,108 @@
+package xspace
+
+//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"
+)
+
+// QueryCustomerByPhone invokes the xspace.QueryCustomerByPhone API synchronously
+// api document: https://help.aliyun.com/api/xspace/querycustomerbyphone.html
+func (client *Client) QueryCustomerByPhone(request *QueryCustomerByPhoneRequest) (response *QueryCustomerByPhoneResponse, err error) {
+	response = CreateQueryCustomerByPhoneResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryCustomerByPhoneWithChan invokes the xspace.QueryCustomerByPhone API asynchronously
+// api document: https://help.aliyun.com/api/xspace/querycustomerbyphone.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCustomerByPhoneWithChan(request *QueryCustomerByPhoneRequest) (<-chan *QueryCustomerByPhoneResponse, <-chan error) {
+	responseChan := make(chan *QueryCustomerByPhoneResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryCustomerByPhone(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryCustomerByPhoneWithCallback invokes the xspace.QueryCustomerByPhone API asynchronously
+// api document: https://help.aliyun.com/api/xspace/querycustomerbyphone.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryCustomerByPhoneWithCallback(request *QueryCustomerByPhoneRequest, callback func(response *QueryCustomerByPhoneResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryCustomerByPhoneResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryCustomerByPhone(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryCustomerByPhoneRequest is the request struct for api QueryCustomerByPhone
+type QueryCustomerByPhoneRequest struct {
+	*requests.RoaRequest
+	Phone string `position:"Query" name:"Phone"`
+}
+
+// QueryCustomerByPhoneResponse is the response struct for api QueryCustomerByPhone
+type QueryCustomerByPhoneResponse struct {
+	*responses.BaseResponse
+	RequestId string                     `json:"RequestId" xml:"RequestId"`
+	Success   bool                       `json:"Success" xml:"Success"`
+	Code      string                     `json:"Code" xml:"Code"`
+	Message   string                     `json:"Message" xml:"Message"`
+	Data      DataInQueryCustomerByPhone `json:"Data" xml:"Data"`
+}
+
+// CreateQueryCustomerByPhoneRequest creates a request to invoke QueryCustomerByPhone API
+func CreateQueryCustomerByPhoneRequest() (request *QueryCustomerByPhoneRequest) {
+	request = &QueryCustomerByPhoneRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("xspace", "2017-07-20", "QueryCustomerByPhone", "/customerbyphone", "", "")
+	request.Method = requests.POST
+	return
+}
+
+// CreateQueryCustomerByPhoneResponse creates a response to parse from QueryCustomerByPhone response
+func CreateQueryCustomerByPhoneResponse() (response *QueryCustomerByPhoneResponse) {
+	response = &QueryCustomerByPhoneResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 21 - 0
services/xspace/struct_associate_person_list_in_query_customer_by_id.go

@@ -0,0 +1,21 @@
+package xspace
+
+//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.
+
+// AssociatePersonListInQueryCustomerById is a nested struct in xspace response
+type AssociatePersonListInQueryCustomerById struct {
+	AssociatePersonList []string `json:"AssociatePersonList" xml:"AssociatePersonList"`
+}

+ 21 - 0
services/xspace/struct_associate_person_list_in_query_customer_by_phone.go

@@ -0,0 +1,21 @@
+package xspace
+
+//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.
+
+// AssociatePersonListInQueryCustomerByPhone is a nested struct in xspace response
+type AssociatePersonListInQueryCustomerByPhone struct {
+	AssociatePersonList []string `json:"AssociatePersonList" xml:"AssociatePersonList"`
+}

+ 25 - 0
services/xspace/struct_customize_fields.go

@@ -0,0 +1,25 @@
+package xspace
+
+//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.
+
+// CustomizeFields is a nested struct in xspace response
+type CustomizeFields struct {
+	Cid                 string                                 `json:"Cid" xml:"Cid"`
+	AbcUrl              string                                 `json:"AbcUrl" xml:"AbcUrl"`
+	DistributionLevel   string                                 `json:"DistributionLevel" xml:"DistributionLevel"`
+	MainAccountUid      string                                 `json:"MainAccountUid" xml:"MainAccountUid"`
+	AssociatePersonList AssociatePersonListInQueryCustomerById `json:"AssociatePersonList" xml:"AssociatePersonList"`
+}

+ 30 - 0
services/xspace/struct_data.go

@@ -0,0 +1,30 @@
+package xspace
+
+//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 xspace response
+type Data struct {
+	Gender          string                  `json:"Gender" xml:"Gender"`
+	Email           string                  `json:"Email" xml:"Email"`
+	Photo           string                  `json:"Photo" xml:"Photo"`
+	Detail          string                  `json:"Detail" xml:"Detail"`
+	Id              string                  `json:"Id" xml:"Id"`
+	RealName        string                  `json:"RealName" xml:"RealName"`
+	Nick            string                  `json:"Nick" xml:"Nick"`
+	Phone           string                  `json:"Phone" xml:"Phone"`
+	Tags            TagsInQueryCustomerById `json:"Tags" xml:"Tags"`
+	CustomizeFields CustomizeFields         `json:"CustomizeFields" xml:"CustomizeFields"`
+}

+ 21 - 0
services/xspace/struct_data_in_query_customer_by_phone.go

@@ -0,0 +1,21 @@
+package xspace
+
+//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.
+
+// DataInQueryCustomerByPhone is a nested struct in xspace response
+type DataInQueryCustomerByPhone struct {
+	DataItem []DataItem `json:"DataItem" xml:"DataItem"`
+}

+ 30 - 0
services/xspace/struct_data_item.go

@@ -0,0 +1,30 @@
+package xspace
+
+//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 xspace response
+type DataItem struct {
+	Detail          string                     `json:"Detail" xml:"Detail"`
+	Photo           string                     `json:"Photo" xml:"Photo"`
+	Id              string                     `json:"Id" xml:"Id"`
+	Phone           string                     `json:"Phone" xml:"Phone"`
+	Gender          string                     `json:"Gender" xml:"Gender"`
+	Email           string                     `json:"Email" xml:"Email"`
+	Nick            string                     `json:"Nick" xml:"Nick"`
+	RealName        string                     `json:"RealName" xml:"RealName"`
+	Tags            TagsInQueryCustomerByPhone `json:"Tags" xml:"Tags"`
+	CustomizeFields CustomizeFields            `json:"CustomizeFields" xml:"CustomizeFields"`
+}

+ 21 - 0
services/xspace/struct_tags_in_query_customer_by_id.go

@@ -0,0 +1,21 @@
+package xspace
+
+//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.
+
+// TagsInQueryCustomerById is a nested struct in xspace response
+type TagsInQueryCustomerById struct {
+	Tags []string `json:"Tags" xml:"Tags"`
+}

+ 21 - 0
services/xspace/struct_tags_in_query_customer_by_phone.go

@@ -0,0 +1,21 @@
+package xspace
+
+//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.
+
+// TagsInQueryCustomerByPhone is a nested struct in xspace response
+type TagsInQueryCustomerByPhone struct {
+	Tags []string `json:"Tags" xml:"Tags"`
+}