|
| 1 | +/** |
| 2 | + * Copyright 2021 UCloud Technology Co., Ltd. |
| 3 | + * |
| 4 | + * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file |
| 5 | + * except in compliance with the License. You may obtain a copy of the License at |
| 6 | + * |
| 7 | + * <p>http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + * |
| 9 | + * <p>Unless required by applicable law or agreed to in writing, software distributed under the |
| 10 | + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 11 | + * express or implied. See the License for the specific language governing permissions and |
| 12 | + * limitations under the License. |
| 13 | + */ |
| 14 | +package cn.ucloud.ipsecvpn.client; |
| 15 | + |
| 16 | +import cn.ucloud.common.client.DefaultClient; |
| 17 | +import cn.ucloud.common.config.Config; |
| 18 | +import cn.ucloud.common.credential.Credential; |
| 19 | +import cn.ucloud.common.exception.UCloudException; |
| 20 | +import cn.ucloud.ipsecvpn.models.CreateRemoteVPNGatewayRequest; |
| 21 | +import cn.ucloud.ipsecvpn.models.CreateRemoteVPNGatewayResponse; |
| 22 | +import cn.ucloud.ipsecvpn.models.CreateVPNGatewayRequest; |
| 23 | +import cn.ucloud.ipsecvpn.models.CreateVPNGatewayResponse; |
| 24 | +import cn.ucloud.ipsecvpn.models.CreateVPNTunnelRequest; |
| 25 | +import cn.ucloud.ipsecvpn.models.CreateVPNTunnelResponse; |
| 26 | +import cn.ucloud.ipsecvpn.models.DeleteRemoteVPNGatewayRequest; |
| 27 | +import cn.ucloud.ipsecvpn.models.DeleteRemoteVPNGatewayResponse; |
| 28 | +import cn.ucloud.ipsecvpn.models.DeleteVPNGatewayRequest; |
| 29 | +import cn.ucloud.ipsecvpn.models.DeleteVPNGatewayResponse; |
| 30 | +import cn.ucloud.ipsecvpn.models.DeleteVPNTunnelRequest; |
| 31 | +import cn.ucloud.ipsecvpn.models.DeleteVPNTunnelResponse; |
| 32 | +import cn.ucloud.ipsecvpn.models.DescribeRemoteVPNGatewayRequest; |
| 33 | +import cn.ucloud.ipsecvpn.models.DescribeRemoteVPNGatewayResponse; |
| 34 | +import cn.ucloud.ipsecvpn.models.DescribeVPNGatewayRequest; |
| 35 | +import cn.ucloud.ipsecvpn.models.DescribeVPNGatewayResponse; |
| 36 | +import cn.ucloud.ipsecvpn.models.DescribeVPNTunnelRequest; |
| 37 | +import cn.ucloud.ipsecvpn.models.DescribeVPNTunnelResponse; |
| 38 | +import cn.ucloud.ipsecvpn.models.GetVPNGatewayPriceRequest; |
| 39 | +import cn.ucloud.ipsecvpn.models.GetVPNGatewayPriceResponse; |
| 40 | +import cn.ucloud.ipsecvpn.models.GetVPNGatewayUpgradePriceRequest; |
| 41 | +import cn.ucloud.ipsecvpn.models.GetVPNGatewayUpgradePriceResponse; |
| 42 | +import cn.ucloud.ipsecvpn.models.UpdateVPNGatewayRequest; |
| 43 | +import cn.ucloud.ipsecvpn.models.UpdateVPNGatewayResponse; |
| 44 | +import cn.ucloud.ipsecvpn.models.UpdateVPNTunnelAttributeRequest; |
| 45 | +import cn.ucloud.ipsecvpn.models.UpdateVPNTunnelAttributeResponse; |
| 46 | + |
| 47 | +/** This client is used to call actions of **IPSecVPN** service */ |
| 48 | +public class IPSecVPNClient extends DefaultClient implements IPSecVPNClientInterface { |
| 49 | + public IPSecVPNClient(Config config, Credential credential) { |
| 50 | + super(config, credential); |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * CreateRemoteVPNGateway - 创建客户VPN网关 |
| 55 | + * |
| 56 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/CreateRemoteVPNGateway |
| 57 | + */ |
| 58 | + public CreateRemoteVPNGatewayResponse createRemoteVPNGateway( |
| 59 | + CreateRemoteVPNGatewayRequest request) throws UCloudException { |
| 60 | + request.setAction("CreateRemoteVPNGateway"); |
| 61 | + return (CreateRemoteVPNGatewayResponse) |
| 62 | + this.invoke(request, CreateRemoteVPNGatewayResponse.class); |
| 63 | + } |
| 64 | + |
| 65 | + /** |
| 66 | + * CreateVPNGateway - 创建VPN网关 |
| 67 | + * |
| 68 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/CreateVPNGateway |
| 69 | + */ |
| 70 | + public CreateVPNGatewayResponse createVPNGateway(CreateVPNGatewayRequest request) |
| 71 | + throws UCloudException { |
| 72 | + request.setAction("CreateVPNGateway"); |
| 73 | + return (CreateVPNGatewayResponse) this.invoke(request, CreateVPNGatewayResponse.class); |
| 74 | + } |
| 75 | + |
| 76 | + /** |
| 77 | + * CreateVPNTunnel - 创建VPN隧道 |
| 78 | + * |
| 79 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/CreateVPNTunnel |
| 80 | + */ |
| 81 | + public CreateVPNTunnelResponse createVPNTunnel(CreateVPNTunnelRequest request) |
| 82 | + throws UCloudException { |
| 83 | + request.setAction("CreateVPNTunnel"); |
| 84 | + return (CreateVPNTunnelResponse) this.invoke(request, CreateVPNTunnelResponse.class); |
| 85 | + } |
| 86 | + |
| 87 | + /** |
| 88 | + * DeleteRemoteVPNGateway - 删除客户VPN网关 |
| 89 | + * |
| 90 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/DeleteRemoteVPNGateway |
| 91 | + */ |
| 92 | + public DeleteRemoteVPNGatewayResponse deleteRemoteVPNGateway( |
| 93 | + DeleteRemoteVPNGatewayRequest request) throws UCloudException { |
| 94 | + request.setAction("DeleteRemoteVPNGateway"); |
| 95 | + return (DeleteRemoteVPNGatewayResponse) |
| 96 | + this.invoke(request, DeleteRemoteVPNGatewayResponse.class); |
| 97 | + } |
| 98 | + |
| 99 | + /** |
| 100 | + * DeleteVPNGateway - 删除VPN网关 |
| 101 | + * |
| 102 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/DeleteVPNGateway |
| 103 | + */ |
| 104 | + public DeleteVPNGatewayResponse deleteVPNGateway(DeleteVPNGatewayRequest request) |
| 105 | + throws UCloudException { |
| 106 | + request.setAction("DeleteVPNGateway"); |
| 107 | + return (DeleteVPNGatewayResponse) this.invoke(request, DeleteVPNGatewayResponse.class); |
| 108 | + } |
| 109 | + |
| 110 | + /** |
| 111 | + * DeleteVPNTunnel - 删除VPN隧道 |
| 112 | + * |
| 113 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/DeleteVPNTunnel |
| 114 | + */ |
| 115 | + public DeleteVPNTunnelResponse deleteVPNTunnel(DeleteVPNTunnelRequest request) |
| 116 | + throws UCloudException { |
| 117 | + request.setAction("DeleteVPNTunnel"); |
| 118 | + return (DeleteVPNTunnelResponse) this.invoke(request, DeleteVPNTunnelResponse.class); |
| 119 | + } |
| 120 | + |
| 121 | + /** |
| 122 | + * DescribeRemoteVPNGateway - 获取客户VPN网关信息 |
| 123 | + * |
| 124 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/DescribeRemoteVPNGateway |
| 125 | + */ |
| 126 | + public DescribeRemoteVPNGatewayResponse describeRemoteVPNGateway( |
| 127 | + DescribeRemoteVPNGatewayRequest request) throws UCloudException { |
| 128 | + request.setAction("DescribeRemoteVPNGateway"); |
| 129 | + return (DescribeRemoteVPNGatewayResponse) |
| 130 | + this.invoke(request, DescribeRemoteVPNGatewayResponse.class); |
| 131 | + } |
| 132 | + |
| 133 | + /** |
| 134 | + * DescribeVPNGateway - 获取VPN网关信息 |
| 135 | + * |
| 136 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/DescribeVPNGateway |
| 137 | + */ |
| 138 | + public DescribeVPNGatewayResponse describeVPNGateway(DescribeVPNGatewayRequest request) |
| 139 | + throws UCloudException { |
| 140 | + request.setAction("DescribeVPNGateway"); |
| 141 | + return (DescribeVPNGatewayResponse) this.invoke(request, DescribeVPNGatewayResponse.class); |
| 142 | + } |
| 143 | + |
| 144 | + /** |
| 145 | + * DescribeVPNTunnel - 获取VPN隧道信息 |
| 146 | + * |
| 147 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/DescribeVPNTunnel |
| 148 | + */ |
| 149 | + public DescribeVPNTunnelResponse describeVPNTunnel(DescribeVPNTunnelRequest request) |
| 150 | + throws UCloudException { |
| 151 | + request.setAction("DescribeVPNTunnel"); |
| 152 | + return (DescribeVPNTunnelResponse) this.invoke(request, DescribeVPNTunnelResponse.class); |
| 153 | + } |
| 154 | + |
| 155 | + /** |
| 156 | + * GetVPNGatewayPrice - 获取VPN价格 |
| 157 | + * |
| 158 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/GetVPNGatewayPrice |
| 159 | + */ |
| 160 | + public GetVPNGatewayPriceResponse getVPNGatewayPrice(GetVPNGatewayPriceRequest request) |
| 161 | + throws UCloudException { |
| 162 | + request.setAction("GetVPNGatewayPrice"); |
| 163 | + return (GetVPNGatewayPriceResponse) this.invoke(request, GetVPNGatewayPriceResponse.class); |
| 164 | + } |
| 165 | + |
| 166 | + /** |
| 167 | + * GetVPNGatewayUpgradePrice - 获取VPN网关规格改动价格 |
| 168 | + * |
| 169 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/GetVPNGatewayUpgradePrice |
| 170 | + */ |
| 171 | + public GetVPNGatewayUpgradePriceResponse getVPNGatewayUpgradePrice( |
| 172 | + GetVPNGatewayUpgradePriceRequest request) throws UCloudException { |
| 173 | + request.setAction("GetVPNGatewayUpgradePrice"); |
| 174 | + return (GetVPNGatewayUpgradePriceResponse) |
| 175 | + this.invoke(request, GetVPNGatewayUpgradePriceResponse.class); |
| 176 | + } |
| 177 | + |
| 178 | + /** |
| 179 | + * UpdateVPNGateway - 更改VPN网关规格 |
| 180 | + * |
| 181 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/UpdateVPNGateway |
| 182 | + */ |
| 183 | + public UpdateVPNGatewayResponse updateVPNGateway(UpdateVPNGatewayRequest request) |
| 184 | + throws UCloudException { |
| 185 | + request.setAction("UpdateVPNGateway"); |
| 186 | + return (UpdateVPNGatewayResponse) this.invoke(request, UpdateVPNGatewayResponse.class); |
| 187 | + } |
| 188 | + |
| 189 | + /** |
| 190 | + * UpdateVPNTunnelAttribute - 更新VPN隧道属性 |
| 191 | + * |
| 192 | + * <p>See also: https://docs.ucloud.cn/api/ipsecvpn-api/UpdateVPNTunnelAttribute |
| 193 | + */ |
| 194 | + public UpdateVPNTunnelAttributeResponse updateVPNTunnelAttribute( |
| 195 | + UpdateVPNTunnelAttributeRequest request) throws UCloudException { |
| 196 | + request.setAction("UpdateVPNTunnelAttribute"); |
| 197 | + return (UpdateVPNTunnelAttributeResponse) |
| 198 | + this.invoke(request, UpdateVPNTunnelAttributeResponse.class); |
| 199 | + } |
| 200 | +} |
0 commit comments