|
| 1 | +# coding=utf8 |
| 2 | + |
| 3 | +# Copyright 2018 JDCLOUD.COM |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | +# NOTE: This class is auto generated by the jdcloud code generator program. |
| 18 | + |
| 19 | +from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest |
| 20 | + |
| 21 | + |
| 22 | +class CreateAdminProductRequest(JDCloudRequest): |
| 23 | + """ |
| 24 | + 新建产品 |
| 25 | + """ |
| 26 | + |
| 27 | + def __init__(self, parameters, header=None, version="v2"): |
| 28 | + super(CreateAdminProductRequest, self).__init__( |
| 29 | + '/regions/{regionId}/loongrayinstances/{instanceId}/productsAdmin', 'POST', header, version) |
| 30 | + self.parameters = parameters |
| 31 | + |
| 32 | + |
| 33 | +class CreateAdminProductParameters(object): |
| 34 | + |
| 35 | + def __init__(self, regionId, instanceId, productName, productType, ): |
| 36 | + """ |
| 37 | + :param regionId: 地域ID |
| 38 | + :param instanceId: IoT Engine实例ID信息 |
| 39 | + :param productName: 产品名称,名称不可为空,3-30个字符,只支持汉字、英文字母、数字、下划线“_”及中划线“-”,必须以汉字、英文字母及数字开头结尾 |
| 40 | + :param productType: 节点类型,取值: |
| 41 | +0:设备。设备不能挂载子设备。可以直连物联网平台,也可以作为网关的子设备连接物联网平台 |
| 42 | +1:网关。网关可以挂载子设备,具有子设备管理模块,维持子设备的拓扑关系,和将拓扑关系同步到物联网平台 |
| 43 | +
|
| 44 | + """ |
| 45 | + |
| 46 | + self.regionId = regionId |
| 47 | + self.instanceId = instanceId |
| 48 | + self.productName = productName |
| 49 | + self.productType = productType |
| 50 | + self.productDescription = None |
| 51 | + self.templateId = None |
| 52 | + self.internalTags = None |
| 53 | + |
| 54 | + def setProductDescription(self, productDescription): |
| 55 | + """ |
| 56 | + :param productDescription: (Optional) 产品描述,80字符以内 |
| 57 | + """ |
| 58 | + self.productDescription = productDescription |
| 59 | + |
| 60 | + def setTemplateId(self, templateId): |
| 61 | + """ |
| 62 | + :param templateId: (Optional) 物模型模板ID,内部参数,用户不可见,默认为自定义 |
| 63 | + """ |
| 64 | + self.templateId = templateId |
| 65 | + |
| 66 | + def setInternalTags(self, internalTags): |
| 67 | + """ |
| 68 | + :param internalTags: (Optional) 内部标签,内部参数,用户不可见,隐藏标签:hidden:true |
| 69 | + """ |
| 70 | + self.internalTags = internalTags |
| 71 | + |
0 commit comments