Skip to content

Commit 5c69317

Browse files
committed
SDK device authorization API.
1 parent 26fc36e commit 5c69317

File tree

6 files changed

+367
-0
lines changed

6 files changed

+367
-0
lines changed

CHANGELOG

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2021-05-11 Version: 1.0.1
2+
- SDK device authorization API.
3+
14
2021-05-11 Version: 2.2.4
25
- Generated 2017-11-15 for `scdn`.
36

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
using System.Collections.Generic;
21+
22+
namespace Aliyun.Acs.moguan_sdk
23+
{
24+
public class Endpoint
25+
{
26+
public static Dictionary<string, string> endpointMap = new Dictionary<string, string>()
27+
{};
28+
29+
public static string endpointRegionalType = "central";
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
using System.Collections.Generic;
20+
21+
using Aliyun.Acs.Core;
22+
using Aliyun.Acs.Core.Http;
23+
using Aliyun.Acs.Core.Transform;
24+
using Aliyun.Acs.Core.Utils;
25+
using Aliyun.Acs.moguan_sdk.Transform;
26+
using Aliyun.Acs.moguan_sdk.Transform.V20210415;
27+
28+
namespace Aliyun.Acs.moguan_sdk.Model.V20210415
29+
{
30+
public class RegisterDeviceRequest : RpcAcsRequest<RegisterDeviceResponse>
31+
{
32+
public RegisterDeviceRequest()
33+
: base("moguan-sdk", "2021-04-15", "RegisterDevice", "visionai", "openAPI")
34+
{
35+
if (this.GetType().GetProperty("ProductEndpointMap") != null && this.GetType().GetProperty("ProductEndpointType") != null)
36+
{
37+
this.GetType().GetProperty("ProductEndpointMap").SetValue(this, Aliyun.Acs.moguan_sdk.Endpoint.endpointMap, null);
38+
this.GetType().GetProperty("ProductEndpointType").SetValue(this, Aliyun.Acs.moguan_sdk.Endpoint.endpointRegionalType, null);
39+
}
40+
Method = MethodType.POST;
41+
}
42+
43+
private string userDeviceId;
44+
45+
private string extend;
46+
47+
private string sdkCode;
48+
49+
private string appKey;
50+
51+
private string deviceId;
52+
53+
public string UserDeviceId
54+
{
55+
get
56+
{
57+
return userDeviceId;
58+
}
59+
set
60+
{
61+
userDeviceId = value;
62+
DictionaryUtil.Add(BodyParameters, "UserDeviceId", value);
63+
}
64+
}
65+
66+
public string Extend
67+
{
68+
get
69+
{
70+
return extend;
71+
}
72+
set
73+
{
74+
extend = value;
75+
DictionaryUtil.Add(BodyParameters, "Extend", value);
76+
}
77+
}
78+
79+
public string SdkCode
80+
{
81+
get
82+
{
83+
return sdkCode;
84+
}
85+
set
86+
{
87+
sdkCode = value;
88+
DictionaryUtil.Add(BodyParameters, "SdkCode", value);
89+
}
90+
}
91+
92+
public string AppKey
93+
{
94+
get
95+
{
96+
return appKey;
97+
}
98+
set
99+
{
100+
appKey = value;
101+
DictionaryUtil.Add(BodyParameters, "AppKey", value);
102+
}
103+
}
104+
105+
public string DeviceId
106+
{
107+
get
108+
{
109+
return deviceId;
110+
}
111+
set
112+
{
113+
deviceId = value;
114+
DictionaryUtil.Add(BodyParameters, "DeviceId", value);
115+
}
116+
}
117+
118+
public override bool CheckShowJsonItemName()
119+
{
120+
return false;
121+
}
122+
123+
public override RegisterDeviceResponse GetResponse(UnmarshallerContext unmarshallerContext)
124+
{
125+
return RegisterDeviceResponseUnmarshaller.Unmarshall(unmarshallerContext);
126+
}
127+
}
128+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
using System.Collections.Generic;
20+
21+
using Aliyun.Acs.Core;
22+
23+
namespace Aliyun.Acs.moguan_sdk.Model.V20210415
24+
{
25+
public class RegisterDeviceResponse : AcsResponse
26+
{
27+
28+
private string message;
29+
30+
private string requestId;
31+
32+
private int? errorCode;
33+
34+
private string errorMessage;
35+
36+
private RegisterDevice_Data data;
37+
38+
public string Message
39+
{
40+
get
41+
{
42+
return message;
43+
}
44+
set
45+
{
46+
message = value;
47+
}
48+
}
49+
50+
public string RequestId
51+
{
52+
get
53+
{
54+
return requestId;
55+
}
56+
set
57+
{
58+
requestId = value;
59+
}
60+
}
61+
62+
public int? ErrorCode
63+
{
64+
get
65+
{
66+
return errorCode;
67+
}
68+
set
69+
{
70+
errorCode = value;
71+
}
72+
}
73+
74+
public string ErrorMessage
75+
{
76+
get
77+
{
78+
return errorMessage;
79+
}
80+
set
81+
{
82+
errorMessage = value;
83+
}
84+
}
85+
86+
public RegisterDevice_Data Data
87+
{
88+
get
89+
{
90+
return data;
91+
}
92+
set
93+
{
94+
data = value;
95+
}
96+
}
97+
98+
public class RegisterDevice_Data
99+
{
100+
101+
private string rid;
102+
103+
public string Rid
104+
{
105+
get
106+
{
107+
return rid;
108+
}
109+
set
110+
{
111+
rid = value;
112+
}
113+
}
114+
}
115+
}
116+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
22+
using Aliyun.Acs.Core.Transform;
23+
using Aliyun.Acs.moguan_sdk.Model.V20210415;
24+
25+
namespace Aliyun.Acs.moguan_sdk.Transform.V20210415
26+
{
27+
public class RegisterDeviceResponseUnmarshaller
28+
{
29+
public static RegisterDeviceResponse Unmarshall(UnmarshallerContext _ctx)
30+
{
31+
RegisterDeviceResponse registerDeviceResponse = new RegisterDeviceResponse();
32+
33+
registerDeviceResponse.HttpResponse = _ctx.HttpResponse;
34+
registerDeviceResponse.Message = _ctx.StringValue("RegisterDevice.Message");
35+
registerDeviceResponse.RequestId = _ctx.StringValue("RegisterDevice.RequestId");
36+
registerDeviceResponse.ErrorCode = _ctx.IntegerValue("RegisterDevice.ErrorCode");
37+
registerDeviceResponse.ErrorMessage = _ctx.StringValue("RegisterDevice.ErrorMessage");
38+
39+
RegisterDeviceResponse.RegisterDevice_Data data = new RegisterDeviceResponse.RegisterDevice_Data();
40+
data.Rid = _ctx.StringValue("RegisterDevice.Data.Rid");
41+
registerDeviceResponse.Data = data;
42+
43+
return registerDeviceResponse;
44+
}
45+
}
46+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
5+
<RootNamespace>Aliyun.Acs.moguan_sdk</RootNamespace>
6+
<Version>1.0.1</Version>
7+
<Authors>Alibaba Cloud</Authors>
8+
<Copyright>©2009-2019 Alibaba Cloud</Copyright>
9+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
10+
<PackageLicenseUrl>https://raw.githubusercontent.com/aliyun/aliyun-openapi-net-sdk/master/LICENSE</PackageLicenseUrl>
11+
<PackageProjectUrl>https://github.com/aliyun/aliyun-openapi-net-sdk</PackageProjectUrl>
12+
<PackageIconUrl>https://www.alibabacloud.com/favicon.ico</PackageIconUrl>
13+
<Description>Alibaba Cloud SDK for .NET</Description>
14+
<PackageReleaseNotes/>
15+
<PackageTags>alibaba aliyun SDK moguan-sdk</PackageTags>
16+
<AssemblyName>aliyun-net-sdk-moguan-sdk</AssemblyName>
17+
</PropertyGroup>
18+
<ItemGroup>
19+
<ProjectReference Include="..\aliyun-net-sdk-core\aliyun-net-sdk-core.vs2017.csproj"/>
20+
</ItemGroup>
21+
<ItemGroup>
22+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2">
23+
<PrivateAssets>all</PrivateAssets>
24+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
25+
</PackageReference>
26+
</ItemGroup>
27+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
28+
<PackageReference Include="Newtonsoft.Json" Version="[9.0.1,)"/>
29+
</ItemGroup>
30+
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
31+
<PackageReference Include="Newtonsoft.Json" Version="[6.0.1,)"/>
32+
<Reference Include="mscorlib"/>
33+
<Reference Include="System"/>
34+
<Reference Include="System.Core"/>
35+
<Reference Include="Microsoft.CSharp"/>
36+
<Reference Include="System.Data"/>
37+
<Reference Include="System.Web"/>
38+
<Reference Include="System.Drawing"/>
39+
<Reference Include="System.Security"/>
40+
<Reference Include="System.Xml"/>
41+
<Reference Include="System.Configuration"/>
42+
</ItemGroup>
43+
</Project>

0 commit comments

Comments
 (0)