|
| 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 DeployRequest(JDCloudRequest): |
| 23 | + """ |
| 24 | + 发布版本 |
| 25 | + """ |
| 26 | + |
| 27 | + def __init__(self, parameters, header=None, version="v1"): |
| 28 | + super(DeployRequest, self).__init__( |
| 29 | + '/scenes/{sceneId}/deployments', 'POST', header, version) |
| 30 | + self.parameters = parameters |
| 31 | + |
| 32 | + |
| 33 | +class DeployParameters(object): |
| 34 | + |
| 35 | + def __init__(self, sceneId, revision, environment, ): |
| 36 | + """ |
| 37 | + :param sceneId: 场景ID |
| 38 | + :param revision: 发布的修订版本号 |
| 39 | + :param environment: 环境:test、preview、online |
| 40 | + """ |
| 41 | + |
| 42 | + self.sceneId = sceneId |
| 43 | + self.revision = revision |
| 44 | + self.environment = environment |
| 45 | + self.backendServiceType = None |
| 46 | + self.backendUrl = None |
| 47 | + self.description = None |
| 48 | + self.jdsfName = None |
| 49 | + self.jdsfRegistryName = None |
| 50 | + self.jdsfId = None |
| 51 | + |
| 52 | + def setBackendServiceType(self, backendServiceType): |
| 53 | + """ |
| 54 | + :param backendServiceType: (Optional) 后端服务类型:mock、unique、vpc |
| 55 | + """ |
| 56 | + self.backendServiceType = backendServiceType |
| 57 | + |
| 58 | + def setBackendUrl(self, backendUrl): |
| 59 | + """ |
| 60 | + :param backendUrl: (Optional) 后端地址 |
| 61 | + """ |
| 62 | + self.backendUrl = backendUrl |
| 63 | + |
| 64 | + def setDescription(self, description): |
| 65 | + """ |
| 66 | + :param description: (Optional) 描述 |
| 67 | + """ |
| 68 | + self.description = description |
| 69 | + |
| 70 | + def setJdsfName(self, jdsfName): |
| 71 | + """ |
| 72 | + :param jdsfName: (Optional) 微服务网关名称 |
| 73 | + """ |
| 74 | + self.jdsfName = jdsfName |
| 75 | + |
| 76 | + def setJdsfRegistryName(self, jdsfRegistryName): |
| 77 | + """ |
| 78 | + :param jdsfRegistryName: (Optional) 微服务注册中心ID |
| 79 | + """ |
| 80 | + self.jdsfRegistryName = jdsfRegistryName |
| 81 | + |
| 82 | + def setJdsfId(self, jdsfId): |
| 83 | + """ |
| 84 | + :param jdsfId: (Optional) 微服务ID |
| 85 | + """ |
| 86 | + self.jdsfId = jdsfId |
| 87 | + |
0 commit comments