@@ -1939,241 +1939,6 @@ def _delete_user_serialize(
1939
1939
_request_auth = _request_auth ,
1940
1940
)
1941
1941
1942
- @validate_call
1943
- def disable_service (
1944
- self ,
1945
- project_id : Annotated [StrictStr , Field (description = "Project ID" )],
1946
- _request_timeout : Union [
1947
- None ,
1948
- Annotated [StrictFloat , Field (gt = 0 )],
1949
- Tuple [Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]],
1950
- ] = None ,
1951
- _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
1952
- _content_type : Optional [StrictStr ] = None ,
1953
- _headers : Optional [Dict [StrictStr , Any ]] = None ,
1954
- _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
1955
- ) -> None :
1956
- """Terminate the Project
1957
-
1958
- Termination is the deletion of a whole project which causes the deletion of all instances for this project. Only System with permission system.databases-project.remove is able to call this resource
1959
-
1960
- :param project_id: Project ID (required)
1961
- :type project_id: str
1962
- :param _request_timeout: timeout setting for this request. If one
1963
- number provided, it will be total request
1964
- timeout. It can also be a pair (tuple) of
1965
- (connection, read) timeouts.
1966
- :type _request_timeout: int, tuple(int, int), optional
1967
- :param _request_auth: set to override the auth_settings for an a single
1968
- request; this effectively ignores the
1969
- authentication in the spec for a single request.
1970
- :type _request_auth: dict, optional
1971
- :param _content_type: force content-type for the request.
1972
- :type _content_type: str, Optional
1973
- :param _headers: set to override the headers for a single
1974
- request; this effectively ignores the headers
1975
- in the spec for a single request.
1976
- :type _headers: dict, optional
1977
- :param _host_index: set to override the host_index for a single
1978
- request; this effectively ignores the host_index
1979
- in the spec for a single request.
1980
- :type _host_index: int, optional
1981
- :return: Returns the result object.
1982
- """ # noqa: E501 docstring might be too long
1983
-
1984
- _param = self ._disable_service_serialize (
1985
- project_id = project_id ,
1986
- _request_auth = _request_auth ,
1987
- _content_type = _content_type ,
1988
- _headers = _headers ,
1989
- _host_index = _host_index ,
1990
- )
1991
-
1992
- _response_types_map : Dict [str , Optional [str ]] = {
1993
- "200" : None ,
1994
- "400" : "Error" ,
1995
- "405" : None ,
1996
- "500" : "Error" ,
1997
- }
1998
- response_data = self .api_client .call_api (* _param , _request_timeout = _request_timeout )
1999
- response_data .read ()
2000
- return self .api_client .response_deserialize (
2001
- response_data = response_data ,
2002
- response_types_map = _response_types_map ,
2003
- ).data
2004
-
2005
- @validate_call
2006
- def disable_service_with_http_info (
2007
- self ,
2008
- project_id : Annotated [StrictStr , Field (description = "Project ID" )],
2009
- _request_timeout : Union [
2010
- None ,
2011
- Annotated [StrictFloat , Field (gt = 0 )],
2012
- Tuple [Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]],
2013
- ] = None ,
2014
- _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
2015
- _content_type : Optional [StrictStr ] = None ,
2016
- _headers : Optional [Dict [StrictStr , Any ]] = None ,
2017
- _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
2018
- ) -> ApiResponse [None ]:
2019
- """Terminate the Project
2020
-
2021
- Termination is the deletion of a whole project which causes the deletion of all instances for this project. Only System with permission system.databases-project.remove is able to call this resource
2022
-
2023
- :param project_id: Project ID (required)
2024
- :type project_id: str
2025
- :param _request_timeout: timeout setting for this request. If one
2026
- number provided, it will be total request
2027
- timeout. It can also be a pair (tuple) of
2028
- (connection, read) timeouts.
2029
- :type _request_timeout: int, tuple(int, int), optional
2030
- :param _request_auth: set to override the auth_settings for an a single
2031
- request; this effectively ignores the
2032
- authentication in the spec for a single request.
2033
- :type _request_auth: dict, optional
2034
- :param _content_type: force content-type for the request.
2035
- :type _content_type: str, Optional
2036
- :param _headers: set to override the headers for a single
2037
- request; this effectively ignores the headers
2038
- in the spec for a single request.
2039
- :type _headers: dict, optional
2040
- :param _host_index: set to override the host_index for a single
2041
- request; this effectively ignores the host_index
2042
- in the spec for a single request.
2043
- :type _host_index: int, optional
2044
- :return: Returns the result object.
2045
- """ # noqa: E501 docstring might be too long
2046
-
2047
- _param = self ._disable_service_serialize (
2048
- project_id = project_id ,
2049
- _request_auth = _request_auth ,
2050
- _content_type = _content_type ,
2051
- _headers = _headers ,
2052
- _host_index = _host_index ,
2053
- )
2054
-
2055
- _response_types_map : Dict [str , Optional [str ]] = {
2056
- "200" : None ,
2057
- "400" : "Error" ,
2058
- "405" : None ,
2059
- "500" : "Error" ,
2060
- }
2061
- response_data = self .api_client .call_api (* _param , _request_timeout = _request_timeout )
2062
- response_data .read ()
2063
- return self .api_client .response_deserialize (
2064
- response_data = response_data ,
2065
- response_types_map = _response_types_map ,
2066
- )
2067
-
2068
- @validate_call
2069
- def disable_service_without_preload_content (
2070
- self ,
2071
- project_id : Annotated [StrictStr , Field (description = "Project ID" )],
2072
- _request_timeout : Union [
2073
- None ,
2074
- Annotated [StrictFloat , Field (gt = 0 )],
2075
- Tuple [Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]],
2076
- ] = None ,
2077
- _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
2078
- _content_type : Optional [StrictStr ] = None ,
2079
- _headers : Optional [Dict [StrictStr , Any ]] = None ,
2080
- _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
2081
- ) -> RESTResponseType :
2082
- """Terminate the Project
2083
-
2084
- Termination is the deletion of a whole project which causes the deletion of all instances for this project. Only System with permission system.databases-project.remove is able to call this resource
2085
-
2086
- :param project_id: Project ID (required)
2087
- :type project_id: str
2088
- :param _request_timeout: timeout setting for this request. If one
2089
- number provided, it will be total request
2090
- timeout. It can also be a pair (tuple) of
2091
- (connection, read) timeouts.
2092
- :type _request_timeout: int, tuple(int, int), optional
2093
- :param _request_auth: set to override the auth_settings for an a single
2094
- request; this effectively ignores the
2095
- authentication in the spec for a single request.
2096
- :type _request_auth: dict, optional
2097
- :param _content_type: force content-type for the request.
2098
- :type _content_type: str, Optional
2099
- :param _headers: set to override the headers for a single
2100
- request; this effectively ignores the headers
2101
- in the spec for a single request.
2102
- :type _headers: dict, optional
2103
- :param _host_index: set to override the host_index for a single
2104
- request; this effectively ignores the host_index
2105
- in the spec for a single request.
2106
- :type _host_index: int, optional
2107
- :return: Returns the result object.
2108
- """ # noqa: E501 docstring might be too long
2109
-
2110
- _param = self ._disable_service_serialize (
2111
- project_id = project_id ,
2112
- _request_auth = _request_auth ,
2113
- _content_type = _content_type ,
2114
- _headers = _headers ,
2115
- _host_index = _host_index ,
2116
- )
2117
-
2118
- _response_types_map : Dict [str , Optional [str ]] = {
2119
- "200" : None ,
2120
- "400" : "Error" ,
2121
- "405" : None ,
2122
- "500" : "Error" ,
2123
- }
2124
- response_data = self .api_client .call_api (* _param , _request_timeout = _request_timeout )
2125
- return response_data .response
2126
-
2127
- def _disable_service_serialize (
2128
- self ,
2129
- project_id ,
2130
- _request_auth ,
2131
- _content_type ,
2132
- _headers ,
2133
- _host_index ,
2134
- ) -> RequestSerialized :
2135
-
2136
- _host = None
2137
-
2138
- _collection_formats : Dict [str , str ] = {}
2139
-
2140
- _path_params : Dict [str , str ] = {}
2141
- _query_params : List [Tuple [str , str ]] = []
2142
- _header_params : Dict [str , Optional [str ]] = _headers or {}
2143
- _form_params : List [Tuple [str , str ]] = []
2144
- _files : Dict [str , Union [str , bytes ]] = {}
2145
- _body_params : Optional [bytes ] = None
2146
-
2147
- # process the path parameters
2148
- if project_id is not None :
2149
- _path_params ["projectId" ] = project_id
2150
- # process the query parameters
2151
- # process the header parameters
2152
- # process the form parameters
2153
- # process the body parameter
2154
-
2155
- # set the HTTP header `Accept`
2156
- if "Accept" not in _header_params :
2157
- _header_params ["Accept" ] = self .api_client .select_header_accept (["application/json" ])
2158
-
2159
- # authentication setting
2160
- _auth_settings : List [str ] = []
2161
-
2162
- return self .api_client .param_serialize (
2163
- method = "DELETE" ,
2164
- resource_path = "/v1/projects/{projectId}" ,
2165
- path_params = _path_params ,
2166
- query_params = _query_params ,
2167
- header_params = _header_params ,
2168
- body = _body_params ,
2169
- post_params = _form_params ,
2170
- files = _files ,
2171
- auth_settings = _auth_settings ,
2172
- collection_formats = _collection_formats ,
2173
- _host = _host ,
2174
- _request_auth = _request_auth ,
2175
- )
2176
-
2177
1942
@validate_call
2178
1943
def force_delete_instance (
2179
1944
self ,
0 commit comments