Skip to content

Commit 606db38

Browse files
committed
feat: update cr api
1 parent 4acd828 commit 606db38

10 files changed

+1327
-0
lines changed

volcenginesdkcr/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from volcenginesdkcr.models.delete_repository_response import DeleteRepositoryResponse
3535
from volcenginesdkcr.models.delete_tags_request import DeleteTagsRequest
3636
from volcenginesdkcr.models.delete_tags_response import DeleteTagsResponse
37+
from volcenginesdkcr.models.filter_for_get_vpc_endpoint_input import FilterForGetVpcEndpointInput
3738
from volcenginesdkcr.models.filter_for_list_namespaces_input import FilterForListNamespacesInput
3839
from volcenginesdkcr.models.filter_for_list_registries_input import FilterForListRegistriesInput
3940
from volcenginesdkcr.models.filter_for_list_repositories_input import FilterForListRepositoriesInput
@@ -44,6 +45,8 @@
4445
from volcenginesdkcr.models.get_public_endpoint_response import GetPublicEndpointResponse
4546
from volcenginesdkcr.models.get_user_request import GetUserRequest
4647
from volcenginesdkcr.models.get_user_response import GetUserResponse
48+
from volcenginesdkcr.models.get_vpc_endpoint_request import GetVpcEndpointRequest
49+
from volcenginesdkcr.models.get_vpc_endpoint_response import GetVpcEndpointResponse
4750
from volcenginesdkcr.models.image_attribute_for_list_tags_output import ImageAttributeForListTagsOutput
4851
from volcenginesdkcr.models.item_for_list_domains_output import ItemForListDomainsOutput
4952
from volcenginesdkcr.models.item_for_list_namespaces_output import ItemForListNamespacesOutput
@@ -70,3 +73,7 @@
7073
from volcenginesdkcr.models.update_public_endpoint_response import UpdatePublicEndpointResponse
7174
from volcenginesdkcr.models.update_repository_request import UpdateRepositoryRequest
7275
from volcenginesdkcr.models.update_repository_response import UpdateRepositoryResponse
76+
from volcenginesdkcr.models.update_vpc_endpoint_request import UpdateVpcEndpointRequest
77+
from volcenginesdkcr.models.update_vpc_endpoint_response import UpdateVpcEndpointResponse
78+
from volcenginesdkcr.models.vpc_for_get_vpc_endpoint_output import VpcForGetVpcEndpointOutput
79+
from volcenginesdkcr.models.vpc_for_update_vpc_endpoint_input import VpcForUpdateVpcEndpointInput

volcenginesdkcr/api/cr_api.py

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,103 @@ def get_user_with_http_info(self, body, **kwargs): # noqa: E501
10031003
_request_timeout=params.get('_request_timeout'),
10041004
collection_formats=collection_formats)
10051005

1006+
def get_vpc_endpoint(self, body, **kwargs): # noqa: E501
1007+
"""get_vpc_endpoint # noqa: E501
1008+
1009+
This method makes a synchronous HTTP request by default. To make an
1010+
asynchronous HTTP request, please pass async_req=True
1011+
>>> thread = api.get_vpc_endpoint(body, async_req=True)
1012+
>>> result = thread.get()
1013+
1014+
:param async_req bool
1015+
:param GetVpcEndpointRequest body: (required)
1016+
:return: GetVpcEndpointResponse
1017+
If the method is called asynchronously,
1018+
returns the request thread.
1019+
"""
1020+
kwargs['_return_http_data_only'] = True
1021+
if kwargs.get('async_req'):
1022+
return self.get_vpc_endpoint_with_http_info(body, **kwargs) # noqa: E501
1023+
else:
1024+
(data) = self.get_vpc_endpoint_with_http_info(body, **kwargs) # noqa: E501
1025+
return data
1026+
1027+
def get_vpc_endpoint_with_http_info(self, body, **kwargs): # noqa: E501
1028+
"""get_vpc_endpoint # noqa: E501
1029+
1030+
This method makes a synchronous HTTP request by default. To make an
1031+
asynchronous HTTP request, please pass async_req=True
1032+
>>> thread = api.get_vpc_endpoint_with_http_info(body, async_req=True)
1033+
>>> result = thread.get()
1034+
1035+
:param async_req bool
1036+
:param GetVpcEndpointRequest body: (required)
1037+
:return: GetVpcEndpointResponse
1038+
If the method is called asynchronously,
1039+
returns the request thread.
1040+
"""
1041+
1042+
all_params = ['body'] # noqa: E501
1043+
all_params.append('async_req')
1044+
all_params.append('_return_http_data_only')
1045+
all_params.append('_preload_content')
1046+
all_params.append('_request_timeout')
1047+
1048+
params = locals()
1049+
for key, val in six.iteritems(params['kwargs']):
1050+
if key not in all_params:
1051+
raise TypeError(
1052+
"Got an unexpected keyword argument '%s'"
1053+
" to method get_vpc_endpoint" % key
1054+
)
1055+
params[key] = val
1056+
del params['kwargs']
1057+
# verify the required parameter 'body' is set
1058+
if self.api_client.client_side_validation and ('body' not in params or
1059+
params['body'] is None): # noqa: E501
1060+
raise ValueError("Missing the required parameter `body` when calling `get_vpc_endpoint`") # noqa: E501
1061+
1062+
collection_formats = {}
1063+
1064+
path_params = {}
1065+
1066+
query_params = []
1067+
1068+
header_params = {}
1069+
1070+
form_params = []
1071+
local_var_files = {}
1072+
1073+
body_params = None
1074+
if 'body' in params:
1075+
body_params = params['body']
1076+
# HTTP header `Accept`
1077+
header_params['Accept'] = self.api_client.select_header_accept(
1078+
['application/json']) # noqa: E501
1079+
1080+
# HTTP header `Content-Type`
1081+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1082+
['application/json']) # noqa: E501
1083+
1084+
# Authentication setting
1085+
auth_settings = ['volcengineSign'] # noqa: E501
1086+
1087+
return self.api_client.call_api(
1088+
'/GetVpcEndpoint/2022-05-12/cr/post/', 'POST',
1089+
path_params,
1090+
query_params,
1091+
header_params,
1092+
body=body_params,
1093+
post_params=form_params,
1094+
files=local_var_files,
1095+
response_type='GetVpcEndpointResponse', # noqa: E501
1096+
auth_settings=auth_settings,
1097+
async_req=params.get('async_req'),
1098+
_return_http_data_only=params.get('_return_http_data_only'),
1099+
_preload_content=params.get('_preload_content', True),
1100+
_request_timeout=params.get('_request_timeout'),
1101+
collection_formats=collection_formats)
1102+
10061103
def list_domains(self, body, **kwargs): # noqa: E501
10071104
"""list_domains # noqa: E501
10081105
@@ -1875,3 +1972,100 @@ def update_repository_with_http_info(self, body, **kwargs): # noqa: E501
18751972
_preload_content=params.get('_preload_content', True),
18761973
_request_timeout=params.get('_request_timeout'),
18771974
collection_formats=collection_formats)
1975+
1976+
def update_vpc_endpoint(self, body, **kwargs): # noqa: E501
1977+
"""update_vpc_endpoint # noqa: E501
1978+
1979+
This method makes a synchronous HTTP request by default. To make an
1980+
asynchronous HTTP request, please pass async_req=True
1981+
>>> thread = api.update_vpc_endpoint(body, async_req=True)
1982+
>>> result = thread.get()
1983+
1984+
:param async_req bool
1985+
:param UpdateVpcEndpointRequest body: (required)
1986+
:return: UpdateVpcEndpointResponse
1987+
If the method is called asynchronously,
1988+
returns the request thread.
1989+
"""
1990+
kwargs['_return_http_data_only'] = True
1991+
if kwargs.get('async_req'):
1992+
return self.update_vpc_endpoint_with_http_info(body, **kwargs) # noqa: E501
1993+
else:
1994+
(data) = self.update_vpc_endpoint_with_http_info(body, **kwargs) # noqa: E501
1995+
return data
1996+
1997+
def update_vpc_endpoint_with_http_info(self, body, **kwargs): # noqa: E501
1998+
"""update_vpc_endpoint # noqa: E501
1999+
2000+
This method makes a synchronous HTTP request by default. To make an
2001+
asynchronous HTTP request, please pass async_req=True
2002+
>>> thread = api.update_vpc_endpoint_with_http_info(body, async_req=True)
2003+
>>> result = thread.get()
2004+
2005+
:param async_req bool
2006+
:param UpdateVpcEndpointRequest body: (required)
2007+
:return: UpdateVpcEndpointResponse
2008+
If the method is called asynchronously,
2009+
returns the request thread.
2010+
"""
2011+
2012+
all_params = ['body'] # noqa: E501
2013+
all_params.append('async_req')
2014+
all_params.append('_return_http_data_only')
2015+
all_params.append('_preload_content')
2016+
all_params.append('_request_timeout')
2017+
2018+
params = locals()
2019+
for key, val in six.iteritems(params['kwargs']):
2020+
if key not in all_params:
2021+
raise TypeError(
2022+
"Got an unexpected keyword argument '%s'"
2023+
" to method update_vpc_endpoint" % key
2024+
)
2025+
params[key] = val
2026+
del params['kwargs']
2027+
# verify the required parameter 'body' is set
2028+
if self.api_client.client_side_validation and ('body' not in params or
2029+
params['body'] is None): # noqa: E501
2030+
raise ValueError("Missing the required parameter `body` when calling `update_vpc_endpoint`") # noqa: E501
2031+
2032+
collection_formats = {}
2033+
2034+
path_params = {}
2035+
2036+
query_params = []
2037+
2038+
header_params = {}
2039+
2040+
form_params = []
2041+
local_var_files = {}
2042+
2043+
body_params = None
2044+
if 'body' in params:
2045+
body_params = params['body']
2046+
# HTTP header `Accept`
2047+
header_params['Accept'] = self.api_client.select_header_accept(
2048+
['application/json']) # noqa: E501
2049+
2050+
# HTTP header `Content-Type`
2051+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2052+
['application/json']) # noqa: E501
2053+
2054+
# Authentication setting
2055+
auth_settings = ['volcengineSign'] # noqa: E501
2056+
2057+
return self.api_client.call_api(
2058+
'/UpdateVpcEndpoint/2022-05-12/cr/post/', 'POST',
2059+
path_params,
2060+
query_params,
2061+
header_params,
2062+
body=body_params,
2063+
post_params=form_params,
2064+
files=local_var_files,
2065+
response_type='UpdateVpcEndpointResponse', # noqa: E501
2066+
auth_settings=auth_settings,
2067+
async_req=params.get('async_req'),
2068+
_return_http_data_only=params.get('_return_http_data_only'),
2069+
_preload_content=params.get('_preload_content', True),
2070+
_request_timeout=params.get('_request_timeout'),
2071+
collection_formats=collection_formats)

volcenginesdkcr/models/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from volcenginesdkcr.models.delete_repository_response import DeleteRepositoryResponse
3131
from volcenginesdkcr.models.delete_tags_request import DeleteTagsRequest
3232
from volcenginesdkcr.models.delete_tags_response import DeleteTagsResponse
33+
from volcenginesdkcr.models.filter_for_get_vpc_endpoint_input import FilterForGetVpcEndpointInput
3334
from volcenginesdkcr.models.filter_for_list_namespaces_input import FilterForListNamespacesInput
3435
from volcenginesdkcr.models.filter_for_list_registries_input import FilterForListRegistriesInput
3536
from volcenginesdkcr.models.filter_for_list_repositories_input import FilterForListRepositoriesInput
@@ -40,6 +41,8 @@
4041
from volcenginesdkcr.models.get_public_endpoint_response import GetPublicEndpointResponse
4142
from volcenginesdkcr.models.get_user_request import GetUserRequest
4243
from volcenginesdkcr.models.get_user_response import GetUserResponse
44+
from volcenginesdkcr.models.get_vpc_endpoint_request import GetVpcEndpointRequest
45+
from volcenginesdkcr.models.get_vpc_endpoint_response import GetVpcEndpointResponse
4346
from volcenginesdkcr.models.image_attribute_for_list_tags_output import ImageAttributeForListTagsOutput
4447
from volcenginesdkcr.models.item_for_list_domains_output import ItemForListDomainsOutput
4548
from volcenginesdkcr.models.item_for_list_namespaces_output import ItemForListNamespacesOutput
@@ -66,3 +69,7 @@
6669
from volcenginesdkcr.models.update_public_endpoint_response import UpdatePublicEndpointResponse
6770
from volcenginesdkcr.models.update_repository_request import UpdateRepositoryRequest
6871
from volcenginesdkcr.models.update_repository_response import UpdateRepositoryResponse
72+
from volcenginesdkcr.models.update_vpc_endpoint_request import UpdateVpcEndpointRequest
73+
from volcenginesdkcr.models.update_vpc_endpoint_response import UpdateVpcEndpointResponse
74+
from volcenginesdkcr.models.vpc_for_get_vpc_endpoint_output import VpcForGetVpcEndpointOutput
75+
from volcenginesdkcr.models.vpc_for_update_vpc_endpoint_input import VpcForUpdateVpcEndpointInput
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# coding: utf-8
2+
3+
"""
4+
cr
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 FilterForGetVpcEndpointInput(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+
'statuses': 'list[str]'
37+
}
38+
39+
attribute_map = {
40+
'statuses': 'Statuses'
41+
}
42+
43+
def __init__(self, statuses=None, _configuration=None): # noqa: E501
44+
"""FilterForGetVpcEndpointInput - a model defined in Swagger""" # noqa: E501
45+
if _configuration is None:
46+
_configuration = Configuration()
47+
self._configuration = _configuration
48+
49+
self._statuses = None
50+
self.discriminator = None
51+
52+
if statuses is not None:
53+
self.statuses = statuses
54+
55+
@property
56+
def statuses(self):
57+
"""Gets the statuses of this FilterForGetVpcEndpointInput. # noqa: E501
58+
59+
60+
:return: The statuses of this FilterForGetVpcEndpointInput. # noqa: E501
61+
:rtype: list[str]
62+
"""
63+
return self._statuses
64+
65+
@statuses.setter
66+
def statuses(self, statuses):
67+
"""Sets the statuses of this FilterForGetVpcEndpointInput.
68+
69+
70+
:param statuses: The statuses of this FilterForGetVpcEndpointInput. # noqa: E501
71+
:type: list[str]
72+
"""
73+
74+
self._statuses = statuses
75+
76+
def to_dict(self):
77+
"""Returns the model properties as a dict"""
78+
result = {}
79+
80+
for attr, _ in six.iteritems(self.swagger_types):
81+
value = getattr(self, attr)
82+
if isinstance(value, list):
83+
result[attr] = list(map(
84+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
85+
value
86+
))
87+
elif hasattr(value, "to_dict"):
88+
result[attr] = value.to_dict()
89+
elif isinstance(value, dict):
90+
result[attr] = dict(map(
91+
lambda item: (item[0], item[1].to_dict())
92+
if hasattr(item[1], "to_dict") else item,
93+
value.items()
94+
))
95+
else:
96+
result[attr] = value
97+
if issubclass(FilterForGetVpcEndpointInput, dict):
98+
for key, value in self.items():
99+
result[key] = value
100+
101+
return result
102+
103+
def to_str(self):
104+
"""Returns the string representation of the model"""
105+
return pprint.pformat(self.to_dict())
106+
107+
def __repr__(self):
108+
"""For `print` and `pprint`"""
109+
return self.to_str()
110+
111+
def __eq__(self, other):
112+
"""Returns true if both objects are equal"""
113+
if not isinstance(other, FilterForGetVpcEndpointInput):
114+
return False
115+
116+
return self.to_dict() == other.to_dict()
117+
118+
def __ne__(self, other):
119+
"""Returns true if both objects are not equal"""
120+
if not isinstance(other, FilterForGetVpcEndpointInput):
121+
return True
122+
123+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)