github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python/lakefs_sdk/api/experimental_api.py (about)

     1  # coding: utf-8
     2  
     3  """
     4      lakeFS API
     5  
     6      lakeFS HTTP API
     7  
     8      The version of the OpenAPI document: 1.0.0
     9      Contact: services@treeverse.io
    10      Generated by OpenAPI Generator (https://openapi-generator.tech)
    11  
    12      Do not edit the class manually.
    13  """  # noqa: E501
    14  
    15  
    16  import re  # noqa: F401
    17  import io
    18  import warnings
    19  
    20  try:
    21      from pydantic.v1 import validate_arguments, ValidationError
    22  except ImportError:
    23      from pydantic import validate_arguments, ValidationError
    24  from typing_extensions import Annotated
    25  
    26  try:
    27      from pydantic.v1 import Field, StrictBool, StrictInt, StrictStr, conint
    28  except ImportError:
    29      from pydantic import Field, StrictBool, StrictInt, StrictStr, conint
    30  
    31  from typing import Optional
    32  
    33  from lakefs_sdk.models.abort_presign_multipart_upload import AbortPresignMultipartUpload
    34  from lakefs_sdk.models.authentication_token import AuthenticationToken
    35  from lakefs_sdk.models.complete_presign_multipart_upload import CompletePresignMultipartUpload
    36  from lakefs_sdk.models.external_login_information import ExternalLoginInformation
    37  from lakefs_sdk.models.external_principal import ExternalPrincipal
    38  from lakefs_sdk.models.external_principal_creation import ExternalPrincipalCreation
    39  from lakefs_sdk.models.external_principal_list import ExternalPrincipalList
    40  from lakefs_sdk.models.object_stats import ObjectStats
    41  from lakefs_sdk.models.presign_multipart_upload import PresignMultipartUpload
    42  from lakefs_sdk.models.sts_auth_request import StsAuthRequest
    43  
    44  from lakefs_sdk.api_client import ApiClient
    45  from lakefs_sdk.api_response import ApiResponse
    46  from lakefs_sdk.exceptions import (  # noqa: F401
    47      ApiTypeError,
    48      ApiValueError
    49  )
    50  
    51  
    52  class ExperimentalApi(object):
    53      """NOTE: This class is auto generated by OpenAPI Generator
    54      Ref: https://openapi-generator.tech
    55  
    56      Do not edit the class manually.
    57      """
    58  
    59      def __init__(self, api_client=None):
    60          if api_client is None:
    61              api_client = ApiClient.get_default()
    62          self.api_client = api_client
    63  
    64      @validate_arguments
    65      def abort_presign_multipart_upload(self, repository : StrictStr, branch : StrictStr, upload_id : StrictStr, path : Annotated[StrictStr, Field(..., description="relative to the branch")], abort_presign_multipart_upload : Optional[AbortPresignMultipartUpload] = None, **kwargs) -> None:  # noqa: E501
    66          """Abort a presign multipart upload  # noqa: E501
    67  
    68          Aborts a presign multipart upload.  # noqa: E501
    69          This method makes a synchronous HTTP request by default. To make an
    70          asynchronous HTTP request, please pass async_req=True
    71  
    72          >>> thread = api.abort_presign_multipart_upload(repository, branch, upload_id, path, abort_presign_multipart_upload, async_req=True)
    73          >>> result = thread.get()
    74  
    75          :param repository: (required)
    76          :type repository: str
    77          :param branch: (required)
    78          :type branch: str
    79          :param upload_id: (required)
    80          :type upload_id: str
    81          :param path: relative to the branch (required)
    82          :type path: str
    83          :param abort_presign_multipart_upload:
    84          :type abort_presign_multipart_upload: AbortPresignMultipartUpload
    85          :param async_req: Whether to execute the request asynchronously.
    86          :type async_req: bool, optional
    87          :param _request_timeout: timeout setting for this request. If one
    88                                   number provided, it will be total request
    89                                   timeout. It can also be a pair (tuple) of
    90                                   (connection, read) timeouts.
    91          :return: Returns the result object.
    92                   If the method is called asynchronously,
    93                   returns the request thread.
    94          :rtype: None
    95          """
    96          kwargs['_return_http_data_only'] = True
    97          if '_preload_content' in kwargs:
    98              raise ValueError("Error! Please call the abort_presign_multipart_upload_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
    99          return self.abort_presign_multipart_upload_with_http_info(repository, branch, upload_id, path, abort_presign_multipart_upload, **kwargs)  # noqa: E501
   100  
   101      @validate_arguments
   102      def abort_presign_multipart_upload_with_http_info(self, repository : StrictStr, branch : StrictStr, upload_id : StrictStr, path : Annotated[StrictStr, Field(..., description="relative to the branch")], abort_presign_multipart_upload : Optional[AbortPresignMultipartUpload] = None, **kwargs) -> ApiResponse:  # noqa: E501
   103          """Abort a presign multipart upload  # noqa: E501
   104  
   105          Aborts a presign multipart upload.  # noqa: E501
   106          This method makes a synchronous HTTP request by default. To make an
   107          asynchronous HTTP request, please pass async_req=True
   108  
   109          >>> thread = api.abort_presign_multipart_upload_with_http_info(repository, branch, upload_id, path, abort_presign_multipart_upload, async_req=True)
   110          >>> result = thread.get()
   111  
   112          :param repository: (required)
   113          :type repository: str
   114          :param branch: (required)
   115          :type branch: str
   116          :param upload_id: (required)
   117          :type upload_id: str
   118          :param path: relative to the branch (required)
   119          :type path: str
   120          :param abort_presign_multipart_upload:
   121          :type abort_presign_multipart_upload: AbortPresignMultipartUpload
   122          :param async_req: Whether to execute the request asynchronously.
   123          :type async_req: bool, optional
   124          :param _preload_content: if False, the ApiResponse.data will
   125                                   be set to none and raw_data will store the 
   126                                   HTTP response body without reading/decoding.
   127                                   Default is True.
   128          :type _preload_content: bool, optional
   129          :param _return_http_data_only: response data instead of ApiResponse
   130                                         object with status code, headers, etc
   131          :type _return_http_data_only: bool, optional
   132          :param _request_timeout: timeout setting for this request. If one
   133                                   number provided, it will be total request
   134                                   timeout. It can also be a pair (tuple) of
   135                                   (connection, read) timeouts.
   136          :param _request_auth: set to override the auth_settings for an a single
   137                                request; this effectively ignores the authentication
   138                                in the spec for a single request.
   139          :type _request_auth: dict, optional
   140          :type _content_type: string, optional: force content-type for the request
   141          :return: Returns the result object.
   142                   If the method is called asynchronously,
   143                   returns the request thread.
   144          :rtype: None
   145          """
   146  
   147          _params = locals()
   148  
   149          _all_params = [
   150              'repository',
   151              'branch',
   152              'upload_id',
   153              'path',
   154              'abort_presign_multipart_upload'
   155          ]
   156          _all_params.extend(
   157              [
   158                  'async_req',
   159                  '_return_http_data_only',
   160                  '_preload_content',
   161                  '_request_timeout',
   162                  '_request_auth',
   163                  '_content_type',
   164                  '_headers'
   165              ]
   166          )
   167  
   168          # validate the arguments
   169          for _key, _val in _params['kwargs'].items():
   170              if _key not in _all_params:
   171                  raise ApiTypeError(
   172                      "Got an unexpected keyword argument '%s'"
   173                      " to method abort_presign_multipart_upload" % _key
   174                  )
   175              _params[_key] = _val
   176          del _params['kwargs']
   177  
   178          _collection_formats = {}
   179  
   180          # process the path parameters
   181          _path_params = {}
   182          if _params['repository']:
   183              _path_params['repository'] = _params['repository']
   184  
   185          if _params['branch']:
   186              _path_params['branch'] = _params['branch']
   187  
   188          if _params['upload_id']:
   189              _path_params['uploadId'] = _params['upload_id']
   190  
   191  
   192          # process the query parameters
   193          _query_params = []
   194          if _params.get('path') is not None:  # noqa: E501
   195              _query_params.append(('path', _params['path']))
   196  
   197          # process the header parameters
   198          _header_params = dict(_params.get('_headers', {}))
   199          # process the form parameters
   200          _form_params = []
   201          _files = {}
   202          # process the body parameter
   203          _body_params = None
   204          if _params['abort_presign_multipart_upload'] is not None:
   205              _body_params = _params['abort_presign_multipart_upload']
   206  
   207          # set the HTTP header `Accept`
   208          _header_params['Accept'] = self.api_client.select_header_accept(
   209              ['application/json'])  # noqa: E501
   210  
   211          # set the HTTP header `Content-Type`
   212          _content_types_list = _params.get('_content_type',
   213              self.api_client.select_header_content_type(
   214                  ['application/json']))
   215          if _content_types_list:
   216                  _header_params['Content-Type'] = _content_types_list
   217  
   218          # authentication setting
   219          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   220  
   221          _response_types_map = {}
   222  
   223          return self.api_client.call_api(
   224              '/repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId}', 'DELETE',
   225              _path_params,
   226              _query_params,
   227              _header_params,
   228              body=_body_params,
   229              post_params=_form_params,
   230              files=_files,
   231              response_types_map=_response_types_map,
   232              auth_settings=_auth_settings,
   233              async_req=_params.get('async_req'),
   234              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   235              _preload_content=_params.get('_preload_content', True),
   236              _request_timeout=_params.get('_request_timeout'),
   237              collection_formats=_collection_formats,
   238              _request_auth=_params.get('_request_auth'))
   239  
   240      @validate_arguments
   241      def complete_presign_multipart_upload(self, repository : StrictStr, branch : StrictStr, upload_id : StrictStr, path : Annotated[StrictStr, Field(..., description="relative to the branch")], complete_presign_multipart_upload : Optional[CompletePresignMultipartUpload] = None, **kwargs) -> ObjectStats:  # noqa: E501
   242          """Complete a presign multipart upload request  # noqa: E501
   243  
   244          Completes a presign multipart upload by assembling the uploaded parts.  # noqa: E501
   245          This method makes a synchronous HTTP request by default. To make an
   246          asynchronous HTTP request, please pass async_req=True
   247  
   248          >>> thread = api.complete_presign_multipart_upload(repository, branch, upload_id, path, complete_presign_multipart_upload, async_req=True)
   249          >>> result = thread.get()
   250  
   251          :param repository: (required)
   252          :type repository: str
   253          :param branch: (required)
   254          :type branch: str
   255          :param upload_id: (required)
   256          :type upload_id: str
   257          :param path: relative to the branch (required)
   258          :type path: str
   259          :param complete_presign_multipart_upload:
   260          :type complete_presign_multipart_upload: CompletePresignMultipartUpload
   261          :param async_req: Whether to execute the request asynchronously.
   262          :type async_req: bool, optional
   263          :param _request_timeout: timeout setting for this request. If one
   264                                   number provided, it will be total request
   265                                   timeout. It can also be a pair (tuple) of
   266                                   (connection, read) timeouts.
   267          :return: Returns the result object.
   268                   If the method is called asynchronously,
   269                   returns the request thread.
   270          :rtype: ObjectStats
   271          """
   272          kwargs['_return_http_data_only'] = True
   273          if '_preload_content' in kwargs:
   274              raise ValueError("Error! Please call the complete_presign_multipart_upload_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   275          return self.complete_presign_multipart_upload_with_http_info(repository, branch, upload_id, path, complete_presign_multipart_upload, **kwargs)  # noqa: E501
   276  
   277      @validate_arguments
   278      def complete_presign_multipart_upload_with_http_info(self, repository : StrictStr, branch : StrictStr, upload_id : StrictStr, path : Annotated[StrictStr, Field(..., description="relative to the branch")], complete_presign_multipart_upload : Optional[CompletePresignMultipartUpload] = None, **kwargs) -> ApiResponse:  # noqa: E501
   279          """Complete a presign multipart upload request  # noqa: E501
   280  
   281          Completes a presign multipart upload by assembling the uploaded parts.  # noqa: E501
   282          This method makes a synchronous HTTP request by default. To make an
   283          asynchronous HTTP request, please pass async_req=True
   284  
   285          >>> thread = api.complete_presign_multipart_upload_with_http_info(repository, branch, upload_id, path, complete_presign_multipart_upload, async_req=True)
   286          >>> result = thread.get()
   287  
   288          :param repository: (required)
   289          :type repository: str
   290          :param branch: (required)
   291          :type branch: str
   292          :param upload_id: (required)
   293          :type upload_id: str
   294          :param path: relative to the branch (required)
   295          :type path: str
   296          :param complete_presign_multipart_upload:
   297          :type complete_presign_multipart_upload: CompletePresignMultipartUpload
   298          :param async_req: Whether to execute the request asynchronously.
   299          :type async_req: bool, optional
   300          :param _preload_content: if False, the ApiResponse.data will
   301                                   be set to none and raw_data will store the 
   302                                   HTTP response body without reading/decoding.
   303                                   Default is True.
   304          :type _preload_content: bool, optional
   305          :param _return_http_data_only: response data instead of ApiResponse
   306                                         object with status code, headers, etc
   307          :type _return_http_data_only: bool, optional
   308          :param _request_timeout: timeout setting for this request. If one
   309                                   number provided, it will be total request
   310                                   timeout. It can also be a pair (tuple) of
   311                                   (connection, read) timeouts.
   312          :param _request_auth: set to override the auth_settings for an a single
   313                                request; this effectively ignores the authentication
   314                                in the spec for a single request.
   315          :type _request_auth: dict, optional
   316          :type _content_type: string, optional: force content-type for the request
   317          :return: Returns the result object.
   318                   If the method is called asynchronously,
   319                   returns the request thread.
   320          :rtype: tuple(ObjectStats, status_code(int), headers(HTTPHeaderDict))
   321          """
   322  
   323          _params = locals()
   324  
   325          _all_params = [
   326              'repository',
   327              'branch',
   328              'upload_id',
   329              'path',
   330              'complete_presign_multipart_upload'
   331          ]
   332          _all_params.extend(
   333              [
   334                  'async_req',
   335                  '_return_http_data_only',
   336                  '_preload_content',
   337                  '_request_timeout',
   338                  '_request_auth',
   339                  '_content_type',
   340                  '_headers'
   341              ]
   342          )
   343  
   344          # validate the arguments
   345          for _key, _val in _params['kwargs'].items():
   346              if _key not in _all_params:
   347                  raise ApiTypeError(
   348                      "Got an unexpected keyword argument '%s'"
   349                      " to method complete_presign_multipart_upload" % _key
   350                  )
   351              _params[_key] = _val
   352          del _params['kwargs']
   353  
   354          _collection_formats = {}
   355  
   356          # process the path parameters
   357          _path_params = {}
   358          if _params['repository']:
   359              _path_params['repository'] = _params['repository']
   360  
   361          if _params['branch']:
   362              _path_params['branch'] = _params['branch']
   363  
   364          if _params['upload_id']:
   365              _path_params['uploadId'] = _params['upload_id']
   366  
   367  
   368          # process the query parameters
   369          _query_params = []
   370          if _params.get('path') is not None:  # noqa: E501
   371              _query_params.append(('path', _params['path']))
   372  
   373          # process the header parameters
   374          _header_params = dict(_params.get('_headers', {}))
   375          # process the form parameters
   376          _form_params = []
   377          _files = {}
   378          # process the body parameter
   379          _body_params = None
   380          if _params['complete_presign_multipart_upload'] is not None:
   381              _body_params = _params['complete_presign_multipart_upload']
   382  
   383          # set the HTTP header `Accept`
   384          _header_params['Accept'] = self.api_client.select_header_accept(
   385              ['application/json'])  # noqa: E501
   386  
   387          # set the HTTP header `Content-Type`
   388          _content_types_list = _params.get('_content_type',
   389              self.api_client.select_header_content_type(
   390                  ['application/json']))
   391          if _content_types_list:
   392                  _header_params['Content-Type'] = _content_types_list
   393  
   394          # authentication setting
   395          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   396  
   397          _response_types_map = {
   398              '200': "ObjectStats",
   399              '400': "Error",
   400              '401': "Error",
   401              '404': "Error",
   402              '409': "StagingLocation",
   403              '420': None,
   404          }
   405  
   406          return self.api_client.call_api(
   407              '/repositories/{repository}/branches/{branch}/staging/pmpu/{uploadId}', 'PUT',
   408              _path_params,
   409              _query_params,
   410              _header_params,
   411              body=_body_params,
   412              post_params=_form_params,
   413              files=_files,
   414              response_types_map=_response_types_map,
   415              auth_settings=_auth_settings,
   416              async_req=_params.get('async_req'),
   417              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   418              _preload_content=_params.get('_preload_content', True),
   419              _request_timeout=_params.get('_request_timeout'),
   420              collection_formats=_collection_formats,
   421              _request_auth=_params.get('_request_auth'))
   422  
   423      @validate_arguments
   424      def create_presign_multipart_upload(self, repository : StrictStr, branch : StrictStr, path : Annotated[StrictStr, Field(..., description="relative to the branch")], parts : Annotated[Optional[StrictInt], Field(description="number of presigned URL parts required to upload")] = None, **kwargs) -> PresignMultipartUpload:  # noqa: E501
   425          """Initiate a multipart upload  # noqa: E501
   426  
   427          Initiates a multipart upload and returns an upload ID with presigned URLs for each part (optional). Part numbers starts with 1. Each part except the last one has minimum size depends on the underlying blockstore implementation. For example working with S3 blockstore, minimum size is 5MB (excluding the last part).   # noqa: E501
   428          This method makes a synchronous HTTP request by default. To make an
   429          asynchronous HTTP request, please pass async_req=True
   430  
   431          >>> thread = api.create_presign_multipart_upload(repository, branch, path, parts, async_req=True)
   432          >>> result = thread.get()
   433  
   434          :param repository: (required)
   435          :type repository: str
   436          :param branch: (required)
   437          :type branch: str
   438          :param path: relative to the branch (required)
   439          :type path: str
   440          :param parts: number of presigned URL parts required to upload
   441          :type parts: int
   442          :param async_req: Whether to execute the request asynchronously.
   443          :type async_req: bool, optional
   444          :param _request_timeout: timeout setting for this request. If one
   445                                   number provided, it will be total request
   446                                   timeout. It can also be a pair (tuple) of
   447                                   (connection, read) timeouts.
   448          :return: Returns the result object.
   449                   If the method is called asynchronously,
   450                   returns the request thread.
   451          :rtype: PresignMultipartUpload
   452          """
   453          kwargs['_return_http_data_only'] = True
   454          if '_preload_content' in kwargs:
   455              raise ValueError("Error! Please call the create_presign_multipart_upload_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   456          return self.create_presign_multipart_upload_with_http_info(repository, branch, path, parts, **kwargs)  # noqa: E501
   457  
   458      @validate_arguments
   459      def create_presign_multipart_upload_with_http_info(self, repository : StrictStr, branch : StrictStr, path : Annotated[StrictStr, Field(..., description="relative to the branch")], parts : Annotated[Optional[StrictInt], Field(description="number of presigned URL parts required to upload")] = None, **kwargs) -> ApiResponse:  # noqa: E501
   460          """Initiate a multipart upload  # noqa: E501
   461  
   462          Initiates a multipart upload and returns an upload ID with presigned URLs for each part (optional). Part numbers starts with 1. Each part except the last one has minimum size depends on the underlying blockstore implementation. For example working with S3 blockstore, minimum size is 5MB (excluding the last part).   # noqa: E501
   463          This method makes a synchronous HTTP request by default. To make an
   464          asynchronous HTTP request, please pass async_req=True
   465  
   466          >>> thread = api.create_presign_multipart_upload_with_http_info(repository, branch, path, parts, async_req=True)
   467          >>> result = thread.get()
   468  
   469          :param repository: (required)
   470          :type repository: str
   471          :param branch: (required)
   472          :type branch: str
   473          :param path: relative to the branch (required)
   474          :type path: str
   475          :param parts: number of presigned URL parts required to upload
   476          :type parts: int
   477          :param async_req: Whether to execute the request asynchronously.
   478          :type async_req: bool, optional
   479          :param _preload_content: if False, the ApiResponse.data will
   480                                   be set to none and raw_data will store the 
   481                                   HTTP response body without reading/decoding.
   482                                   Default is True.
   483          :type _preload_content: bool, optional
   484          :param _return_http_data_only: response data instead of ApiResponse
   485                                         object with status code, headers, etc
   486          :type _return_http_data_only: bool, optional
   487          :param _request_timeout: timeout setting for this request. If one
   488                                   number provided, it will be total request
   489                                   timeout. It can also be a pair (tuple) of
   490                                   (connection, read) timeouts.
   491          :param _request_auth: set to override the auth_settings for an a single
   492                                request; this effectively ignores the authentication
   493                                in the spec for a single request.
   494          :type _request_auth: dict, optional
   495          :type _content_type: string, optional: force content-type for the request
   496          :return: Returns the result object.
   497                   If the method is called asynchronously,
   498                   returns the request thread.
   499          :rtype: tuple(PresignMultipartUpload, status_code(int), headers(HTTPHeaderDict))
   500          """
   501  
   502          _params = locals()
   503  
   504          _all_params = [
   505              'repository',
   506              'branch',
   507              'path',
   508              'parts'
   509          ]
   510          _all_params.extend(
   511              [
   512                  'async_req',
   513                  '_return_http_data_only',
   514                  '_preload_content',
   515                  '_request_timeout',
   516                  '_request_auth',
   517                  '_content_type',
   518                  '_headers'
   519              ]
   520          )
   521  
   522          # validate the arguments
   523          for _key, _val in _params['kwargs'].items():
   524              if _key not in _all_params:
   525                  raise ApiTypeError(
   526                      "Got an unexpected keyword argument '%s'"
   527                      " to method create_presign_multipart_upload" % _key
   528                  )
   529              _params[_key] = _val
   530          del _params['kwargs']
   531  
   532          _collection_formats = {}
   533  
   534          # process the path parameters
   535          _path_params = {}
   536          if _params['repository']:
   537              _path_params['repository'] = _params['repository']
   538  
   539          if _params['branch']:
   540              _path_params['branch'] = _params['branch']
   541  
   542  
   543          # process the query parameters
   544          _query_params = []
   545          if _params.get('path') is not None:  # noqa: E501
   546              _query_params.append(('path', _params['path']))
   547  
   548          if _params.get('parts') is not None:  # noqa: E501
   549              _query_params.append(('parts', _params['parts']))
   550  
   551          # process the header parameters
   552          _header_params = dict(_params.get('_headers', {}))
   553          # process the form parameters
   554          _form_params = []
   555          _files = {}
   556          # process the body parameter
   557          _body_params = None
   558          # set the HTTP header `Accept`
   559          _header_params['Accept'] = self.api_client.select_header_accept(
   560              ['application/json'])  # noqa: E501
   561  
   562          # authentication setting
   563          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   564  
   565          _response_types_map = {
   566              '201': "PresignMultipartUpload",
   567              '400': "Error",
   568              '401': "Error",
   569              '404': "Error",
   570              '420': None,
   571          }
   572  
   573          return self.api_client.call_api(
   574              '/repositories/{repository}/branches/{branch}/staging/pmpu', 'POST',
   575              _path_params,
   576              _query_params,
   577              _header_params,
   578              body=_body_params,
   579              post_params=_form_params,
   580              files=_files,
   581              response_types_map=_response_types_map,
   582              auth_settings=_auth_settings,
   583              async_req=_params.get('async_req'),
   584              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   585              _preload_content=_params.get('_preload_content', True),
   586              _request_timeout=_params.get('_request_timeout'),
   587              collection_formats=_collection_formats,
   588              _request_auth=_params.get('_request_auth'))
   589  
   590      @validate_arguments
   591      def create_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> None:  # noqa: E501
   592          """attach external principal to user  # noqa: E501
   593  
   594          This method makes a synchronous HTTP request by default. To make an
   595          asynchronous HTTP request, please pass async_req=True
   596  
   597          >>> thread = api.create_user_external_principal(user_id, principal_id, external_principal_creation, async_req=True)
   598          >>> result = thread.get()
   599  
   600          :param user_id: (required)
   601          :type user_id: str
   602          :param principal_id: (required)
   603          :type principal_id: str
   604          :param external_principal_creation:
   605          :type external_principal_creation: ExternalPrincipalCreation
   606          :param async_req: Whether to execute the request asynchronously.
   607          :type async_req: bool, optional
   608          :param _request_timeout: timeout setting for this request. If one
   609                                   number provided, it will be total request
   610                                   timeout. It can also be a pair (tuple) of
   611                                   (connection, read) timeouts.
   612          :return: Returns the result object.
   613                   If the method is called asynchronously,
   614                   returns the request thread.
   615          :rtype: None
   616          """
   617          kwargs['_return_http_data_only'] = True
   618          if '_preload_content' in kwargs:
   619              raise ValueError("Error! Please call the create_user_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   620          return self.create_user_external_principal_with_http_info(user_id, principal_id, external_principal_creation, **kwargs)  # noqa: E501
   621  
   622      @validate_arguments
   623      def create_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, external_principal_creation : Optional[ExternalPrincipalCreation] = None, **kwargs) -> ApiResponse:  # noqa: E501
   624          """attach external principal to user  # noqa: E501
   625  
   626          This method makes a synchronous HTTP request by default. To make an
   627          asynchronous HTTP request, please pass async_req=True
   628  
   629          >>> thread = api.create_user_external_principal_with_http_info(user_id, principal_id, external_principal_creation, async_req=True)
   630          >>> result = thread.get()
   631  
   632          :param user_id: (required)
   633          :type user_id: str
   634          :param principal_id: (required)
   635          :type principal_id: str
   636          :param external_principal_creation:
   637          :type external_principal_creation: ExternalPrincipalCreation
   638          :param async_req: Whether to execute the request asynchronously.
   639          :type async_req: bool, optional
   640          :param _preload_content: if False, the ApiResponse.data will
   641                                   be set to none and raw_data will store the 
   642                                   HTTP response body without reading/decoding.
   643                                   Default is True.
   644          :type _preload_content: bool, optional
   645          :param _return_http_data_only: response data instead of ApiResponse
   646                                         object with status code, headers, etc
   647          :type _return_http_data_only: bool, optional
   648          :param _request_timeout: timeout setting for this request. If one
   649                                   number provided, it will be total request
   650                                   timeout. It can also be a pair (tuple) of
   651                                   (connection, read) timeouts.
   652          :param _request_auth: set to override the auth_settings for an a single
   653                                request; this effectively ignores the authentication
   654                                in the spec for a single request.
   655          :type _request_auth: dict, optional
   656          :type _content_type: string, optional: force content-type for the request
   657          :return: Returns the result object.
   658                   If the method is called asynchronously,
   659                   returns the request thread.
   660          :rtype: None
   661          """
   662  
   663          _params = locals()
   664  
   665          _all_params = [
   666              'user_id',
   667              'principal_id',
   668              'external_principal_creation'
   669          ]
   670          _all_params.extend(
   671              [
   672                  'async_req',
   673                  '_return_http_data_only',
   674                  '_preload_content',
   675                  '_request_timeout',
   676                  '_request_auth',
   677                  '_content_type',
   678                  '_headers'
   679              ]
   680          )
   681  
   682          # validate the arguments
   683          for _key, _val in _params['kwargs'].items():
   684              if _key not in _all_params:
   685                  raise ApiTypeError(
   686                      "Got an unexpected keyword argument '%s'"
   687                      " to method create_user_external_principal" % _key
   688                  )
   689              _params[_key] = _val
   690          del _params['kwargs']
   691  
   692          _collection_formats = {}
   693  
   694          # process the path parameters
   695          _path_params = {}
   696          if _params['user_id']:
   697              _path_params['userId'] = _params['user_id']
   698  
   699  
   700          # process the query parameters
   701          _query_params = []
   702          if _params.get('principal_id') is not None:  # noqa: E501
   703              _query_params.append(('principalId', _params['principal_id']))
   704  
   705          # process the header parameters
   706          _header_params = dict(_params.get('_headers', {}))
   707          # process the form parameters
   708          _form_params = []
   709          _files = {}
   710          # process the body parameter
   711          _body_params = None
   712          if _params['external_principal_creation'] is not None:
   713              _body_params = _params['external_principal_creation']
   714  
   715          # set the HTTP header `Accept`
   716          _header_params['Accept'] = self.api_client.select_header_accept(
   717              ['application/json'])  # noqa: E501
   718  
   719          # set the HTTP header `Content-Type`
   720          _content_types_list = _params.get('_content_type',
   721              self.api_client.select_header_content_type(
   722                  ['application/json']))
   723          if _content_types_list:
   724                  _header_params['Content-Type'] = _content_types_list
   725  
   726          # authentication setting
   727          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   728  
   729          _response_types_map = {}
   730  
   731          return self.api_client.call_api(
   732              '/auth/users/{userId}/external/principals', 'POST',
   733              _path_params,
   734              _query_params,
   735              _header_params,
   736              body=_body_params,
   737              post_params=_form_params,
   738              files=_files,
   739              response_types_map=_response_types_map,
   740              auth_settings=_auth_settings,
   741              async_req=_params.get('async_req'),
   742              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   743              _preload_content=_params.get('_preload_content', True),
   744              _request_timeout=_params.get('_request_timeout'),
   745              collection_formats=_collection_formats,
   746              _request_auth=_params.get('_request_auth'))
   747  
   748      @validate_arguments
   749      def delete_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> None:  # noqa: E501
   750          """delete external principal from user  # noqa: E501
   751  
   752          This method makes a synchronous HTTP request by default. To make an
   753          asynchronous HTTP request, please pass async_req=True
   754  
   755          >>> thread = api.delete_user_external_principal(user_id, principal_id, async_req=True)
   756          >>> result = thread.get()
   757  
   758          :param user_id: (required)
   759          :type user_id: str
   760          :param principal_id: (required)
   761          :type principal_id: str
   762          :param async_req: Whether to execute the request asynchronously.
   763          :type async_req: bool, optional
   764          :param _request_timeout: timeout setting for this request. If one
   765                                   number provided, it will be total request
   766                                   timeout. It can also be a pair (tuple) of
   767                                   (connection, read) timeouts.
   768          :return: Returns the result object.
   769                   If the method is called asynchronously,
   770                   returns the request thread.
   771          :rtype: None
   772          """
   773          kwargs['_return_http_data_only'] = True
   774          if '_preload_content' in kwargs:
   775              raise ValueError("Error! Please call the delete_user_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   776          return self.delete_user_external_principal_with_http_info(user_id, principal_id, **kwargs)  # noqa: E501
   777  
   778      @validate_arguments
   779      def delete_user_external_principal_with_http_info(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
   780          """delete external principal from user  # noqa: E501
   781  
   782          This method makes a synchronous HTTP request by default. To make an
   783          asynchronous HTTP request, please pass async_req=True
   784  
   785          >>> thread = api.delete_user_external_principal_with_http_info(user_id, principal_id, async_req=True)
   786          >>> result = thread.get()
   787  
   788          :param user_id: (required)
   789          :type user_id: str
   790          :param principal_id: (required)
   791          :type principal_id: str
   792          :param async_req: Whether to execute the request asynchronously.
   793          :type async_req: bool, optional
   794          :param _preload_content: if False, the ApiResponse.data will
   795                                   be set to none and raw_data will store the 
   796                                   HTTP response body without reading/decoding.
   797                                   Default is True.
   798          :type _preload_content: bool, optional
   799          :param _return_http_data_only: response data instead of ApiResponse
   800                                         object with status code, headers, etc
   801          :type _return_http_data_only: bool, optional
   802          :param _request_timeout: timeout setting for this request. If one
   803                                   number provided, it will be total request
   804                                   timeout. It can also be a pair (tuple) of
   805                                   (connection, read) timeouts.
   806          :param _request_auth: set to override the auth_settings for an a single
   807                                request; this effectively ignores the authentication
   808                                in the spec for a single request.
   809          :type _request_auth: dict, optional
   810          :type _content_type: string, optional: force content-type for the request
   811          :return: Returns the result object.
   812                   If the method is called asynchronously,
   813                   returns the request thread.
   814          :rtype: None
   815          """
   816  
   817          _params = locals()
   818  
   819          _all_params = [
   820              'user_id',
   821              'principal_id'
   822          ]
   823          _all_params.extend(
   824              [
   825                  'async_req',
   826                  '_return_http_data_only',
   827                  '_preload_content',
   828                  '_request_timeout',
   829                  '_request_auth',
   830                  '_content_type',
   831                  '_headers'
   832              ]
   833          )
   834  
   835          # validate the arguments
   836          for _key, _val in _params['kwargs'].items():
   837              if _key not in _all_params:
   838                  raise ApiTypeError(
   839                      "Got an unexpected keyword argument '%s'"
   840                      " to method delete_user_external_principal" % _key
   841                  )
   842              _params[_key] = _val
   843          del _params['kwargs']
   844  
   845          _collection_formats = {}
   846  
   847          # process the path parameters
   848          _path_params = {}
   849          if _params['user_id']:
   850              _path_params['userId'] = _params['user_id']
   851  
   852  
   853          # process the query parameters
   854          _query_params = []
   855          if _params.get('principal_id') is not None:  # noqa: E501
   856              _query_params.append(('principalId', _params['principal_id']))
   857  
   858          # process the header parameters
   859          _header_params = dict(_params.get('_headers', {}))
   860          # process the form parameters
   861          _form_params = []
   862          _files = {}
   863          # process the body parameter
   864          _body_params = None
   865          # set the HTTP header `Accept`
   866          _header_params['Accept'] = self.api_client.select_header_accept(
   867              ['application/json'])  # noqa: E501
   868  
   869          # authentication setting
   870          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   871  
   872          _response_types_map = {}
   873  
   874          return self.api_client.call_api(
   875              '/auth/users/{userId}/external/principals', 'DELETE',
   876              _path_params,
   877              _query_params,
   878              _header_params,
   879              body=_body_params,
   880              post_params=_form_params,
   881              files=_files,
   882              response_types_map=_response_types_map,
   883              auth_settings=_auth_settings,
   884              async_req=_params.get('async_req'),
   885              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   886              _preload_content=_params.get('_preload_content', True),
   887              _request_timeout=_params.get('_request_timeout'),
   888              collection_formats=_collection_formats,
   889              _request_auth=_params.get('_request_auth'))
   890  
   891      @validate_arguments
   892      def external_principal_login(self, external_login_information : Optional[ExternalLoginInformation] = None, **kwargs) -> AuthenticationToken:  # noqa: E501
   893          """perform a login using an external authenticator  # noqa: E501
   894  
   895          This method makes a synchronous HTTP request by default. To make an
   896          asynchronous HTTP request, please pass async_req=True
   897  
   898          >>> thread = api.external_principal_login(external_login_information, async_req=True)
   899          >>> result = thread.get()
   900  
   901          :param external_login_information:
   902          :type external_login_information: ExternalLoginInformation
   903          :param async_req: Whether to execute the request asynchronously.
   904          :type async_req: bool, optional
   905          :param _request_timeout: timeout setting for this request. If one
   906                                   number provided, it will be total request
   907                                   timeout. It can also be a pair (tuple) of
   908                                   (connection, read) timeouts.
   909          :return: Returns the result object.
   910                   If the method is called asynchronously,
   911                   returns the request thread.
   912          :rtype: AuthenticationToken
   913          """
   914          kwargs['_return_http_data_only'] = True
   915          if '_preload_content' in kwargs:
   916              raise ValueError("Error! Please call the external_principal_login_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   917          return self.external_principal_login_with_http_info(external_login_information, **kwargs)  # noqa: E501
   918  
   919      @validate_arguments
   920      def external_principal_login_with_http_info(self, external_login_information : Optional[ExternalLoginInformation] = None, **kwargs) -> ApiResponse:  # noqa: E501
   921          """perform a login using an external authenticator  # noqa: E501
   922  
   923          This method makes a synchronous HTTP request by default. To make an
   924          asynchronous HTTP request, please pass async_req=True
   925  
   926          >>> thread = api.external_principal_login_with_http_info(external_login_information, async_req=True)
   927          >>> result = thread.get()
   928  
   929          :param external_login_information:
   930          :type external_login_information: ExternalLoginInformation
   931          :param async_req: Whether to execute the request asynchronously.
   932          :type async_req: bool, optional
   933          :param _preload_content: if False, the ApiResponse.data will
   934                                   be set to none and raw_data will store the 
   935                                   HTTP response body without reading/decoding.
   936                                   Default is True.
   937          :type _preload_content: bool, optional
   938          :param _return_http_data_only: response data instead of ApiResponse
   939                                         object with status code, headers, etc
   940          :type _return_http_data_only: bool, optional
   941          :param _request_timeout: timeout setting for this request. If one
   942                                   number provided, it will be total request
   943                                   timeout. It can also be a pair (tuple) of
   944                                   (connection, read) timeouts.
   945          :param _request_auth: set to override the auth_settings for an a single
   946                                request; this effectively ignores the authentication
   947                                in the spec for a single request.
   948          :type _request_auth: dict, optional
   949          :type _content_type: string, optional: force content-type for the request
   950          :return: Returns the result object.
   951                   If the method is called asynchronously,
   952                   returns the request thread.
   953          :rtype: tuple(AuthenticationToken, status_code(int), headers(HTTPHeaderDict))
   954          """
   955  
   956          _params = locals()
   957  
   958          _all_params = [
   959              'external_login_information'
   960          ]
   961          _all_params.extend(
   962              [
   963                  'async_req',
   964                  '_return_http_data_only',
   965                  '_preload_content',
   966                  '_request_timeout',
   967                  '_request_auth',
   968                  '_content_type',
   969                  '_headers'
   970              ]
   971          )
   972  
   973          # validate the arguments
   974          for _key, _val in _params['kwargs'].items():
   975              if _key not in _all_params:
   976                  raise ApiTypeError(
   977                      "Got an unexpected keyword argument '%s'"
   978                      " to method external_principal_login" % _key
   979                  )
   980              _params[_key] = _val
   981          del _params['kwargs']
   982  
   983          _collection_formats = {}
   984  
   985          # process the path parameters
   986          _path_params = {}
   987  
   988          # process the query parameters
   989          _query_params = []
   990          # process the header parameters
   991          _header_params = dict(_params.get('_headers', {}))
   992          # process the form parameters
   993          _form_params = []
   994          _files = {}
   995          # process the body parameter
   996          _body_params = None
   997          if _params['external_login_information'] is not None:
   998              _body_params = _params['external_login_information']
   999  
  1000          # set the HTTP header `Accept`
  1001          _header_params['Accept'] = self.api_client.select_header_accept(
  1002              ['application/json'])  # noqa: E501
  1003  
  1004          # set the HTTP header `Content-Type`
  1005          _content_types_list = _params.get('_content_type',
  1006              self.api_client.select_header_content_type(
  1007                  ['application/json']))
  1008          if _content_types_list:
  1009                  _header_params['Content-Type'] = _content_types_list
  1010  
  1011          # authentication setting
  1012          _auth_settings = []  # noqa: E501
  1013  
  1014          _response_types_map = {
  1015              '200': "AuthenticationToken",
  1016              '400': "Error",
  1017              '401': "Error",
  1018              '403': "Error",
  1019              '404': "Error",
  1020              '420': None,
  1021          }
  1022  
  1023          return self.api_client.call_api(
  1024              '/auth/external/principal/login', 'POST',
  1025              _path_params,
  1026              _query_params,
  1027              _header_params,
  1028              body=_body_params,
  1029              post_params=_form_params,
  1030              files=_files,
  1031              response_types_map=_response_types_map,
  1032              auth_settings=_auth_settings,
  1033              async_req=_params.get('async_req'),
  1034              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1035              _preload_content=_params.get('_preload_content', True),
  1036              _request_timeout=_params.get('_request_timeout'),
  1037              collection_formats=_collection_formats,
  1038              _request_auth=_params.get('_request_auth'))
  1039  
  1040      @validate_arguments
  1041      def get_external_principal(self, principal_id : StrictStr, **kwargs) -> ExternalPrincipal:  # noqa: E501
  1042          """describe external principal by id  # noqa: E501
  1043  
  1044          This method makes a synchronous HTTP request by default. To make an
  1045          asynchronous HTTP request, please pass async_req=True
  1046  
  1047          >>> thread = api.get_external_principal(principal_id, async_req=True)
  1048          >>> result = thread.get()
  1049  
  1050          :param principal_id: (required)
  1051          :type principal_id: str
  1052          :param async_req: Whether to execute the request asynchronously.
  1053          :type async_req: bool, optional
  1054          :param _request_timeout: timeout setting for this request. If one
  1055                                   number provided, it will be total request
  1056                                   timeout. It can also be a pair (tuple) of
  1057                                   (connection, read) timeouts.
  1058          :return: Returns the result object.
  1059                   If the method is called asynchronously,
  1060                   returns the request thread.
  1061          :rtype: ExternalPrincipal
  1062          """
  1063          kwargs['_return_http_data_only'] = True
  1064          if '_preload_content' in kwargs:
  1065              raise ValueError("Error! Please call the get_external_principal_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1066          return self.get_external_principal_with_http_info(principal_id, **kwargs)  # noqa: E501
  1067  
  1068      @validate_arguments
  1069      def get_external_principal_with_http_info(self, principal_id : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
  1070          """describe external principal by id  # noqa: E501
  1071  
  1072          This method makes a synchronous HTTP request by default. To make an
  1073          asynchronous HTTP request, please pass async_req=True
  1074  
  1075          >>> thread = api.get_external_principal_with_http_info(principal_id, async_req=True)
  1076          >>> result = thread.get()
  1077  
  1078          :param principal_id: (required)
  1079          :type principal_id: str
  1080          :param async_req: Whether to execute the request asynchronously.
  1081          :type async_req: bool, optional
  1082          :param _preload_content: if False, the ApiResponse.data will
  1083                                   be set to none and raw_data will store the 
  1084                                   HTTP response body without reading/decoding.
  1085                                   Default is True.
  1086          :type _preload_content: bool, optional
  1087          :param _return_http_data_only: response data instead of ApiResponse
  1088                                         object with status code, headers, etc
  1089          :type _return_http_data_only: bool, optional
  1090          :param _request_timeout: timeout setting for this request. If one
  1091                                   number provided, it will be total request
  1092                                   timeout. It can also be a pair (tuple) of
  1093                                   (connection, read) timeouts.
  1094          :param _request_auth: set to override the auth_settings for an a single
  1095                                request; this effectively ignores the authentication
  1096                                in the spec for a single request.
  1097          :type _request_auth: dict, optional
  1098          :type _content_type: string, optional: force content-type for the request
  1099          :return: Returns the result object.
  1100                   If the method is called asynchronously,
  1101                   returns the request thread.
  1102          :rtype: tuple(ExternalPrincipal, status_code(int), headers(HTTPHeaderDict))
  1103          """
  1104  
  1105          _params = locals()
  1106  
  1107          _all_params = [
  1108              'principal_id'
  1109          ]
  1110          _all_params.extend(
  1111              [
  1112                  'async_req',
  1113                  '_return_http_data_only',
  1114                  '_preload_content',
  1115                  '_request_timeout',
  1116                  '_request_auth',
  1117                  '_content_type',
  1118                  '_headers'
  1119              ]
  1120          )
  1121  
  1122          # validate the arguments
  1123          for _key, _val in _params['kwargs'].items():
  1124              if _key not in _all_params:
  1125                  raise ApiTypeError(
  1126                      "Got an unexpected keyword argument '%s'"
  1127                      " to method get_external_principal" % _key
  1128                  )
  1129              _params[_key] = _val
  1130          del _params['kwargs']
  1131  
  1132          _collection_formats = {}
  1133  
  1134          # process the path parameters
  1135          _path_params = {}
  1136  
  1137          # process the query parameters
  1138          _query_params = []
  1139          if _params.get('principal_id') is not None:  # noqa: E501
  1140              _query_params.append(('principalId', _params['principal_id']))
  1141  
  1142          # process the header parameters
  1143          _header_params = dict(_params.get('_headers', {}))
  1144          # process the form parameters
  1145          _form_params = []
  1146          _files = {}
  1147          # process the body parameter
  1148          _body_params = None
  1149          # set the HTTP header `Accept`
  1150          _header_params['Accept'] = self.api_client.select_header_accept(
  1151              ['application/json'])  # noqa: E501
  1152  
  1153          # authentication setting
  1154          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  1155  
  1156          _response_types_map = {
  1157              '200': "ExternalPrincipal",
  1158              '401': "Error",
  1159              '404': "Error",
  1160              '420': None,
  1161          }
  1162  
  1163          return self.api_client.call_api(
  1164              '/auth/external/principals', 'GET',
  1165              _path_params,
  1166              _query_params,
  1167              _header_params,
  1168              body=_body_params,
  1169              post_params=_form_params,
  1170              files=_files,
  1171              response_types_map=_response_types_map,
  1172              auth_settings=_auth_settings,
  1173              async_req=_params.get('async_req'),
  1174              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1175              _preload_content=_params.get('_preload_content', True),
  1176              _request_timeout=_params.get('_request_timeout'),
  1177              collection_formats=_collection_formats,
  1178              _request_auth=_params.get('_request_auth'))
  1179  
  1180      @validate_arguments
  1181      def hard_reset_branch(self, repository : StrictStr, branch : StrictStr, ref : Annotated[StrictStr, Field(..., description="After reset, branch will point at this reference.")], force : Optional[StrictBool] = None, **kwargs) -> None:  # noqa: E501
  1182          """hard reset branch  # noqa: E501
  1183  
  1184          Relocate branch to refer to ref.  Branch must not contain uncommitted data.  # noqa: E501
  1185          This method makes a synchronous HTTP request by default. To make an
  1186          asynchronous HTTP request, please pass async_req=True
  1187  
  1188          >>> thread = api.hard_reset_branch(repository, branch, ref, force, async_req=True)
  1189          >>> result = thread.get()
  1190  
  1191          :param repository: (required)
  1192          :type repository: str
  1193          :param branch: (required)
  1194          :type branch: str
  1195          :param ref: After reset, branch will point at this reference. (required)
  1196          :type ref: str
  1197          :param force:
  1198          :type force: bool
  1199          :param async_req: Whether to execute the request asynchronously.
  1200          :type async_req: bool, optional
  1201          :param _request_timeout: timeout setting for this request. If one
  1202                                   number provided, it will be total request
  1203                                   timeout. It can also be a pair (tuple) of
  1204                                   (connection, read) timeouts.
  1205          :return: Returns the result object.
  1206                   If the method is called asynchronously,
  1207                   returns the request thread.
  1208          :rtype: None
  1209          """
  1210          kwargs['_return_http_data_only'] = True
  1211          if '_preload_content' in kwargs:
  1212              raise ValueError("Error! Please call the hard_reset_branch_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1213          return self.hard_reset_branch_with_http_info(repository, branch, ref, force, **kwargs)  # noqa: E501
  1214  
  1215      @validate_arguments
  1216      def hard_reset_branch_with_http_info(self, repository : StrictStr, branch : StrictStr, ref : Annotated[StrictStr, Field(..., description="After reset, branch will point at this reference.")], force : Optional[StrictBool] = None, **kwargs) -> ApiResponse:  # noqa: E501
  1217          """hard reset branch  # noqa: E501
  1218  
  1219          Relocate branch to refer to ref.  Branch must not contain uncommitted data.  # noqa: E501
  1220          This method makes a synchronous HTTP request by default. To make an
  1221          asynchronous HTTP request, please pass async_req=True
  1222  
  1223          >>> thread = api.hard_reset_branch_with_http_info(repository, branch, ref, force, async_req=True)
  1224          >>> result = thread.get()
  1225  
  1226          :param repository: (required)
  1227          :type repository: str
  1228          :param branch: (required)
  1229          :type branch: str
  1230          :param ref: After reset, branch will point at this reference. (required)
  1231          :type ref: str
  1232          :param force:
  1233          :type force: bool
  1234          :param async_req: Whether to execute the request asynchronously.
  1235          :type async_req: bool, optional
  1236          :param _preload_content: if False, the ApiResponse.data will
  1237                                   be set to none and raw_data will store the 
  1238                                   HTTP response body without reading/decoding.
  1239                                   Default is True.
  1240          :type _preload_content: bool, optional
  1241          :param _return_http_data_only: response data instead of ApiResponse
  1242                                         object with status code, headers, etc
  1243          :type _return_http_data_only: bool, optional
  1244          :param _request_timeout: timeout setting for this request. If one
  1245                                   number provided, it will be total request
  1246                                   timeout. It can also be a pair (tuple) of
  1247                                   (connection, read) timeouts.
  1248          :param _request_auth: set to override the auth_settings for an a single
  1249                                request; this effectively ignores the authentication
  1250                                in the spec for a single request.
  1251          :type _request_auth: dict, optional
  1252          :type _content_type: string, optional: force content-type for the request
  1253          :return: Returns the result object.
  1254                   If the method is called asynchronously,
  1255                   returns the request thread.
  1256          :rtype: None
  1257          """
  1258  
  1259          _params = locals()
  1260  
  1261          _all_params = [
  1262              'repository',
  1263              'branch',
  1264              'ref',
  1265              'force'
  1266          ]
  1267          _all_params.extend(
  1268              [
  1269                  'async_req',
  1270                  '_return_http_data_only',
  1271                  '_preload_content',
  1272                  '_request_timeout',
  1273                  '_request_auth',
  1274                  '_content_type',
  1275                  '_headers'
  1276              ]
  1277          )
  1278  
  1279          # validate the arguments
  1280          for _key, _val in _params['kwargs'].items():
  1281              if _key not in _all_params:
  1282                  raise ApiTypeError(
  1283                      "Got an unexpected keyword argument '%s'"
  1284                      " to method hard_reset_branch" % _key
  1285                  )
  1286              _params[_key] = _val
  1287          del _params['kwargs']
  1288  
  1289          _collection_formats = {}
  1290  
  1291          # process the path parameters
  1292          _path_params = {}
  1293          if _params['repository']:
  1294              _path_params['repository'] = _params['repository']
  1295  
  1296          if _params['branch']:
  1297              _path_params['branch'] = _params['branch']
  1298  
  1299  
  1300          # process the query parameters
  1301          _query_params = []
  1302          if _params.get('ref') is not None:  # noqa: E501
  1303              _query_params.append(('ref', _params['ref']))
  1304  
  1305          if _params.get('force') is not None:  # noqa: E501
  1306              _query_params.append(('force', _params['force']))
  1307  
  1308          # process the header parameters
  1309          _header_params = dict(_params.get('_headers', {}))
  1310          # process the form parameters
  1311          _form_params = []
  1312          _files = {}
  1313          # process the body parameter
  1314          _body_params = None
  1315          # set the HTTP header `Accept`
  1316          _header_params['Accept'] = self.api_client.select_header_accept(
  1317              ['application/json'])  # noqa: E501
  1318  
  1319          # authentication setting
  1320          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  1321  
  1322          _response_types_map = {}
  1323  
  1324          return self.api_client.call_api(
  1325              '/repositories/{repository}/branches/{branch}/hard_reset', 'PUT',
  1326              _path_params,
  1327              _query_params,
  1328              _header_params,
  1329              body=_body_params,
  1330              post_params=_form_params,
  1331              files=_files,
  1332              response_types_map=_response_types_map,
  1333              auth_settings=_auth_settings,
  1334              async_req=_params.get('async_req'),
  1335              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1336              _preload_content=_params.get('_preload_content', True),
  1337              _request_timeout=_params.get('_request_timeout'),
  1338              collection_formats=_collection_formats,
  1339              _request_auth=_params.get('_request_auth'))
  1340  
  1341      @validate_arguments
  1342      def list_user_external_principals(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ExternalPrincipalList:  # noqa: E501
  1343          """list user external policies attached to a user  # noqa: E501
  1344  
  1345          This method makes a synchronous HTTP request by default. To make an
  1346          asynchronous HTTP request, please pass async_req=True
  1347  
  1348          >>> thread = api.list_user_external_principals(user_id, prefix, after, amount, async_req=True)
  1349          >>> result = thread.get()
  1350  
  1351          :param user_id: (required)
  1352          :type user_id: str
  1353          :param prefix: return items prefixed with this value
  1354          :type prefix: str
  1355          :param after: return items after this value
  1356          :type after: str
  1357          :param amount: how many items to return
  1358          :type amount: int
  1359          :param async_req: Whether to execute the request asynchronously.
  1360          :type async_req: bool, optional
  1361          :param _request_timeout: timeout setting for this request. If one
  1362                                   number provided, it will be total request
  1363                                   timeout. It can also be a pair (tuple) of
  1364                                   (connection, read) timeouts.
  1365          :return: Returns the result object.
  1366                   If the method is called asynchronously,
  1367                   returns the request thread.
  1368          :rtype: ExternalPrincipalList
  1369          """
  1370          kwargs['_return_http_data_only'] = True
  1371          if '_preload_content' in kwargs:
  1372              raise ValueError("Error! Please call the list_user_external_principals_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1373          return self.list_user_external_principals_with_http_info(user_id, prefix, after, amount, **kwargs)  # noqa: E501
  1374  
  1375      @validate_arguments
  1376      def list_user_external_principals_with_http_info(self, user_id : StrictStr, prefix : Annotated[Optional[StrictStr], Field(description="return items prefixed with this value")] = None, after : Annotated[Optional[StrictStr], Field(description="return items after this value")] = None, amount : Annotated[Optional[conint(strict=True, le=1000, ge=-1)], Field(description="how many items to return")] = None, **kwargs) -> ApiResponse:  # noqa: E501
  1377          """list user external policies attached to a user  # noqa: E501
  1378  
  1379          This method makes a synchronous HTTP request by default. To make an
  1380          asynchronous HTTP request, please pass async_req=True
  1381  
  1382          >>> thread = api.list_user_external_principals_with_http_info(user_id, prefix, after, amount, async_req=True)
  1383          >>> result = thread.get()
  1384  
  1385          :param user_id: (required)
  1386          :type user_id: str
  1387          :param prefix: return items prefixed with this value
  1388          :type prefix: str
  1389          :param after: return items after this value
  1390          :type after: str
  1391          :param amount: how many items to return
  1392          :type amount: int
  1393          :param async_req: Whether to execute the request asynchronously.
  1394          :type async_req: bool, optional
  1395          :param _preload_content: if False, the ApiResponse.data will
  1396                                   be set to none and raw_data will store the 
  1397                                   HTTP response body without reading/decoding.
  1398                                   Default is True.
  1399          :type _preload_content: bool, optional
  1400          :param _return_http_data_only: response data instead of ApiResponse
  1401                                         object with status code, headers, etc
  1402          :type _return_http_data_only: bool, optional
  1403          :param _request_timeout: timeout setting for this request. If one
  1404                                   number provided, it will be total request
  1405                                   timeout. It can also be a pair (tuple) of
  1406                                   (connection, read) timeouts.
  1407          :param _request_auth: set to override the auth_settings for an a single
  1408                                request; this effectively ignores the authentication
  1409                                in the spec for a single request.
  1410          :type _request_auth: dict, optional
  1411          :type _content_type: string, optional: force content-type for the request
  1412          :return: Returns the result object.
  1413                   If the method is called asynchronously,
  1414                   returns the request thread.
  1415          :rtype: tuple(ExternalPrincipalList, status_code(int), headers(HTTPHeaderDict))
  1416          """
  1417  
  1418          _params = locals()
  1419  
  1420          _all_params = [
  1421              'user_id',
  1422              'prefix',
  1423              'after',
  1424              'amount'
  1425          ]
  1426          _all_params.extend(
  1427              [
  1428                  'async_req',
  1429                  '_return_http_data_only',
  1430                  '_preload_content',
  1431                  '_request_timeout',
  1432                  '_request_auth',
  1433                  '_content_type',
  1434                  '_headers'
  1435              ]
  1436          )
  1437  
  1438          # validate the arguments
  1439          for _key, _val in _params['kwargs'].items():
  1440              if _key not in _all_params:
  1441                  raise ApiTypeError(
  1442                      "Got an unexpected keyword argument '%s'"
  1443                      " to method list_user_external_principals" % _key
  1444                  )
  1445              _params[_key] = _val
  1446          del _params['kwargs']
  1447  
  1448          _collection_formats = {}
  1449  
  1450          # process the path parameters
  1451          _path_params = {}
  1452          if _params['user_id']:
  1453              _path_params['userId'] = _params['user_id']
  1454  
  1455  
  1456          # process the query parameters
  1457          _query_params = []
  1458          if _params.get('prefix') is not None:  # noqa: E501
  1459              _query_params.append(('prefix', _params['prefix']))
  1460  
  1461          if _params.get('after') is not None:  # noqa: E501
  1462              _query_params.append(('after', _params['after']))
  1463  
  1464          if _params.get('amount') is not None:  # noqa: E501
  1465              _query_params.append(('amount', _params['amount']))
  1466  
  1467          # process the header parameters
  1468          _header_params = dict(_params.get('_headers', {}))
  1469          # process the form parameters
  1470          _form_params = []
  1471          _files = {}
  1472          # process the body parameter
  1473          _body_params = None
  1474          # set the HTTP header `Accept`
  1475          _header_params['Accept'] = self.api_client.select_header_accept(
  1476              ['application/json'])  # noqa: E501
  1477  
  1478          # authentication setting
  1479          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  1480  
  1481          _response_types_map = {
  1482              '200': "ExternalPrincipalList",
  1483              '401': "Error",
  1484              '404': "Error",
  1485              '420': None,
  1486          }
  1487  
  1488          return self.api_client.call_api(
  1489              '/auth/users/{userId}/external/principals/ls', 'GET',
  1490              _path_params,
  1491              _query_params,
  1492              _header_params,
  1493              body=_body_params,
  1494              post_params=_form_params,
  1495              files=_files,
  1496              response_types_map=_response_types_map,
  1497              auth_settings=_auth_settings,
  1498              async_req=_params.get('async_req'),
  1499              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1500              _preload_content=_params.get('_preload_content', True),
  1501              _request_timeout=_params.get('_request_timeout'),
  1502              collection_formats=_collection_formats,
  1503              _request_auth=_params.get('_request_auth'))
  1504  
  1505      @validate_arguments
  1506      def sts_login(self, sts_auth_request : StsAuthRequest, **kwargs) -> AuthenticationToken:  # noqa: E501
  1507          """perform a login with STS  # noqa: E501
  1508  
  1509          This method makes a synchronous HTTP request by default. To make an
  1510          asynchronous HTTP request, please pass async_req=True
  1511  
  1512          >>> thread = api.sts_login(sts_auth_request, async_req=True)
  1513          >>> result = thread.get()
  1514  
  1515          :param sts_auth_request: (required)
  1516          :type sts_auth_request: StsAuthRequest
  1517          :param async_req: Whether to execute the request asynchronously.
  1518          :type async_req: bool, optional
  1519          :param _request_timeout: timeout setting for this request. If one
  1520                                   number provided, it will be total request
  1521                                   timeout. It can also be a pair (tuple) of
  1522                                   (connection, read) timeouts.
  1523          :return: Returns the result object.
  1524                   If the method is called asynchronously,
  1525                   returns the request thread.
  1526          :rtype: AuthenticationToken
  1527          """
  1528          kwargs['_return_http_data_only'] = True
  1529          if '_preload_content' in kwargs:
  1530              raise ValueError("Error! Please call the sts_login_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1531          return self.sts_login_with_http_info(sts_auth_request, **kwargs)  # noqa: E501
  1532  
  1533      @validate_arguments
  1534      def sts_login_with_http_info(self, sts_auth_request : StsAuthRequest, **kwargs) -> ApiResponse:  # noqa: E501
  1535          """perform a login with STS  # noqa: E501
  1536  
  1537          This method makes a synchronous HTTP request by default. To make an
  1538          asynchronous HTTP request, please pass async_req=True
  1539  
  1540          >>> thread = api.sts_login_with_http_info(sts_auth_request, async_req=True)
  1541          >>> result = thread.get()
  1542  
  1543          :param sts_auth_request: (required)
  1544          :type sts_auth_request: StsAuthRequest
  1545          :param async_req: Whether to execute the request asynchronously.
  1546          :type async_req: bool, optional
  1547          :param _preload_content: if False, the ApiResponse.data will
  1548                                   be set to none and raw_data will store the 
  1549                                   HTTP response body without reading/decoding.
  1550                                   Default is True.
  1551          :type _preload_content: bool, optional
  1552          :param _return_http_data_only: response data instead of ApiResponse
  1553                                         object with status code, headers, etc
  1554          :type _return_http_data_only: bool, optional
  1555          :param _request_timeout: timeout setting for this request. If one
  1556                                   number provided, it will be total request
  1557                                   timeout. It can also be a pair (tuple) of
  1558                                   (connection, read) timeouts.
  1559          :param _request_auth: set to override the auth_settings for an a single
  1560                                request; this effectively ignores the authentication
  1561                                in the spec for a single request.
  1562          :type _request_auth: dict, optional
  1563          :type _content_type: string, optional: force content-type for the request
  1564          :return: Returns the result object.
  1565                   If the method is called asynchronously,
  1566                   returns the request thread.
  1567          :rtype: tuple(AuthenticationToken, status_code(int), headers(HTTPHeaderDict))
  1568          """
  1569  
  1570          _params = locals()
  1571  
  1572          _all_params = [
  1573              'sts_auth_request'
  1574          ]
  1575          _all_params.extend(
  1576              [
  1577                  'async_req',
  1578                  '_return_http_data_only',
  1579                  '_preload_content',
  1580                  '_request_timeout',
  1581                  '_request_auth',
  1582                  '_content_type',
  1583                  '_headers'
  1584              ]
  1585          )
  1586  
  1587          # validate the arguments
  1588          for _key, _val in _params['kwargs'].items():
  1589              if _key not in _all_params:
  1590                  raise ApiTypeError(
  1591                      "Got an unexpected keyword argument '%s'"
  1592                      " to method sts_login" % _key
  1593                  )
  1594              _params[_key] = _val
  1595          del _params['kwargs']
  1596  
  1597          _collection_formats = {}
  1598  
  1599          # process the path parameters
  1600          _path_params = {}
  1601  
  1602          # process the query parameters
  1603          _query_params = []
  1604          # process the header parameters
  1605          _header_params = dict(_params.get('_headers', {}))
  1606          # process the form parameters
  1607          _form_params = []
  1608          _files = {}
  1609          # process the body parameter
  1610          _body_params = None
  1611          if _params['sts_auth_request'] is not None:
  1612              _body_params = _params['sts_auth_request']
  1613  
  1614          # set the HTTP header `Accept`
  1615          _header_params['Accept'] = self.api_client.select_header_accept(
  1616              ['application/json'])  # noqa: E501
  1617  
  1618          # set the HTTP header `Content-Type`
  1619          _content_types_list = _params.get('_content_type',
  1620              self.api_client.select_header_content_type(
  1621                  ['application/json']))
  1622          if _content_types_list:
  1623                  _header_params['Content-Type'] = _content_types_list
  1624  
  1625          # authentication setting
  1626          _auth_settings = []  # noqa: E501
  1627  
  1628          _response_types_map = {
  1629              '200': "AuthenticationToken",
  1630              '401': "Error",
  1631              '420': None,
  1632          }
  1633  
  1634          return self.api_client.call_api(
  1635              '/sts/login', 'POST',
  1636              _path_params,
  1637              _query_params,
  1638              _header_params,
  1639              body=_body_params,
  1640              post_params=_form_params,
  1641              files=_files,
  1642              response_types_map=_response_types_map,
  1643              auth_settings=_auth_settings,
  1644              async_req=_params.get('async_req'),
  1645              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1646              _preload_content=_params.get('_preload_content', True),
  1647              _request_timeout=_params.get('_request_timeout'),
  1648              collection_formats=_collection_formats,
  1649              _request_auth=_params.get('_request_auth'))