Skip to content

Commit 06eff4c

Browse files
author
BitsAdmin
committed
Merge branch 'vpn-Python-2020-04-01-online-1619-2025_09_23_17_49_27' into 'integration_2025-09-25_1059631177986'
feat: [development task] vpn-1619-Python (1697131) See merge request iaasng/volcengine-python-sdk!829
2 parents c46c8ef + a547bec commit 06eff4c

27 files changed

+1456
-25
lines changed

volcenginesdkvpn/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@
2121
# import models into sdk package
2222
from volcenginesdkvpn.models.as_path_for_describe_vpn_gateway_route_attributes_output import AsPathForDescribeVpnGatewayRouteAttributesOutput
2323
from volcenginesdkvpn.models.as_path_for_describe_vpn_gateway_routes_output import AsPathForDescribeVpnGatewayRoutesOutput
24+
from volcenginesdkvpn.models.bgp_config_for_modify_vpn_connection_tunnel_attributes_input import BGPConfigForModifyVpnConnectionTunnelAttributesInput
2425
from volcenginesdkvpn.models.bgp_config_for_create_vpn_connection_input import BgpConfigForCreateVpnConnectionInput
2526
from volcenginesdkvpn.models.bgp_config_for_modify_vpn_connection_attributes_input import BgpConfigForModifyVpnConnectionAttributesInput
2627
from volcenginesdkvpn.models.bgp_info_for_describe_vpn_connection_attributes_output import BgpInfoForDescribeVpnConnectionAttributesOutput
2728
from volcenginesdkvpn.models.bgp_info_for_describe_vpn_connections_output import BgpInfoForDescribeVpnConnectionsOutput
29+
from volcenginesdkvpn.models.convert_bgp_config_for_create_vpn_connection_input import ConvertBGPConfigForCreateVpnConnectionInput
30+
from volcenginesdkvpn.models.convert_bgp_config_for_modify_vpn_connection_attributes_input import ConvertBGPConfigForModifyVpnConnectionAttributesInput
2831
from volcenginesdkvpn.models.create_customer_gateway_request import CreateCustomerGatewayRequest
2932
from volcenginesdkvpn.models.create_customer_gateway_response import CreateCustomerGatewayResponse
3033
from volcenginesdkvpn.models.create_ssl_vpn_client_cert_request import CreateSslVpnClientCertRequest
@@ -127,6 +130,7 @@
127130
from volcenginesdkvpn.models.tag_for_describe_vpn_gateway_attributes_output import TagForDescribeVpnGatewayAttributesOutput
128131
from volcenginesdkvpn.models.tag_for_describe_vpn_gateways_billing_output import TagForDescribeVpnGatewaysBillingOutput
129132
from volcenginesdkvpn.models.tag_for_describe_vpn_gateways_output import TagForDescribeVpnGatewaysOutput
133+
from volcenginesdkvpn.models.tunnel_bgp_info_for_describe_vpn_connection_attributes_output import TunnelBgpInfoForDescribeVpnConnectionAttributesOutput
130134
from volcenginesdkvpn.models.tunnel_option_for_create_vpn_connection_input import TunnelOptionForCreateVpnConnectionInput
131135
from volcenginesdkvpn.models.tunnel_option_for_describe_vpn_connection_attributes_output import TunnelOptionForDescribeVpnConnectionAttributesOutput
132136
from volcenginesdkvpn.models.tunnel_option_for_describe_vpn_connections_output import TunnelOptionForDescribeVpnConnectionsOutput

volcenginesdkvpn/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
# import models into model package
1818
from volcenginesdkvpn.models.as_path_for_describe_vpn_gateway_route_attributes_output import AsPathForDescribeVpnGatewayRouteAttributesOutput
1919
from volcenginesdkvpn.models.as_path_for_describe_vpn_gateway_routes_output import AsPathForDescribeVpnGatewayRoutesOutput
20+
from volcenginesdkvpn.models.bgp_config_for_modify_vpn_connection_tunnel_attributes_input import BGPConfigForModifyVpnConnectionTunnelAttributesInput
2021
from volcenginesdkvpn.models.bgp_config_for_create_vpn_connection_input import BgpConfigForCreateVpnConnectionInput
2122
from volcenginesdkvpn.models.bgp_config_for_modify_vpn_connection_attributes_input import BgpConfigForModifyVpnConnectionAttributesInput
2223
from volcenginesdkvpn.models.bgp_info_for_describe_vpn_connection_attributes_output import BgpInfoForDescribeVpnConnectionAttributesOutput
2324
from volcenginesdkvpn.models.bgp_info_for_describe_vpn_connections_output import BgpInfoForDescribeVpnConnectionsOutput
25+
from volcenginesdkvpn.models.convert_bgp_config_for_create_vpn_connection_input import ConvertBGPConfigForCreateVpnConnectionInput
26+
from volcenginesdkvpn.models.convert_bgp_config_for_modify_vpn_connection_attributes_input import ConvertBGPConfigForModifyVpnConnectionAttributesInput
2427
from volcenginesdkvpn.models.create_customer_gateway_request import CreateCustomerGatewayRequest
2528
from volcenginesdkvpn.models.create_customer_gateway_response import CreateCustomerGatewayResponse
2629
from volcenginesdkvpn.models.create_ssl_vpn_client_cert_request import CreateSslVpnClientCertRequest
@@ -123,6 +126,7 @@
123126
from volcenginesdkvpn.models.tag_for_describe_vpn_gateway_attributes_output import TagForDescribeVpnGatewayAttributesOutput
124127
from volcenginesdkvpn.models.tag_for_describe_vpn_gateways_billing_output import TagForDescribeVpnGatewaysBillingOutput
125128
from volcenginesdkvpn.models.tag_for_describe_vpn_gateways_output import TagForDescribeVpnGatewaysOutput
129+
from volcenginesdkvpn.models.tunnel_bgp_info_for_describe_vpn_connection_attributes_output import TunnelBgpInfoForDescribeVpnConnectionAttributesOutput
126130
from volcenginesdkvpn.models.tunnel_option_for_create_vpn_connection_input import TunnelOptionForCreateVpnConnectionInput
127131
from volcenginesdkvpn.models.tunnel_option_for_describe_vpn_connection_attributes_output import TunnelOptionForDescribeVpnConnectionAttributesOutput
128132
from volcenginesdkvpn.models.tunnel_option_for_describe_vpn_connections_output import TunnelOptionForDescribeVpnConnectionsOutput
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# coding: utf-8
2+
3+
"""
4+
vpn
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: common-version
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from volcenginesdkcore.configuration import Configuration
20+
21+
22+
class BGPConfigForModifyVpnConnectionTunnelAttributesInput(object):
23+
"""NOTE: This class is auto generated by the swagger code generator program.
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
swagger_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
swagger_types = {
36+
'local_bgp_ip': 'str',
37+
'tunnel_cidr': 'str'
38+
}
39+
40+
attribute_map = {
41+
'local_bgp_ip': 'LocalBgpIp',
42+
'tunnel_cidr': 'TunnelCidr'
43+
}
44+
45+
def __init__(self, local_bgp_ip=None, tunnel_cidr=None, _configuration=None): # noqa: E501
46+
"""BGPConfigForModifyVpnConnectionTunnelAttributesInput - a model defined in Swagger""" # noqa: E501
47+
if _configuration is None:
48+
_configuration = Configuration()
49+
self._configuration = _configuration
50+
51+
self._local_bgp_ip = None
52+
self._tunnel_cidr = None
53+
self.discriminator = None
54+
55+
if local_bgp_ip is not None:
56+
self.local_bgp_ip = local_bgp_ip
57+
if tunnel_cidr is not None:
58+
self.tunnel_cidr = tunnel_cidr
59+
60+
@property
61+
def local_bgp_ip(self):
62+
"""Gets the local_bgp_ip of this BGPConfigForModifyVpnConnectionTunnelAttributesInput. # noqa: E501
63+
64+
65+
:return: The local_bgp_ip of this BGPConfigForModifyVpnConnectionTunnelAttributesInput. # noqa: E501
66+
:rtype: str
67+
"""
68+
return self._local_bgp_ip
69+
70+
@local_bgp_ip.setter
71+
def local_bgp_ip(self, local_bgp_ip):
72+
"""Sets the local_bgp_ip of this BGPConfigForModifyVpnConnectionTunnelAttributesInput.
73+
74+
75+
:param local_bgp_ip: The local_bgp_ip of this BGPConfigForModifyVpnConnectionTunnelAttributesInput. # noqa: E501
76+
:type: str
77+
"""
78+
79+
self._local_bgp_ip = local_bgp_ip
80+
81+
@property
82+
def tunnel_cidr(self):
83+
"""Gets the tunnel_cidr of this BGPConfigForModifyVpnConnectionTunnelAttributesInput. # noqa: E501
84+
85+
86+
:return: The tunnel_cidr of this BGPConfigForModifyVpnConnectionTunnelAttributesInput. # noqa: E501
87+
:rtype: str
88+
"""
89+
return self._tunnel_cidr
90+
91+
@tunnel_cidr.setter
92+
def tunnel_cidr(self, tunnel_cidr):
93+
"""Sets the tunnel_cidr of this BGPConfigForModifyVpnConnectionTunnelAttributesInput.
94+
95+
96+
:param tunnel_cidr: The tunnel_cidr of this BGPConfigForModifyVpnConnectionTunnelAttributesInput. # noqa: E501
97+
:type: str
98+
"""
99+
100+
self._tunnel_cidr = tunnel_cidr
101+
102+
def to_dict(self):
103+
"""Returns the model properties as a dict"""
104+
result = {}
105+
106+
for attr, _ in six.iteritems(self.swagger_types):
107+
value = getattr(self, attr)
108+
if isinstance(value, list):
109+
result[attr] = list(map(
110+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
111+
value
112+
))
113+
elif hasattr(value, "to_dict"):
114+
result[attr] = value.to_dict()
115+
elif isinstance(value, dict):
116+
result[attr] = dict(map(
117+
lambda item: (item[0], item[1].to_dict())
118+
if hasattr(item[1], "to_dict") else item,
119+
value.items()
120+
))
121+
else:
122+
result[attr] = value
123+
if issubclass(BGPConfigForModifyVpnConnectionTunnelAttributesInput, dict):
124+
for key, value in self.items():
125+
result[key] = value
126+
127+
return result
128+
129+
def to_str(self):
130+
"""Returns the string representation of the model"""
131+
return pprint.pformat(self.to_dict())
132+
133+
def __repr__(self):
134+
"""For `print` and `pprint`"""
135+
return self.to_str()
136+
137+
def __eq__(self, other):
138+
"""Returns true if both objects are equal"""
139+
if not isinstance(other, BGPConfigForModifyVpnConnectionTunnelAttributesInput):
140+
return False
141+
142+
return self.to_dict() == other.to_dict()
143+
144+
def __ne__(self, other):
145+
"""Returns true if both objects are not equal"""
146+
if not isinstance(other, BGPConfigForModifyVpnConnectionTunnelAttributesInput):
147+
return True
148+
149+
return self.to_dict() != other.to_dict()

volcenginesdkvpn/models/bgp_info_for_describe_vpn_connection_attributes_output.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class BgpInfoForDescribeVpnConnectionAttributesOutput(object):
3636
'enable_bgp': 'bool',
3737
'local_asn': 'int',
3838
'local_bgp_ip': 'str',
39-
'peer_asn': 'str',
39+
'peer_asn': 'int',
4040
'peer_bgp_ip': 'str',
4141
'session_status': 'str',
4242
'tunnel_cidr': 'str'
@@ -151,7 +151,7 @@ def peer_asn(self):
151151
152152
153153
:return: The peer_asn of this BgpInfoForDescribeVpnConnectionAttributesOutput. # noqa: E501
154-
:rtype: str
154+
:rtype: int
155155
"""
156156
return self._peer_asn
157157

@@ -161,7 +161,7 @@ def peer_asn(self, peer_asn):
161161
162162
163163
:param peer_asn: The peer_asn of this BgpInfoForDescribeVpnConnectionAttributesOutput. # noqa: E501
164-
:type: str
164+
:type: int
165165
"""
166166

167167
self._peer_asn = peer_asn

volcenginesdkvpn/models/bgp_info_for_describe_vpn_connections_output.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class BgpInfoForDescribeVpnConnectionsOutput(object):
3636
'enable_bgp': 'bool',
3737
'local_asn': 'int',
3838
'local_bgp_ip': 'str',
39-
'peer_asn': 'str',
39+
'peer_asn': 'int',
4040
'peer_bgp_ip': 'str',
4141
'session_status': 'str',
4242
'tunnel_cidr': 'str'
@@ -151,7 +151,7 @@ def peer_asn(self):
151151
152152
153153
:return: The peer_asn of this BgpInfoForDescribeVpnConnectionsOutput. # noqa: E501
154-
:rtype: str
154+
:rtype: int
155155
"""
156156
return self._peer_asn
157157

@@ -161,7 +161,7 @@ def peer_asn(self, peer_asn):
161161
162162
163163
:param peer_asn: The peer_asn of this BgpInfoForDescribeVpnConnectionsOutput. # noqa: E501
164-
:type: str
164+
:type: int
165165
"""
166166

167167
self._peer_asn = peer_asn
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# coding: utf-8
2+
3+
"""
4+
vpn
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: common-version
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from volcenginesdkcore.configuration import Configuration
20+
21+
22+
class ConvertBGPConfigForCreateVpnConnectionInput(object):
23+
"""NOTE: This class is auto generated by the swagger code generator program.
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
swagger_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
swagger_types = {
36+
'local_bgp_ip': 'str',
37+
'tunnel_cidr': 'str'
38+
}
39+
40+
attribute_map = {
41+
'local_bgp_ip': 'LocalBgpIp',
42+
'tunnel_cidr': 'TunnelCidr'
43+
}
44+
45+
def __init__(self, local_bgp_ip=None, tunnel_cidr=None, _configuration=None): # noqa: E501
46+
"""ConvertBGPConfigForCreateVpnConnectionInput - a model defined in Swagger""" # noqa: E501
47+
if _configuration is None:
48+
_configuration = Configuration()
49+
self._configuration = _configuration
50+
51+
self._local_bgp_ip = None
52+
self._tunnel_cidr = None
53+
self.discriminator = None
54+
55+
if local_bgp_ip is not None:
56+
self.local_bgp_ip = local_bgp_ip
57+
if tunnel_cidr is not None:
58+
self.tunnel_cidr = tunnel_cidr
59+
60+
@property
61+
def local_bgp_ip(self):
62+
"""Gets the local_bgp_ip of this ConvertBGPConfigForCreateVpnConnectionInput. # noqa: E501
63+
64+
65+
:return: The local_bgp_ip of this ConvertBGPConfigForCreateVpnConnectionInput. # noqa: E501
66+
:rtype: str
67+
"""
68+
return self._local_bgp_ip
69+
70+
@local_bgp_ip.setter
71+
def local_bgp_ip(self, local_bgp_ip):
72+
"""Sets the local_bgp_ip of this ConvertBGPConfigForCreateVpnConnectionInput.
73+
74+
75+
:param local_bgp_ip: The local_bgp_ip of this ConvertBGPConfigForCreateVpnConnectionInput. # noqa: E501
76+
:type: str
77+
"""
78+
79+
self._local_bgp_ip = local_bgp_ip
80+
81+
@property
82+
def tunnel_cidr(self):
83+
"""Gets the tunnel_cidr of this ConvertBGPConfigForCreateVpnConnectionInput. # noqa: E501
84+
85+
86+
:return: The tunnel_cidr of this ConvertBGPConfigForCreateVpnConnectionInput. # noqa: E501
87+
:rtype: str
88+
"""
89+
return self._tunnel_cidr
90+
91+
@tunnel_cidr.setter
92+
def tunnel_cidr(self, tunnel_cidr):
93+
"""Sets the tunnel_cidr of this ConvertBGPConfigForCreateVpnConnectionInput.
94+
95+
96+
:param tunnel_cidr: The tunnel_cidr of this ConvertBGPConfigForCreateVpnConnectionInput. # noqa: E501
97+
:type: str
98+
"""
99+
100+
self._tunnel_cidr = tunnel_cidr
101+
102+
def to_dict(self):
103+
"""Returns the model properties as a dict"""
104+
result = {}
105+
106+
for attr, _ in six.iteritems(self.swagger_types):
107+
value = getattr(self, attr)
108+
if isinstance(value, list):
109+
result[attr] = list(map(
110+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
111+
value
112+
))
113+
elif hasattr(value, "to_dict"):
114+
result[attr] = value.to_dict()
115+
elif isinstance(value, dict):
116+
result[attr] = dict(map(
117+
lambda item: (item[0], item[1].to_dict())
118+
if hasattr(item[1], "to_dict") else item,
119+
value.items()
120+
))
121+
else:
122+
result[attr] = value
123+
if issubclass(ConvertBGPConfigForCreateVpnConnectionInput, dict):
124+
for key, value in self.items():
125+
result[key] = value
126+
127+
return result
128+
129+
def to_str(self):
130+
"""Returns the string representation of the model"""
131+
return pprint.pformat(self.to_dict())
132+
133+
def __repr__(self):
134+
"""For `print` and `pprint`"""
135+
return self.to_str()
136+
137+
def __eq__(self, other):
138+
"""Returns true if both objects are equal"""
139+
if not isinstance(other, ConvertBGPConfigForCreateVpnConnectionInput):
140+
return False
141+
142+
return self.to_dict() == other.to_dict()
143+
144+
def __ne__(self, other):
145+
"""Returns true if both objects are not equal"""
146+
if not isinstance(other, ConvertBGPConfigForCreateVpnConnectionInput):
147+
return True
148+
149+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)