github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python/lakefs_sdk/api/repositories_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, StrictStr, conint, conlist
    28  except ImportError:
    29      from pydantic import Field, StrictBool, StrictStr, conint, conlist
    30  
    31  from typing import Dict, List, Optional
    32  
    33  from lakefs_sdk.models.branch_protection_rule import BranchProtectionRule
    34  from lakefs_sdk.models.garbage_collection_rules import GarbageCollectionRules
    35  from lakefs_sdk.models.refs_restore import RefsRestore
    36  from lakefs_sdk.models.repository import Repository
    37  from lakefs_sdk.models.repository_creation import RepositoryCreation
    38  from lakefs_sdk.models.repository_dump_status import RepositoryDumpStatus
    39  from lakefs_sdk.models.repository_list import RepositoryList
    40  from lakefs_sdk.models.repository_restore_status import RepositoryRestoreStatus
    41  from lakefs_sdk.models.task_info import TaskInfo
    42  
    43  from lakefs_sdk.api_client import ApiClient
    44  from lakefs_sdk.api_response import ApiResponse
    45  from lakefs_sdk.exceptions import (  # noqa: F401
    46      ApiTypeError,
    47      ApiValueError
    48  )
    49  
    50  
    51  class RepositoriesApi(object):
    52      """NOTE: This class is auto generated by OpenAPI Generator
    53      Ref: https://openapi-generator.tech
    54  
    55      Do not edit the class manually.
    56      """
    57  
    58      def __init__(self, api_client=None):
    59          if api_client is None:
    60              api_client = ApiClient.get_default()
    61          self.api_client = api_client
    62  
    63      @validate_arguments
    64      def create_repository(self, repository_creation : RepositoryCreation, bare : Annotated[Optional[StrictBool], Field(description="If true, create a bare repository with no initial commit and branch")] = None, **kwargs) -> Repository:  # noqa: E501
    65          """create repository  # noqa: E501
    66  
    67          This method makes a synchronous HTTP request by default. To make an
    68          asynchronous HTTP request, please pass async_req=True
    69  
    70          >>> thread = api.create_repository(repository_creation, bare, async_req=True)
    71          >>> result = thread.get()
    72  
    73          :param repository_creation: (required)
    74          :type repository_creation: RepositoryCreation
    75          :param bare: If true, create a bare repository with no initial commit and branch
    76          :type bare: bool
    77          :param async_req: Whether to execute the request asynchronously.
    78          :type async_req: bool, optional
    79          :param _request_timeout: timeout setting for this request. If one
    80                                   number provided, it will be total request
    81                                   timeout. It can also be a pair (tuple) of
    82                                   (connection, read) timeouts.
    83          :return: Returns the result object.
    84                   If the method is called asynchronously,
    85                   returns the request thread.
    86          :rtype: Repository
    87          """
    88          kwargs['_return_http_data_only'] = True
    89          if '_preload_content' in kwargs:
    90              raise ValueError("Error! Please call the create_repository_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
    91          return self.create_repository_with_http_info(repository_creation, bare, **kwargs)  # noqa: E501
    92  
    93      @validate_arguments
    94      def create_repository_with_http_info(self, repository_creation : RepositoryCreation, bare : Annotated[Optional[StrictBool], Field(description="If true, create a bare repository with no initial commit and branch")] = None, **kwargs) -> ApiResponse:  # noqa: E501
    95          """create repository  # noqa: E501
    96  
    97          This method makes a synchronous HTTP request by default. To make an
    98          asynchronous HTTP request, please pass async_req=True
    99  
   100          >>> thread = api.create_repository_with_http_info(repository_creation, bare, async_req=True)
   101          >>> result = thread.get()
   102  
   103          :param repository_creation: (required)
   104          :type repository_creation: RepositoryCreation
   105          :param bare: If true, create a bare repository with no initial commit and branch
   106          :type bare: bool
   107          :param async_req: Whether to execute the request asynchronously.
   108          :type async_req: bool, optional
   109          :param _preload_content: if False, the ApiResponse.data will
   110                                   be set to none and raw_data will store the 
   111                                   HTTP response body without reading/decoding.
   112                                   Default is True.
   113          :type _preload_content: bool, optional
   114          :param _return_http_data_only: response data instead of ApiResponse
   115                                         object with status code, headers, etc
   116          :type _return_http_data_only: bool, optional
   117          :param _request_timeout: timeout setting for this request. If one
   118                                   number provided, it will be total request
   119                                   timeout. It can also be a pair (tuple) of
   120                                   (connection, read) timeouts.
   121          :param _request_auth: set to override the auth_settings for an a single
   122                                request; this effectively ignores the authentication
   123                                in the spec for a single request.
   124          :type _request_auth: dict, optional
   125          :type _content_type: string, optional: force content-type for the request
   126          :return: Returns the result object.
   127                   If the method is called asynchronously,
   128                   returns the request thread.
   129          :rtype: tuple(Repository, status_code(int), headers(HTTPHeaderDict))
   130          """
   131  
   132          _params = locals()
   133  
   134          _all_params = [
   135              'repository_creation',
   136              'bare'
   137          ]
   138          _all_params.extend(
   139              [
   140                  'async_req',
   141                  '_return_http_data_only',
   142                  '_preload_content',
   143                  '_request_timeout',
   144                  '_request_auth',
   145                  '_content_type',
   146                  '_headers'
   147              ]
   148          )
   149  
   150          # validate the arguments
   151          for _key, _val in _params['kwargs'].items():
   152              if _key not in _all_params:
   153                  raise ApiTypeError(
   154                      "Got an unexpected keyword argument '%s'"
   155                      " to method create_repository" % _key
   156                  )
   157              _params[_key] = _val
   158          del _params['kwargs']
   159  
   160          _collection_formats = {}
   161  
   162          # process the path parameters
   163          _path_params = {}
   164  
   165          # process the query parameters
   166          _query_params = []
   167          if _params.get('bare') is not None:  # noqa: E501
   168              _query_params.append(('bare', _params['bare']))
   169  
   170          # process the header parameters
   171          _header_params = dict(_params.get('_headers', {}))
   172          # process the form parameters
   173          _form_params = []
   174          _files = {}
   175          # process the body parameter
   176          _body_params = None
   177          if _params['repository_creation'] is not None:
   178              _body_params = _params['repository_creation']
   179  
   180          # set the HTTP header `Accept`
   181          _header_params['Accept'] = self.api_client.select_header_accept(
   182              ['application/json'])  # noqa: E501
   183  
   184          # set the HTTP header `Content-Type`
   185          _content_types_list = _params.get('_content_type',
   186              self.api_client.select_header_content_type(
   187                  ['application/json']))
   188          if _content_types_list:
   189                  _header_params['Content-Type'] = _content_types_list
   190  
   191          # authentication setting
   192          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   193  
   194          _response_types_map = {
   195              '201': "Repository",
   196              '400': "Error",
   197              '401': "Error",
   198              '409': "Error",
   199              '420': None,
   200          }
   201  
   202          return self.api_client.call_api(
   203              '/repositories', 'POST',
   204              _path_params,
   205              _query_params,
   206              _header_params,
   207              body=_body_params,
   208              post_params=_form_params,
   209              files=_files,
   210              response_types_map=_response_types_map,
   211              auth_settings=_auth_settings,
   212              async_req=_params.get('async_req'),
   213              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   214              _preload_content=_params.get('_preload_content', True),
   215              _request_timeout=_params.get('_request_timeout'),
   216              collection_formats=_collection_formats,
   217              _request_auth=_params.get('_request_auth'))
   218  
   219      @validate_arguments
   220      def delete_gc_rules(self, repository : StrictStr, **kwargs) -> None:  # noqa: E501
   221          """delete_gc_rules  # noqa: E501
   222  
   223          This method makes a synchronous HTTP request by default. To make an
   224          asynchronous HTTP request, please pass async_req=True
   225  
   226          >>> thread = api.delete_gc_rules(repository, async_req=True)
   227          >>> result = thread.get()
   228  
   229          :param repository: (required)
   230          :type repository: str
   231          :param async_req: Whether to execute the request asynchronously.
   232          :type async_req: bool, optional
   233          :param _request_timeout: timeout setting for this request. If one
   234                                   number provided, it will be total request
   235                                   timeout. It can also be a pair (tuple) of
   236                                   (connection, read) timeouts.
   237          :return: Returns the result object.
   238                   If the method is called asynchronously,
   239                   returns the request thread.
   240          :rtype: None
   241          """
   242          kwargs['_return_http_data_only'] = True
   243          if '_preload_content' in kwargs:
   244              raise ValueError("Error! Please call the delete_gc_rules_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   245          return self.delete_gc_rules_with_http_info(repository, **kwargs)  # noqa: E501
   246  
   247      @validate_arguments
   248      def delete_gc_rules_with_http_info(self, repository : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
   249          """delete_gc_rules  # noqa: E501
   250  
   251          This method makes a synchronous HTTP request by default. To make an
   252          asynchronous HTTP request, please pass async_req=True
   253  
   254          >>> thread = api.delete_gc_rules_with_http_info(repository, async_req=True)
   255          >>> result = thread.get()
   256  
   257          :param repository: (required)
   258          :type repository: str
   259          :param async_req: Whether to execute the request asynchronously.
   260          :type async_req: bool, optional
   261          :param _preload_content: if False, the ApiResponse.data will
   262                                   be set to none and raw_data will store the 
   263                                   HTTP response body without reading/decoding.
   264                                   Default is True.
   265          :type _preload_content: bool, optional
   266          :param _return_http_data_only: response data instead of ApiResponse
   267                                         object with status code, headers, etc
   268          :type _return_http_data_only: bool, optional
   269          :param _request_timeout: timeout setting for this request. If one
   270                                   number provided, it will be total request
   271                                   timeout. It can also be a pair (tuple) of
   272                                   (connection, read) timeouts.
   273          :param _request_auth: set to override the auth_settings for an a single
   274                                request; this effectively ignores the authentication
   275                                in the spec for a single request.
   276          :type _request_auth: dict, optional
   277          :type _content_type: string, optional: force content-type for the request
   278          :return: Returns the result object.
   279                   If the method is called asynchronously,
   280                   returns the request thread.
   281          :rtype: None
   282          """
   283  
   284          _params = locals()
   285  
   286          _all_params = [
   287              'repository'
   288          ]
   289          _all_params.extend(
   290              [
   291                  'async_req',
   292                  '_return_http_data_only',
   293                  '_preload_content',
   294                  '_request_timeout',
   295                  '_request_auth',
   296                  '_content_type',
   297                  '_headers'
   298              ]
   299          )
   300  
   301          # validate the arguments
   302          for _key, _val in _params['kwargs'].items():
   303              if _key not in _all_params:
   304                  raise ApiTypeError(
   305                      "Got an unexpected keyword argument '%s'"
   306                      " to method delete_gc_rules" % _key
   307                  )
   308              _params[_key] = _val
   309          del _params['kwargs']
   310  
   311          _collection_formats = {}
   312  
   313          # process the path parameters
   314          _path_params = {}
   315          if _params['repository']:
   316              _path_params['repository'] = _params['repository']
   317  
   318  
   319          # process the query parameters
   320          _query_params = []
   321          # process the header parameters
   322          _header_params = dict(_params.get('_headers', {}))
   323          # process the form parameters
   324          _form_params = []
   325          _files = {}
   326          # process the body parameter
   327          _body_params = None
   328          # set the HTTP header `Accept`
   329          _header_params['Accept'] = self.api_client.select_header_accept(
   330              ['application/json'])  # noqa: E501
   331  
   332          # authentication setting
   333          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   334  
   335          _response_types_map = {}
   336  
   337          return self.api_client.call_api(
   338              '/repositories/{repository}/settings/gc_rules', 'DELETE',
   339              _path_params,
   340              _query_params,
   341              _header_params,
   342              body=_body_params,
   343              post_params=_form_params,
   344              files=_files,
   345              response_types_map=_response_types_map,
   346              auth_settings=_auth_settings,
   347              async_req=_params.get('async_req'),
   348              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   349              _preload_content=_params.get('_preload_content', True),
   350              _request_timeout=_params.get('_request_timeout'),
   351              collection_formats=_collection_formats,
   352              _request_auth=_params.get('_request_auth'))
   353  
   354      @validate_arguments
   355      def delete_repository(self, repository : StrictStr, force : Annotated[Optional[StrictBool], Field(description="Bypass read-only protection and delete the repository")] = None, **kwargs) -> None:  # noqa: E501
   356          """delete repository  # noqa: E501
   357  
   358          This method makes a synchronous HTTP request by default. To make an
   359          asynchronous HTTP request, please pass async_req=True
   360  
   361          >>> thread = api.delete_repository(repository, force, async_req=True)
   362          >>> result = thread.get()
   363  
   364          :param repository: (required)
   365          :type repository: str
   366          :param force: Bypass read-only protection and delete the repository
   367          :type force: bool
   368          :param async_req: Whether to execute the request asynchronously.
   369          :type async_req: bool, optional
   370          :param _request_timeout: timeout setting for this request. If one
   371                                   number provided, it will be total request
   372                                   timeout. It can also be a pair (tuple) of
   373                                   (connection, read) timeouts.
   374          :return: Returns the result object.
   375                   If the method is called asynchronously,
   376                   returns the request thread.
   377          :rtype: None
   378          """
   379          kwargs['_return_http_data_only'] = True
   380          if '_preload_content' in kwargs:
   381              raise ValueError("Error! Please call the delete_repository_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   382          return self.delete_repository_with_http_info(repository, force, **kwargs)  # noqa: E501
   383  
   384      @validate_arguments
   385      def delete_repository_with_http_info(self, repository : StrictStr, force : Annotated[Optional[StrictBool], Field(description="Bypass read-only protection and delete the repository")] = None, **kwargs) -> ApiResponse:  # noqa: E501
   386          """delete repository  # noqa: E501
   387  
   388          This method makes a synchronous HTTP request by default. To make an
   389          asynchronous HTTP request, please pass async_req=True
   390  
   391          >>> thread = api.delete_repository_with_http_info(repository, force, async_req=True)
   392          >>> result = thread.get()
   393  
   394          :param repository: (required)
   395          :type repository: str
   396          :param force: Bypass read-only protection and delete the repository
   397          :type force: bool
   398          :param async_req: Whether to execute the request asynchronously.
   399          :type async_req: bool, optional
   400          :param _preload_content: if False, the ApiResponse.data will
   401                                   be set to none and raw_data will store the 
   402                                   HTTP response body without reading/decoding.
   403                                   Default is True.
   404          :type _preload_content: bool, optional
   405          :param _return_http_data_only: response data instead of ApiResponse
   406                                         object with status code, headers, etc
   407          :type _return_http_data_only: bool, optional
   408          :param _request_timeout: timeout setting for this request. If one
   409                                   number provided, it will be total request
   410                                   timeout. It can also be a pair (tuple) of
   411                                   (connection, read) timeouts.
   412          :param _request_auth: set to override the auth_settings for an a single
   413                                request; this effectively ignores the authentication
   414                                in the spec for a single request.
   415          :type _request_auth: dict, optional
   416          :type _content_type: string, optional: force content-type for the request
   417          :return: Returns the result object.
   418                   If the method is called asynchronously,
   419                   returns the request thread.
   420          :rtype: None
   421          """
   422  
   423          _params = locals()
   424  
   425          _all_params = [
   426              'repository',
   427              'force'
   428          ]
   429          _all_params.extend(
   430              [
   431                  'async_req',
   432                  '_return_http_data_only',
   433                  '_preload_content',
   434                  '_request_timeout',
   435                  '_request_auth',
   436                  '_content_type',
   437                  '_headers'
   438              ]
   439          )
   440  
   441          # validate the arguments
   442          for _key, _val in _params['kwargs'].items():
   443              if _key not in _all_params:
   444                  raise ApiTypeError(
   445                      "Got an unexpected keyword argument '%s'"
   446                      " to method delete_repository" % _key
   447                  )
   448              _params[_key] = _val
   449          del _params['kwargs']
   450  
   451          _collection_formats = {}
   452  
   453          # process the path parameters
   454          _path_params = {}
   455          if _params['repository']:
   456              _path_params['repository'] = _params['repository']
   457  
   458  
   459          # process the query parameters
   460          _query_params = []
   461          if _params.get('force') is not None:  # noqa: E501
   462              _query_params.append(('force', _params['force']))
   463  
   464          # process the header parameters
   465          _header_params = dict(_params.get('_headers', {}))
   466          # process the form parameters
   467          _form_params = []
   468          _files = {}
   469          # process the body parameter
   470          _body_params = None
   471          # set the HTTP header `Accept`
   472          _header_params['Accept'] = self.api_client.select_header_accept(
   473              ['application/json'])  # noqa: E501
   474  
   475          # authentication setting
   476          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   477  
   478          _response_types_map = {}
   479  
   480          return self.api_client.call_api(
   481              '/repositories/{repository}', 'DELETE',
   482              _path_params,
   483              _query_params,
   484              _header_params,
   485              body=_body_params,
   486              post_params=_form_params,
   487              files=_files,
   488              response_types_map=_response_types_map,
   489              auth_settings=_auth_settings,
   490              async_req=_params.get('async_req'),
   491              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   492              _preload_content=_params.get('_preload_content', True),
   493              _request_timeout=_params.get('_request_timeout'),
   494              collection_formats=_collection_formats,
   495              _request_auth=_params.get('_request_auth'))
   496  
   497      @validate_arguments
   498      def dump_status(self, repository : StrictStr, task_id : StrictStr, **kwargs) -> RepositoryDumpStatus:  # noqa: E501
   499          """Status of a repository dump task  # noqa: E501
   500  
   501          This method makes a synchronous HTTP request by default. To make an
   502          asynchronous HTTP request, please pass async_req=True
   503  
   504          >>> thread = api.dump_status(repository, task_id, async_req=True)
   505          >>> result = thread.get()
   506  
   507          :param repository: (required)
   508          :type repository: str
   509          :param task_id: (required)
   510          :type task_id: str
   511          :param async_req: Whether to execute the request asynchronously.
   512          :type async_req: bool, optional
   513          :param _request_timeout: timeout setting for this request. If one
   514                                   number provided, it will be total request
   515                                   timeout. It can also be a pair (tuple) of
   516                                   (connection, read) timeouts.
   517          :return: Returns the result object.
   518                   If the method is called asynchronously,
   519                   returns the request thread.
   520          :rtype: RepositoryDumpStatus
   521          """
   522          kwargs['_return_http_data_only'] = True
   523          if '_preload_content' in kwargs:
   524              raise ValueError("Error! Please call the dump_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   525          return self.dump_status_with_http_info(repository, task_id, **kwargs)  # noqa: E501
   526  
   527      @validate_arguments
   528      def dump_status_with_http_info(self, repository : StrictStr, task_id : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
   529          """Status of a repository dump task  # noqa: E501
   530  
   531          This method makes a synchronous HTTP request by default. To make an
   532          asynchronous HTTP request, please pass async_req=True
   533  
   534          >>> thread = api.dump_status_with_http_info(repository, task_id, async_req=True)
   535          >>> result = thread.get()
   536  
   537          :param repository: (required)
   538          :type repository: str
   539          :param task_id: (required)
   540          :type task_id: str
   541          :param async_req: Whether to execute the request asynchronously.
   542          :type async_req: bool, optional
   543          :param _preload_content: if False, the ApiResponse.data will
   544                                   be set to none and raw_data will store the 
   545                                   HTTP response body without reading/decoding.
   546                                   Default is True.
   547          :type _preload_content: bool, optional
   548          :param _return_http_data_only: response data instead of ApiResponse
   549                                         object with status code, headers, etc
   550          :type _return_http_data_only: bool, optional
   551          :param _request_timeout: timeout setting for this request. If one
   552                                   number provided, it will be total request
   553                                   timeout. It can also be a pair (tuple) of
   554                                   (connection, read) timeouts.
   555          :param _request_auth: set to override the auth_settings for an a single
   556                                request; this effectively ignores the authentication
   557                                in the spec for a single request.
   558          :type _request_auth: dict, optional
   559          :type _content_type: string, optional: force content-type for the request
   560          :return: Returns the result object.
   561                   If the method is called asynchronously,
   562                   returns the request thread.
   563          :rtype: tuple(RepositoryDumpStatus, status_code(int), headers(HTTPHeaderDict))
   564          """
   565  
   566          _params = locals()
   567  
   568          _all_params = [
   569              'repository',
   570              'task_id'
   571          ]
   572          _all_params.extend(
   573              [
   574                  'async_req',
   575                  '_return_http_data_only',
   576                  '_preload_content',
   577                  '_request_timeout',
   578                  '_request_auth',
   579                  '_content_type',
   580                  '_headers'
   581              ]
   582          )
   583  
   584          # validate the arguments
   585          for _key, _val in _params['kwargs'].items():
   586              if _key not in _all_params:
   587                  raise ApiTypeError(
   588                      "Got an unexpected keyword argument '%s'"
   589                      " to method dump_status" % _key
   590                  )
   591              _params[_key] = _val
   592          del _params['kwargs']
   593  
   594          _collection_formats = {}
   595  
   596          # process the path parameters
   597          _path_params = {}
   598          if _params['repository']:
   599              _path_params['repository'] = _params['repository']
   600  
   601  
   602          # process the query parameters
   603          _query_params = []
   604          if _params.get('task_id') is not None:  # noqa: E501
   605              _query_params.append(('task_id', _params['task_id']))
   606  
   607          # process the header parameters
   608          _header_params = dict(_params.get('_headers', {}))
   609          # process the form parameters
   610          _form_params = []
   611          _files = {}
   612          # process the body parameter
   613          _body_params = None
   614          # set the HTTP header `Accept`
   615          _header_params['Accept'] = self.api_client.select_header_accept(
   616              ['application/json'])  # noqa: E501
   617  
   618          # authentication setting
   619          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   620  
   621          _response_types_map = {
   622              '200': "RepositoryDumpStatus",
   623              '400': "Error",
   624              '401': "Error",
   625              '404': "Error",
   626              '420': None,
   627          }
   628  
   629          return self.api_client.call_api(
   630              '/repositories/{repository}/dump', 'GET',
   631              _path_params,
   632              _query_params,
   633              _header_params,
   634              body=_body_params,
   635              post_params=_form_params,
   636              files=_files,
   637              response_types_map=_response_types_map,
   638              auth_settings=_auth_settings,
   639              async_req=_params.get('async_req'),
   640              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   641              _preload_content=_params.get('_preload_content', True),
   642              _request_timeout=_params.get('_request_timeout'),
   643              collection_formats=_collection_formats,
   644              _request_auth=_params.get('_request_auth'))
   645  
   646      @validate_arguments
   647      def dump_submit(self, repository : StrictStr, **kwargs) -> TaskInfo:  # noqa: E501
   648          """Backup the repository metadata (tags, commits, branches) and save the backup to the object store.  # noqa: E501
   649  
   650          This method makes a synchronous HTTP request by default. To make an
   651          asynchronous HTTP request, please pass async_req=True
   652  
   653          >>> thread = api.dump_submit(repository, async_req=True)
   654          >>> result = thread.get()
   655  
   656          :param repository: (required)
   657          :type repository: str
   658          :param async_req: Whether to execute the request asynchronously.
   659          :type async_req: bool, optional
   660          :param _request_timeout: timeout setting for this request. If one
   661                                   number provided, it will be total request
   662                                   timeout. It can also be a pair (tuple) of
   663                                   (connection, read) timeouts.
   664          :return: Returns the result object.
   665                   If the method is called asynchronously,
   666                   returns the request thread.
   667          :rtype: TaskInfo
   668          """
   669          kwargs['_return_http_data_only'] = True
   670          if '_preload_content' in kwargs:
   671              raise ValueError("Error! Please call the dump_submit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   672          return self.dump_submit_with_http_info(repository, **kwargs)  # noqa: E501
   673  
   674      @validate_arguments
   675      def dump_submit_with_http_info(self, repository : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
   676          """Backup the repository metadata (tags, commits, branches) and save the backup to the object store.  # noqa: E501
   677  
   678          This method makes a synchronous HTTP request by default. To make an
   679          asynchronous HTTP request, please pass async_req=True
   680  
   681          >>> thread = api.dump_submit_with_http_info(repository, async_req=True)
   682          >>> result = thread.get()
   683  
   684          :param repository: (required)
   685          :type repository: str
   686          :param async_req: Whether to execute the request asynchronously.
   687          :type async_req: bool, optional
   688          :param _preload_content: if False, the ApiResponse.data will
   689                                   be set to none and raw_data will store the 
   690                                   HTTP response body without reading/decoding.
   691                                   Default is True.
   692          :type _preload_content: bool, optional
   693          :param _return_http_data_only: response data instead of ApiResponse
   694                                         object with status code, headers, etc
   695          :type _return_http_data_only: bool, optional
   696          :param _request_timeout: timeout setting for this request. If one
   697                                   number provided, it will be total request
   698                                   timeout. It can also be a pair (tuple) of
   699                                   (connection, read) timeouts.
   700          :param _request_auth: set to override the auth_settings for an a single
   701                                request; this effectively ignores the authentication
   702                                in the spec for a single request.
   703          :type _request_auth: dict, optional
   704          :type _content_type: string, optional: force content-type for the request
   705          :return: Returns the result object.
   706                   If the method is called asynchronously,
   707                   returns the request thread.
   708          :rtype: tuple(TaskInfo, status_code(int), headers(HTTPHeaderDict))
   709          """
   710  
   711          _params = locals()
   712  
   713          _all_params = [
   714              'repository'
   715          ]
   716          _all_params.extend(
   717              [
   718                  'async_req',
   719                  '_return_http_data_only',
   720                  '_preload_content',
   721                  '_request_timeout',
   722                  '_request_auth',
   723                  '_content_type',
   724                  '_headers'
   725              ]
   726          )
   727  
   728          # validate the arguments
   729          for _key, _val in _params['kwargs'].items():
   730              if _key not in _all_params:
   731                  raise ApiTypeError(
   732                      "Got an unexpected keyword argument '%s'"
   733                      " to method dump_submit" % _key
   734                  )
   735              _params[_key] = _val
   736          del _params['kwargs']
   737  
   738          _collection_formats = {}
   739  
   740          # process the path parameters
   741          _path_params = {}
   742          if _params['repository']:
   743              _path_params['repository'] = _params['repository']
   744  
   745  
   746          # process the query parameters
   747          _query_params = []
   748          # process the header parameters
   749          _header_params = dict(_params.get('_headers', {}))
   750          # process the form parameters
   751          _form_params = []
   752          _files = {}
   753          # process the body parameter
   754          _body_params = None
   755          # set the HTTP header `Accept`
   756          _header_params['Accept'] = self.api_client.select_header_accept(
   757              ['application/json'])  # noqa: E501
   758  
   759          # authentication setting
   760          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   761  
   762          _response_types_map = {
   763              '202': "TaskInfo",
   764              '400': "Error",
   765              '401': "Error",
   766              '404': "Error",
   767          }
   768  
   769          return self.api_client.call_api(
   770              '/repositories/{repository}/dump', 'POST',
   771              _path_params,
   772              _query_params,
   773              _header_params,
   774              body=_body_params,
   775              post_params=_form_params,
   776              files=_files,
   777              response_types_map=_response_types_map,
   778              auth_settings=_auth_settings,
   779              async_req=_params.get('async_req'),
   780              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   781              _preload_content=_params.get('_preload_content', True),
   782              _request_timeout=_params.get('_request_timeout'),
   783              collection_formats=_collection_formats,
   784              _request_auth=_params.get('_request_auth'))
   785  
   786      @validate_arguments
   787      def get_branch_protection_rules(self, repository : StrictStr, **kwargs) -> List[BranchProtectionRule]:  # noqa: E501
   788          """get branch protection rules  # noqa: E501
   789  
   790          This method makes a synchronous HTTP request by default. To make an
   791          asynchronous HTTP request, please pass async_req=True
   792  
   793          >>> thread = api.get_branch_protection_rules(repository, async_req=True)
   794          >>> result = thread.get()
   795  
   796          :param repository: (required)
   797          :type repository: str
   798          :param async_req: Whether to execute the request asynchronously.
   799          :type async_req: bool, optional
   800          :param _request_timeout: timeout setting for this request. If one
   801                                   number provided, it will be total request
   802                                   timeout. It can also be a pair (tuple) of
   803                                   (connection, read) timeouts.
   804          :return: Returns the result object.
   805                   If the method is called asynchronously,
   806                   returns the request thread.
   807          :rtype: List[BranchProtectionRule]
   808          """
   809          kwargs['_return_http_data_only'] = True
   810          if '_preload_content' in kwargs:
   811              raise ValueError("Error! Please call the get_branch_protection_rules_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   812          return self.get_branch_protection_rules_with_http_info(repository, **kwargs)  # noqa: E501
   813  
   814      @validate_arguments
   815      def get_branch_protection_rules_with_http_info(self, repository : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
   816          """get branch protection rules  # noqa: E501
   817  
   818          This method makes a synchronous HTTP request by default. To make an
   819          asynchronous HTTP request, please pass async_req=True
   820  
   821          >>> thread = api.get_branch_protection_rules_with_http_info(repository, async_req=True)
   822          >>> result = thread.get()
   823  
   824          :param repository: (required)
   825          :type repository: str
   826          :param async_req: Whether to execute the request asynchronously.
   827          :type async_req: bool, optional
   828          :param _preload_content: if False, the ApiResponse.data will
   829                                   be set to none and raw_data will store the 
   830                                   HTTP response body without reading/decoding.
   831                                   Default is True.
   832          :type _preload_content: bool, optional
   833          :param _return_http_data_only: response data instead of ApiResponse
   834                                         object with status code, headers, etc
   835          :type _return_http_data_only: bool, optional
   836          :param _request_timeout: timeout setting for this request. If one
   837                                   number provided, it will be total request
   838                                   timeout. It can also be a pair (tuple) of
   839                                   (connection, read) timeouts.
   840          :param _request_auth: set to override the auth_settings for an a single
   841                                request; this effectively ignores the authentication
   842                                in the spec for a single request.
   843          :type _request_auth: dict, optional
   844          :type _content_type: string, optional: force content-type for the request
   845          :return: Returns the result object.
   846                   If the method is called asynchronously,
   847                   returns the request thread.
   848          :rtype: tuple(List[BranchProtectionRule], status_code(int), headers(HTTPHeaderDict))
   849          """
   850  
   851          _params = locals()
   852  
   853          _all_params = [
   854              'repository'
   855          ]
   856          _all_params.extend(
   857              [
   858                  'async_req',
   859                  '_return_http_data_only',
   860                  '_preload_content',
   861                  '_request_timeout',
   862                  '_request_auth',
   863                  '_content_type',
   864                  '_headers'
   865              ]
   866          )
   867  
   868          # validate the arguments
   869          for _key, _val in _params['kwargs'].items():
   870              if _key not in _all_params:
   871                  raise ApiTypeError(
   872                      "Got an unexpected keyword argument '%s'"
   873                      " to method get_branch_protection_rules" % _key
   874                  )
   875              _params[_key] = _val
   876          del _params['kwargs']
   877  
   878          _collection_formats = {}
   879  
   880          # process the path parameters
   881          _path_params = {}
   882          if _params['repository']:
   883              _path_params['repository'] = _params['repository']
   884  
   885  
   886          # process the query parameters
   887          _query_params = []
   888          # process the header parameters
   889          _header_params = dict(_params.get('_headers', {}))
   890          # process the form parameters
   891          _form_params = []
   892          _files = {}
   893          # process the body parameter
   894          _body_params = None
   895          # set the HTTP header `Accept`
   896          _header_params['Accept'] = self.api_client.select_header_accept(
   897              ['application/json'])  # noqa: E501
   898  
   899          # authentication setting
   900          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
   901  
   902          _response_types_map = {
   903              '200': "List[BranchProtectionRule]",
   904              '401': "Error",
   905              '404': "Error",
   906              '420': None,
   907          }
   908  
   909          return self.api_client.call_api(
   910              '/repositories/{repository}/settings/branch_protection', 'GET',
   911              _path_params,
   912              _query_params,
   913              _header_params,
   914              body=_body_params,
   915              post_params=_form_params,
   916              files=_files,
   917              response_types_map=_response_types_map,
   918              auth_settings=_auth_settings,
   919              async_req=_params.get('async_req'),
   920              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
   921              _preload_content=_params.get('_preload_content', True),
   922              _request_timeout=_params.get('_request_timeout'),
   923              collection_formats=_collection_formats,
   924              _request_auth=_params.get('_request_auth'))
   925  
   926      @validate_arguments
   927      def get_gc_rules(self, repository : StrictStr, **kwargs) -> GarbageCollectionRules:  # noqa: E501
   928          """get repository GC rules  # noqa: E501
   929  
   930          This method makes a synchronous HTTP request by default. To make an
   931          asynchronous HTTP request, please pass async_req=True
   932  
   933          >>> thread = api.get_gc_rules(repository, async_req=True)
   934          >>> result = thread.get()
   935  
   936          :param repository: (required)
   937          :type repository: str
   938          :param async_req: Whether to execute the request asynchronously.
   939          :type async_req: bool, optional
   940          :param _request_timeout: timeout setting for this request. If one
   941                                   number provided, it will be total request
   942                                   timeout. It can also be a pair (tuple) of
   943                                   (connection, read) timeouts.
   944          :return: Returns the result object.
   945                   If the method is called asynchronously,
   946                   returns the request thread.
   947          :rtype: GarbageCollectionRules
   948          """
   949          kwargs['_return_http_data_only'] = True
   950          if '_preload_content' in kwargs:
   951              raise ValueError("Error! Please call the get_gc_rules_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
   952          return self.get_gc_rules_with_http_info(repository, **kwargs)  # noqa: E501
   953  
   954      @validate_arguments
   955      def get_gc_rules_with_http_info(self, repository : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
   956          """get repository GC rules  # noqa: E501
   957  
   958          This method makes a synchronous HTTP request by default. To make an
   959          asynchronous HTTP request, please pass async_req=True
   960  
   961          >>> thread = api.get_gc_rules_with_http_info(repository, async_req=True)
   962          >>> result = thread.get()
   963  
   964          :param repository: (required)
   965          :type repository: str
   966          :param async_req: Whether to execute the request asynchronously.
   967          :type async_req: bool, optional
   968          :param _preload_content: if False, the ApiResponse.data will
   969                                   be set to none and raw_data will store the 
   970                                   HTTP response body without reading/decoding.
   971                                   Default is True.
   972          :type _preload_content: bool, optional
   973          :param _return_http_data_only: response data instead of ApiResponse
   974                                         object with status code, headers, etc
   975          :type _return_http_data_only: bool, optional
   976          :param _request_timeout: timeout setting for this request. If one
   977                                   number provided, it will be total request
   978                                   timeout. It can also be a pair (tuple) of
   979                                   (connection, read) timeouts.
   980          :param _request_auth: set to override the auth_settings for an a single
   981                                request; this effectively ignores the authentication
   982                                in the spec for a single request.
   983          :type _request_auth: dict, optional
   984          :type _content_type: string, optional: force content-type for the request
   985          :return: Returns the result object.
   986                   If the method is called asynchronously,
   987                   returns the request thread.
   988          :rtype: tuple(GarbageCollectionRules, status_code(int), headers(HTTPHeaderDict))
   989          """
   990  
   991          _params = locals()
   992  
   993          _all_params = [
   994              'repository'
   995          ]
   996          _all_params.extend(
   997              [
   998                  'async_req',
   999                  '_return_http_data_only',
  1000                  '_preload_content',
  1001                  '_request_timeout',
  1002                  '_request_auth',
  1003                  '_content_type',
  1004                  '_headers'
  1005              ]
  1006          )
  1007  
  1008          # validate the arguments
  1009          for _key, _val in _params['kwargs'].items():
  1010              if _key not in _all_params:
  1011                  raise ApiTypeError(
  1012                      "Got an unexpected keyword argument '%s'"
  1013                      " to method get_gc_rules" % _key
  1014                  )
  1015              _params[_key] = _val
  1016          del _params['kwargs']
  1017  
  1018          _collection_formats = {}
  1019  
  1020          # process the path parameters
  1021          _path_params = {}
  1022          if _params['repository']:
  1023              _path_params['repository'] = _params['repository']
  1024  
  1025  
  1026          # process the query parameters
  1027          _query_params = []
  1028          # process the header parameters
  1029          _header_params = dict(_params.get('_headers', {}))
  1030          # process the form parameters
  1031          _form_params = []
  1032          _files = {}
  1033          # process the body parameter
  1034          _body_params = None
  1035          # set the HTTP header `Accept`
  1036          _header_params['Accept'] = self.api_client.select_header_accept(
  1037              ['application/json'])  # noqa: E501
  1038  
  1039          # authentication setting
  1040          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  1041  
  1042          _response_types_map = {
  1043              '200': "GarbageCollectionRules",
  1044              '401': "Error",
  1045              '404': "Error",
  1046              '420': None,
  1047          }
  1048  
  1049          return self.api_client.call_api(
  1050              '/repositories/{repository}/settings/gc_rules', 'GET',
  1051              _path_params,
  1052              _query_params,
  1053              _header_params,
  1054              body=_body_params,
  1055              post_params=_form_params,
  1056              files=_files,
  1057              response_types_map=_response_types_map,
  1058              auth_settings=_auth_settings,
  1059              async_req=_params.get('async_req'),
  1060              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1061              _preload_content=_params.get('_preload_content', True),
  1062              _request_timeout=_params.get('_request_timeout'),
  1063              collection_formats=_collection_formats,
  1064              _request_auth=_params.get('_request_auth'))
  1065  
  1066      @validate_arguments
  1067      def get_repository(self, repository : StrictStr, **kwargs) -> Repository:  # noqa: E501
  1068          """get repository  # noqa: E501
  1069  
  1070          This method makes a synchronous HTTP request by default. To make an
  1071          asynchronous HTTP request, please pass async_req=True
  1072  
  1073          >>> thread = api.get_repository(repository, async_req=True)
  1074          >>> result = thread.get()
  1075  
  1076          :param repository: (required)
  1077          :type repository: str
  1078          :param async_req: Whether to execute the request asynchronously.
  1079          :type async_req: bool, optional
  1080          :param _request_timeout: timeout setting for this request. If one
  1081                                   number provided, it will be total request
  1082                                   timeout. It can also be a pair (tuple) of
  1083                                   (connection, read) timeouts.
  1084          :return: Returns the result object.
  1085                   If the method is called asynchronously,
  1086                   returns the request thread.
  1087          :rtype: Repository
  1088          """
  1089          kwargs['_return_http_data_only'] = True
  1090          if '_preload_content' in kwargs:
  1091              raise ValueError("Error! Please call the get_repository_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1092          return self.get_repository_with_http_info(repository, **kwargs)  # noqa: E501
  1093  
  1094      @validate_arguments
  1095      def get_repository_with_http_info(self, repository : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
  1096          """get repository  # noqa: E501
  1097  
  1098          This method makes a synchronous HTTP request by default. To make an
  1099          asynchronous HTTP request, please pass async_req=True
  1100  
  1101          >>> thread = api.get_repository_with_http_info(repository, async_req=True)
  1102          >>> result = thread.get()
  1103  
  1104          :param repository: (required)
  1105          :type repository: str
  1106          :param async_req: Whether to execute the request asynchronously.
  1107          :type async_req: bool, optional
  1108          :param _preload_content: if False, the ApiResponse.data will
  1109                                   be set to none and raw_data will store the 
  1110                                   HTTP response body without reading/decoding.
  1111                                   Default is True.
  1112          :type _preload_content: bool, optional
  1113          :param _return_http_data_only: response data instead of ApiResponse
  1114                                         object with status code, headers, etc
  1115          :type _return_http_data_only: bool, optional
  1116          :param _request_timeout: timeout setting for this request. If one
  1117                                   number provided, it will be total request
  1118                                   timeout. It can also be a pair (tuple) of
  1119                                   (connection, read) timeouts.
  1120          :param _request_auth: set to override the auth_settings for an a single
  1121                                request; this effectively ignores the authentication
  1122                                in the spec for a single request.
  1123          :type _request_auth: dict, optional
  1124          :type _content_type: string, optional: force content-type for the request
  1125          :return: Returns the result object.
  1126                   If the method is called asynchronously,
  1127                   returns the request thread.
  1128          :rtype: tuple(Repository, status_code(int), headers(HTTPHeaderDict))
  1129          """
  1130  
  1131          _params = locals()
  1132  
  1133          _all_params = [
  1134              'repository'
  1135          ]
  1136          _all_params.extend(
  1137              [
  1138                  'async_req',
  1139                  '_return_http_data_only',
  1140                  '_preload_content',
  1141                  '_request_timeout',
  1142                  '_request_auth',
  1143                  '_content_type',
  1144                  '_headers'
  1145              ]
  1146          )
  1147  
  1148          # validate the arguments
  1149          for _key, _val in _params['kwargs'].items():
  1150              if _key not in _all_params:
  1151                  raise ApiTypeError(
  1152                      "Got an unexpected keyword argument '%s'"
  1153                      " to method get_repository" % _key
  1154                  )
  1155              _params[_key] = _val
  1156          del _params['kwargs']
  1157  
  1158          _collection_formats = {}
  1159  
  1160          # process the path parameters
  1161          _path_params = {}
  1162          if _params['repository']:
  1163              _path_params['repository'] = _params['repository']
  1164  
  1165  
  1166          # process the query parameters
  1167          _query_params = []
  1168          # process the header parameters
  1169          _header_params = dict(_params.get('_headers', {}))
  1170          # process the form parameters
  1171          _form_params = []
  1172          _files = {}
  1173          # process the body parameter
  1174          _body_params = None
  1175          # set the HTTP header `Accept`
  1176          _header_params['Accept'] = self.api_client.select_header_accept(
  1177              ['application/json'])  # noqa: E501
  1178  
  1179          # authentication setting
  1180          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  1181  
  1182          _response_types_map = {
  1183              '200': "Repository",
  1184              '401': "Error",
  1185              '404': "Error",
  1186              '420': None,
  1187          }
  1188  
  1189          return self.api_client.call_api(
  1190              '/repositories/{repository}', 'GET',
  1191              _path_params,
  1192              _query_params,
  1193              _header_params,
  1194              body=_body_params,
  1195              post_params=_form_params,
  1196              files=_files,
  1197              response_types_map=_response_types_map,
  1198              auth_settings=_auth_settings,
  1199              async_req=_params.get('async_req'),
  1200              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1201              _preload_content=_params.get('_preload_content', True),
  1202              _request_timeout=_params.get('_request_timeout'),
  1203              collection_formats=_collection_formats,
  1204              _request_auth=_params.get('_request_auth'))
  1205  
  1206      @validate_arguments
  1207      def get_repository_metadata(self, repository : StrictStr, **kwargs) -> Dict[str, str]:  # noqa: E501
  1208          """get repository metadata  # noqa: E501
  1209  
  1210          This method makes a synchronous HTTP request by default. To make an
  1211          asynchronous HTTP request, please pass async_req=True
  1212  
  1213          >>> thread = api.get_repository_metadata(repository, async_req=True)
  1214          >>> result = thread.get()
  1215  
  1216          :param repository: (required)
  1217          :type repository: str
  1218          :param async_req: Whether to execute the request asynchronously.
  1219          :type async_req: bool, optional
  1220          :param _request_timeout: timeout setting for this request. If one
  1221                                   number provided, it will be total request
  1222                                   timeout. It can also be a pair (tuple) of
  1223                                   (connection, read) timeouts.
  1224          :return: Returns the result object.
  1225                   If the method is called asynchronously,
  1226                   returns the request thread.
  1227          :rtype: Dict[str, str]
  1228          """
  1229          kwargs['_return_http_data_only'] = True
  1230          if '_preload_content' in kwargs:
  1231              raise ValueError("Error! Please call the get_repository_metadata_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1232          return self.get_repository_metadata_with_http_info(repository, **kwargs)  # noqa: E501
  1233  
  1234      @validate_arguments
  1235      def get_repository_metadata_with_http_info(self, repository : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
  1236          """get repository metadata  # noqa: E501
  1237  
  1238          This method makes a synchronous HTTP request by default. To make an
  1239          asynchronous HTTP request, please pass async_req=True
  1240  
  1241          >>> thread = api.get_repository_metadata_with_http_info(repository, async_req=True)
  1242          >>> result = thread.get()
  1243  
  1244          :param repository: (required)
  1245          :type repository: str
  1246          :param async_req: Whether to execute the request asynchronously.
  1247          :type async_req: bool, optional
  1248          :param _preload_content: if False, the ApiResponse.data will
  1249                                   be set to none and raw_data will store the 
  1250                                   HTTP response body without reading/decoding.
  1251                                   Default is True.
  1252          :type _preload_content: bool, optional
  1253          :param _return_http_data_only: response data instead of ApiResponse
  1254                                         object with status code, headers, etc
  1255          :type _return_http_data_only: bool, optional
  1256          :param _request_timeout: timeout setting for this request. If one
  1257                                   number provided, it will be total request
  1258                                   timeout. It can also be a pair (tuple) of
  1259                                   (connection, read) timeouts.
  1260          :param _request_auth: set to override the auth_settings for an a single
  1261                                request; this effectively ignores the authentication
  1262                                in the spec for a single request.
  1263          :type _request_auth: dict, optional
  1264          :type _content_type: string, optional: force content-type for the request
  1265          :return: Returns the result object.
  1266                   If the method is called asynchronously,
  1267                   returns the request thread.
  1268          :rtype: tuple(Dict[str, str], status_code(int), headers(HTTPHeaderDict))
  1269          """
  1270  
  1271          _params = locals()
  1272  
  1273          _all_params = [
  1274              'repository'
  1275          ]
  1276          _all_params.extend(
  1277              [
  1278                  'async_req',
  1279                  '_return_http_data_only',
  1280                  '_preload_content',
  1281                  '_request_timeout',
  1282                  '_request_auth',
  1283                  '_content_type',
  1284                  '_headers'
  1285              ]
  1286          )
  1287  
  1288          # validate the arguments
  1289          for _key, _val in _params['kwargs'].items():
  1290              if _key not in _all_params:
  1291                  raise ApiTypeError(
  1292                      "Got an unexpected keyword argument '%s'"
  1293                      " to method get_repository_metadata" % _key
  1294                  )
  1295              _params[_key] = _val
  1296          del _params['kwargs']
  1297  
  1298          _collection_formats = {}
  1299  
  1300          # process the path parameters
  1301          _path_params = {}
  1302          if _params['repository']:
  1303              _path_params['repository'] = _params['repository']
  1304  
  1305  
  1306          # process the query parameters
  1307          _query_params = []
  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              '200': "Dict[str, str]",
  1324              '401': "Error",
  1325              '404': "Error",
  1326              '420': None,
  1327          }
  1328  
  1329          return self.api_client.call_api(
  1330              '/repositories/{repository}/metadata', 'GET',
  1331              _path_params,
  1332              _query_params,
  1333              _header_params,
  1334              body=_body_params,
  1335              post_params=_form_params,
  1336              files=_files,
  1337              response_types_map=_response_types_map,
  1338              auth_settings=_auth_settings,
  1339              async_req=_params.get('async_req'),
  1340              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1341              _preload_content=_params.get('_preload_content', True),
  1342              _request_timeout=_params.get('_request_timeout'),
  1343              collection_formats=_collection_formats,
  1344              _request_auth=_params.get('_request_auth'))
  1345  
  1346      @validate_arguments
  1347      def list_repositories(self, 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) -> RepositoryList:  # noqa: E501
  1348          """list repositories  # noqa: E501
  1349  
  1350          This method makes a synchronous HTTP request by default. To make an
  1351          asynchronous HTTP request, please pass async_req=True
  1352  
  1353          >>> thread = api.list_repositories(prefix, after, amount, async_req=True)
  1354          >>> result = thread.get()
  1355  
  1356          :param prefix: return items prefixed with this value
  1357          :type prefix: str
  1358          :param after: return items after this value
  1359          :type after: str
  1360          :param amount: how many items to return
  1361          :type amount: int
  1362          :param async_req: Whether to execute the request asynchronously.
  1363          :type async_req: bool, optional
  1364          :param _request_timeout: timeout setting for this request. If one
  1365                                   number provided, it will be total request
  1366                                   timeout. It can also be a pair (tuple) of
  1367                                   (connection, read) timeouts.
  1368          :return: Returns the result object.
  1369                   If the method is called asynchronously,
  1370                   returns the request thread.
  1371          :rtype: RepositoryList
  1372          """
  1373          kwargs['_return_http_data_only'] = True
  1374          if '_preload_content' in kwargs:
  1375              raise ValueError("Error! Please call the list_repositories_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1376          return self.list_repositories_with_http_info(prefix, after, amount, **kwargs)  # noqa: E501
  1377  
  1378      @validate_arguments
  1379      def list_repositories_with_http_info(self, 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
  1380          """list repositories  # noqa: E501
  1381  
  1382          This method makes a synchronous HTTP request by default. To make an
  1383          asynchronous HTTP request, please pass async_req=True
  1384  
  1385          >>> thread = api.list_repositories_with_http_info(prefix, after, amount, async_req=True)
  1386          >>> result = thread.get()
  1387  
  1388          :param prefix: return items prefixed with this value
  1389          :type prefix: str
  1390          :param after: return items after this value
  1391          :type after: str
  1392          :param amount: how many items to return
  1393          :type amount: int
  1394          :param async_req: Whether to execute the request asynchronously.
  1395          :type async_req: bool, optional
  1396          :param _preload_content: if False, the ApiResponse.data will
  1397                                   be set to none and raw_data will store the 
  1398                                   HTTP response body without reading/decoding.
  1399                                   Default is True.
  1400          :type _preload_content: bool, optional
  1401          :param _return_http_data_only: response data instead of ApiResponse
  1402                                         object with status code, headers, etc
  1403          :type _return_http_data_only: bool, optional
  1404          :param _request_timeout: timeout setting for this request. If one
  1405                                   number provided, it will be total request
  1406                                   timeout. It can also be a pair (tuple) of
  1407                                   (connection, read) timeouts.
  1408          :param _request_auth: set to override the auth_settings for an a single
  1409                                request; this effectively ignores the authentication
  1410                                in the spec for a single request.
  1411          :type _request_auth: dict, optional
  1412          :type _content_type: string, optional: force content-type for the request
  1413          :return: Returns the result object.
  1414                   If the method is called asynchronously,
  1415                   returns the request thread.
  1416          :rtype: tuple(RepositoryList, status_code(int), headers(HTTPHeaderDict))
  1417          """
  1418  
  1419          _params = locals()
  1420  
  1421          _all_params = [
  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_repositories" % _key
  1444                  )
  1445              _params[_key] = _val
  1446          del _params['kwargs']
  1447  
  1448          _collection_formats = {}
  1449  
  1450          # process the path parameters
  1451          _path_params = {}
  1452  
  1453          # process the query parameters
  1454          _query_params = []
  1455          if _params.get('prefix') is not None:  # noqa: E501
  1456              _query_params.append(('prefix', _params['prefix']))
  1457  
  1458          if _params.get('after') is not None:  # noqa: E501
  1459              _query_params.append(('after', _params['after']))
  1460  
  1461          if _params.get('amount') is not None:  # noqa: E501
  1462              _query_params.append(('amount', _params['amount']))
  1463  
  1464          # process the header parameters
  1465          _header_params = dict(_params.get('_headers', {}))
  1466          # process the form parameters
  1467          _form_params = []
  1468          _files = {}
  1469          # process the body parameter
  1470          _body_params = None
  1471          # set the HTTP header `Accept`
  1472          _header_params['Accept'] = self.api_client.select_header_accept(
  1473              ['application/json'])  # noqa: E501
  1474  
  1475          # authentication setting
  1476          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  1477  
  1478          _response_types_map = {
  1479              '200': "RepositoryList",
  1480              '401': "Error",
  1481              '420': None,
  1482          }
  1483  
  1484          return self.api_client.call_api(
  1485              '/repositories', 'GET',
  1486              _path_params,
  1487              _query_params,
  1488              _header_params,
  1489              body=_body_params,
  1490              post_params=_form_params,
  1491              files=_files,
  1492              response_types_map=_response_types_map,
  1493              auth_settings=_auth_settings,
  1494              async_req=_params.get('async_req'),
  1495              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1496              _preload_content=_params.get('_preload_content', True),
  1497              _request_timeout=_params.get('_request_timeout'),
  1498              collection_formats=_collection_formats,
  1499              _request_auth=_params.get('_request_auth'))
  1500  
  1501      @validate_arguments
  1502      def restore_status(self, repository : StrictStr, task_id : StrictStr, **kwargs) -> RepositoryRestoreStatus:  # noqa: E501
  1503          """Status of a restore request  # noqa: E501
  1504  
  1505          This method makes a synchronous HTTP request by default. To make an
  1506          asynchronous HTTP request, please pass async_req=True
  1507  
  1508          >>> thread = api.restore_status(repository, task_id, async_req=True)
  1509          >>> result = thread.get()
  1510  
  1511          :param repository: (required)
  1512          :type repository: str
  1513          :param task_id: (required)
  1514          :type task_id: str
  1515          :param async_req: Whether to execute the request asynchronously.
  1516          :type async_req: bool, optional
  1517          :param _request_timeout: timeout setting for this request. If one
  1518                                   number provided, it will be total request
  1519                                   timeout. It can also be a pair (tuple) of
  1520                                   (connection, read) timeouts.
  1521          :return: Returns the result object.
  1522                   If the method is called asynchronously,
  1523                   returns the request thread.
  1524          :rtype: RepositoryRestoreStatus
  1525          """
  1526          kwargs['_return_http_data_only'] = True
  1527          if '_preload_content' in kwargs:
  1528              raise ValueError("Error! Please call the restore_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1529          return self.restore_status_with_http_info(repository, task_id, **kwargs)  # noqa: E501
  1530  
  1531      @validate_arguments
  1532      def restore_status_with_http_info(self, repository : StrictStr, task_id : StrictStr, **kwargs) -> ApiResponse:  # noqa: E501
  1533          """Status of a restore request  # noqa: E501
  1534  
  1535          This method makes a synchronous HTTP request by default. To make an
  1536          asynchronous HTTP request, please pass async_req=True
  1537  
  1538          >>> thread = api.restore_status_with_http_info(repository, task_id, async_req=True)
  1539          >>> result = thread.get()
  1540  
  1541          :param repository: (required)
  1542          :type repository: str
  1543          :param task_id: (required)
  1544          :type task_id: str
  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(RepositoryRestoreStatus, status_code(int), headers(HTTPHeaderDict))
  1568          """
  1569  
  1570          _params = locals()
  1571  
  1572          _all_params = [
  1573              'repository',
  1574              'task_id'
  1575          ]
  1576          _all_params.extend(
  1577              [
  1578                  'async_req',
  1579                  '_return_http_data_only',
  1580                  '_preload_content',
  1581                  '_request_timeout',
  1582                  '_request_auth',
  1583                  '_content_type',
  1584                  '_headers'
  1585              ]
  1586          )
  1587  
  1588          # validate the arguments
  1589          for _key, _val in _params['kwargs'].items():
  1590              if _key not in _all_params:
  1591                  raise ApiTypeError(
  1592                      "Got an unexpected keyword argument '%s'"
  1593                      " to method restore_status" % _key
  1594                  )
  1595              _params[_key] = _val
  1596          del _params['kwargs']
  1597  
  1598          _collection_formats = {}
  1599  
  1600          # process the path parameters
  1601          _path_params = {}
  1602          if _params['repository']:
  1603              _path_params['repository'] = _params['repository']
  1604  
  1605  
  1606          # process the query parameters
  1607          _query_params = []
  1608          if _params.get('task_id') is not None:  # noqa: E501
  1609              _query_params.append(('task_id', _params['task_id']))
  1610  
  1611          # process the header parameters
  1612          _header_params = dict(_params.get('_headers', {}))
  1613          # process the form parameters
  1614          _form_params = []
  1615          _files = {}
  1616          # process the body parameter
  1617          _body_params = None
  1618          # set the HTTP header `Accept`
  1619          _header_params['Accept'] = self.api_client.select_header_accept(
  1620              ['application/json'])  # noqa: E501
  1621  
  1622          # authentication setting
  1623          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  1624  
  1625          _response_types_map = {
  1626              '200': "RepositoryRestoreStatus",
  1627              '400': "Error",
  1628              '401': "Error",
  1629              '404': "Error",
  1630              '420': None,
  1631          }
  1632  
  1633          return self.api_client.call_api(
  1634              '/repositories/{repository}/restore', 'GET',
  1635              _path_params,
  1636              _query_params,
  1637              _header_params,
  1638              body=_body_params,
  1639              post_params=_form_params,
  1640              files=_files,
  1641              response_types_map=_response_types_map,
  1642              auth_settings=_auth_settings,
  1643              async_req=_params.get('async_req'),
  1644              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1645              _preload_content=_params.get('_preload_content', True),
  1646              _request_timeout=_params.get('_request_timeout'),
  1647              collection_formats=_collection_formats,
  1648              _request_auth=_params.get('_request_auth'))
  1649  
  1650      @validate_arguments
  1651      def restore_submit(self, repository : StrictStr, refs_restore : RefsRestore, **kwargs) -> TaskInfo:  # noqa: E501
  1652          """Restore repository from a dump in the object store  # noqa: E501
  1653  
  1654          This method makes a synchronous HTTP request by default. To make an
  1655          asynchronous HTTP request, please pass async_req=True
  1656  
  1657          >>> thread = api.restore_submit(repository, refs_restore, async_req=True)
  1658          >>> result = thread.get()
  1659  
  1660          :param repository: (required)
  1661          :type repository: str
  1662          :param refs_restore: (required)
  1663          :type refs_restore: RefsRestore
  1664          :param async_req: Whether to execute the request asynchronously.
  1665          :type async_req: bool, optional
  1666          :param _request_timeout: timeout setting for this request. If one
  1667                                   number provided, it will be total request
  1668                                   timeout. It can also be a pair (tuple) of
  1669                                   (connection, read) timeouts.
  1670          :return: Returns the result object.
  1671                   If the method is called asynchronously,
  1672                   returns the request thread.
  1673          :rtype: TaskInfo
  1674          """
  1675          kwargs['_return_http_data_only'] = True
  1676          if '_preload_content' in kwargs:
  1677              raise ValueError("Error! Please call the restore_submit_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1678          return self.restore_submit_with_http_info(repository, refs_restore, **kwargs)  # noqa: E501
  1679  
  1680      @validate_arguments
  1681      def restore_submit_with_http_info(self, repository : StrictStr, refs_restore : RefsRestore, **kwargs) -> ApiResponse:  # noqa: E501
  1682          """Restore repository from a dump in the object store  # noqa: E501
  1683  
  1684          This method makes a synchronous HTTP request by default. To make an
  1685          asynchronous HTTP request, please pass async_req=True
  1686  
  1687          >>> thread = api.restore_submit_with_http_info(repository, refs_restore, async_req=True)
  1688          >>> result = thread.get()
  1689  
  1690          :param repository: (required)
  1691          :type repository: str
  1692          :param refs_restore: (required)
  1693          :type refs_restore: RefsRestore
  1694          :param async_req: Whether to execute the request asynchronously.
  1695          :type async_req: bool, optional
  1696          :param _preload_content: if False, the ApiResponse.data will
  1697                                   be set to none and raw_data will store the 
  1698                                   HTTP response body without reading/decoding.
  1699                                   Default is True.
  1700          :type _preload_content: bool, optional
  1701          :param _return_http_data_only: response data instead of ApiResponse
  1702                                         object with status code, headers, etc
  1703          :type _return_http_data_only: bool, optional
  1704          :param _request_timeout: timeout setting for this request. If one
  1705                                   number provided, it will be total request
  1706                                   timeout. It can also be a pair (tuple) of
  1707                                   (connection, read) timeouts.
  1708          :param _request_auth: set to override the auth_settings for an a single
  1709                                request; this effectively ignores the authentication
  1710                                in the spec for a single request.
  1711          :type _request_auth: dict, optional
  1712          :type _content_type: string, optional: force content-type for the request
  1713          :return: Returns the result object.
  1714                   If the method is called asynchronously,
  1715                   returns the request thread.
  1716          :rtype: tuple(TaskInfo, status_code(int), headers(HTTPHeaderDict))
  1717          """
  1718  
  1719          _params = locals()
  1720  
  1721          _all_params = [
  1722              'repository',
  1723              'refs_restore'
  1724          ]
  1725          _all_params.extend(
  1726              [
  1727                  'async_req',
  1728                  '_return_http_data_only',
  1729                  '_preload_content',
  1730                  '_request_timeout',
  1731                  '_request_auth',
  1732                  '_content_type',
  1733                  '_headers'
  1734              ]
  1735          )
  1736  
  1737          # validate the arguments
  1738          for _key, _val in _params['kwargs'].items():
  1739              if _key not in _all_params:
  1740                  raise ApiTypeError(
  1741                      "Got an unexpected keyword argument '%s'"
  1742                      " to method restore_submit" % _key
  1743                  )
  1744              _params[_key] = _val
  1745          del _params['kwargs']
  1746  
  1747          _collection_formats = {}
  1748  
  1749          # process the path parameters
  1750          _path_params = {}
  1751          if _params['repository']:
  1752              _path_params['repository'] = _params['repository']
  1753  
  1754  
  1755          # process the query parameters
  1756          _query_params = []
  1757          # process the header parameters
  1758          _header_params = dict(_params.get('_headers', {}))
  1759          # process the form parameters
  1760          _form_params = []
  1761          _files = {}
  1762          # process the body parameter
  1763          _body_params = None
  1764          if _params['refs_restore'] is not None:
  1765              _body_params = _params['refs_restore']
  1766  
  1767          # set the HTTP header `Accept`
  1768          _header_params['Accept'] = self.api_client.select_header_accept(
  1769              ['application/json'])  # noqa: E501
  1770  
  1771          # set the HTTP header `Content-Type`
  1772          _content_types_list = _params.get('_content_type',
  1773              self.api_client.select_header_content_type(
  1774                  ['application/json']))
  1775          if _content_types_list:
  1776                  _header_params['Content-Type'] = _content_types_list
  1777  
  1778          # authentication setting
  1779          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  1780  
  1781          _response_types_map = {
  1782              '202': "TaskInfo",
  1783              '400': "Error",
  1784              '403': "Error",
  1785              '401': "Error",
  1786              '404': "Error",
  1787          }
  1788  
  1789          return self.api_client.call_api(
  1790              '/repositories/{repository}/restore', 'POST',
  1791              _path_params,
  1792              _query_params,
  1793              _header_params,
  1794              body=_body_params,
  1795              post_params=_form_params,
  1796              files=_files,
  1797              response_types_map=_response_types_map,
  1798              auth_settings=_auth_settings,
  1799              async_req=_params.get('async_req'),
  1800              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1801              _preload_content=_params.get('_preload_content', True),
  1802              _request_timeout=_params.get('_request_timeout'),
  1803              collection_formats=_collection_formats,
  1804              _request_auth=_params.get('_request_auth'))
  1805  
  1806      @validate_arguments
  1807      def set_branch_protection_rules(self, repository : StrictStr, branch_protection_rule : conlist(BranchProtectionRule), if_match : Annotated[Optional[StrictStr], Field(description="if provided, the branch protection rules will be updated only if the current ETag match the provided value")] = None, **kwargs) -> None:  # noqa: E501
  1808          """set_branch_protection_rules  # noqa: E501
  1809  
  1810          This method makes a synchronous HTTP request by default. To make an
  1811          asynchronous HTTP request, please pass async_req=True
  1812  
  1813          >>> thread = api.set_branch_protection_rules(repository, branch_protection_rule, if_match, async_req=True)
  1814          >>> result = thread.get()
  1815  
  1816          :param repository: (required)
  1817          :type repository: str
  1818          :param branch_protection_rule: (required)
  1819          :type branch_protection_rule: List[BranchProtectionRule]
  1820          :param if_match: if provided, the branch protection rules will be updated only if the current ETag match the provided value
  1821          :type if_match: str
  1822          :param async_req: Whether to execute the request asynchronously.
  1823          :type async_req: bool, optional
  1824          :param _request_timeout: timeout setting for this request. If one
  1825                                   number provided, it will be total request
  1826                                   timeout. It can also be a pair (tuple) of
  1827                                   (connection, read) timeouts.
  1828          :return: Returns the result object.
  1829                   If the method is called asynchronously,
  1830                   returns the request thread.
  1831          :rtype: None
  1832          """
  1833          kwargs['_return_http_data_only'] = True
  1834          if '_preload_content' in kwargs:
  1835              raise ValueError("Error! Please call the set_branch_protection_rules_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1836          return self.set_branch_protection_rules_with_http_info(repository, branch_protection_rule, if_match, **kwargs)  # noqa: E501
  1837  
  1838      @validate_arguments
  1839      def set_branch_protection_rules_with_http_info(self, repository : StrictStr, branch_protection_rule : conlist(BranchProtectionRule), if_match : Annotated[Optional[StrictStr], Field(description="if provided, the branch protection rules will be updated only if the current ETag match the provided value")] = None, **kwargs) -> ApiResponse:  # noqa: E501
  1840          """set_branch_protection_rules  # noqa: E501
  1841  
  1842          This method makes a synchronous HTTP request by default. To make an
  1843          asynchronous HTTP request, please pass async_req=True
  1844  
  1845          >>> thread = api.set_branch_protection_rules_with_http_info(repository, branch_protection_rule, if_match, async_req=True)
  1846          >>> result = thread.get()
  1847  
  1848          :param repository: (required)
  1849          :type repository: str
  1850          :param branch_protection_rule: (required)
  1851          :type branch_protection_rule: List[BranchProtectionRule]
  1852          :param if_match: if provided, the branch protection rules will be updated only if the current ETag match the provided value
  1853          :type if_match: str
  1854          :param async_req: Whether to execute the request asynchronously.
  1855          :type async_req: bool, optional
  1856          :param _preload_content: if False, the ApiResponse.data will
  1857                                   be set to none and raw_data will store the 
  1858                                   HTTP response body without reading/decoding.
  1859                                   Default is True.
  1860          :type _preload_content: bool, optional
  1861          :param _return_http_data_only: response data instead of ApiResponse
  1862                                         object with status code, headers, etc
  1863          :type _return_http_data_only: bool, optional
  1864          :param _request_timeout: timeout setting for this request. If one
  1865                                   number provided, it will be total request
  1866                                   timeout. It can also be a pair (tuple) of
  1867                                   (connection, read) timeouts.
  1868          :param _request_auth: set to override the auth_settings for an a single
  1869                                request; this effectively ignores the authentication
  1870                                in the spec for a single request.
  1871          :type _request_auth: dict, optional
  1872          :type _content_type: string, optional: force content-type for the request
  1873          :return: Returns the result object.
  1874                   If the method is called asynchronously,
  1875                   returns the request thread.
  1876          :rtype: None
  1877          """
  1878  
  1879          _params = locals()
  1880  
  1881          _all_params = [
  1882              'repository',
  1883              'branch_protection_rule',
  1884              'if_match'
  1885          ]
  1886          _all_params.extend(
  1887              [
  1888                  'async_req',
  1889                  '_return_http_data_only',
  1890                  '_preload_content',
  1891                  '_request_timeout',
  1892                  '_request_auth',
  1893                  '_content_type',
  1894                  '_headers'
  1895              ]
  1896          )
  1897  
  1898          # validate the arguments
  1899          for _key, _val in _params['kwargs'].items():
  1900              if _key not in _all_params:
  1901                  raise ApiTypeError(
  1902                      "Got an unexpected keyword argument '%s'"
  1903                      " to method set_branch_protection_rules" % _key
  1904                  )
  1905              _params[_key] = _val
  1906          del _params['kwargs']
  1907  
  1908          _collection_formats = {}
  1909  
  1910          # process the path parameters
  1911          _path_params = {}
  1912          if _params['repository']:
  1913              _path_params['repository'] = _params['repository']
  1914  
  1915  
  1916          # process the query parameters
  1917          _query_params = []
  1918          # process the header parameters
  1919          _header_params = dict(_params.get('_headers', {}))
  1920          if _params['if_match']:
  1921              _header_params['If-Match'] = _params['if_match']
  1922  
  1923          # process the form parameters
  1924          _form_params = []
  1925          _files = {}
  1926          # process the body parameter
  1927          _body_params = None
  1928          if _params['branch_protection_rule'] is not None:
  1929              _body_params = _params['branch_protection_rule']
  1930  
  1931          # set the HTTP header `Accept`
  1932          _header_params['Accept'] = self.api_client.select_header_accept(
  1933              ['application/json'])  # noqa: E501
  1934  
  1935          # set the HTTP header `Content-Type`
  1936          _content_types_list = _params.get('_content_type',
  1937              self.api_client.select_header_content_type(
  1938                  ['application/json']))
  1939          if _content_types_list:
  1940                  _header_params['Content-Type'] = _content_types_list
  1941  
  1942          # authentication setting
  1943          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  1944  
  1945          _response_types_map = {}
  1946  
  1947          return self.api_client.call_api(
  1948              '/repositories/{repository}/settings/branch_protection', 'PUT',
  1949              _path_params,
  1950              _query_params,
  1951              _header_params,
  1952              body=_body_params,
  1953              post_params=_form_params,
  1954              files=_files,
  1955              response_types_map=_response_types_map,
  1956              auth_settings=_auth_settings,
  1957              async_req=_params.get('async_req'),
  1958              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  1959              _preload_content=_params.get('_preload_content', True),
  1960              _request_timeout=_params.get('_request_timeout'),
  1961              collection_formats=_collection_formats,
  1962              _request_auth=_params.get('_request_auth'))
  1963  
  1964      @validate_arguments
  1965      def set_gc_rules(self, repository : StrictStr, garbage_collection_rules : GarbageCollectionRules, **kwargs) -> None:  # noqa: E501
  1966          """set_gc_rules  # noqa: E501
  1967  
  1968          This method makes a synchronous HTTP request by default. To make an
  1969          asynchronous HTTP request, please pass async_req=True
  1970  
  1971          >>> thread = api.set_gc_rules(repository, garbage_collection_rules, async_req=True)
  1972          >>> result = thread.get()
  1973  
  1974          :param repository: (required)
  1975          :type repository: str
  1976          :param garbage_collection_rules: (required)
  1977          :type garbage_collection_rules: GarbageCollectionRules
  1978          :param async_req: Whether to execute the request asynchronously.
  1979          :type async_req: bool, optional
  1980          :param _request_timeout: timeout setting for this request. If one
  1981                                   number provided, it will be total request
  1982                                   timeout. It can also be a pair (tuple) of
  1983                                   (connection, read) timeouts.
  1984          :return: Returns the result object.
  1985                   If the method is called asynchronously,
  1986                   returns the request thread.
  1987          :rtype: None
  1988          """
  1989          kwargs['_return_http_data_only'] = True
  1990          if '_preload_content' in kwargs:
  1991              raise ValueError("Error! Please call the set_gc_rules_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
  1992          return self.set_gc_rules_with_http_info(repository, garbage_collection_rules, **kwargs)  # noqa: E501
  1993  
  1994      @validate_arguments
  1995      def set_gc_rules_with_http_info(self, repository : StrictStr, garbage_collection_rules : GarbageCollectionRules, **kwargs) -> ApiResponse:  # noqa: E501
  1996          """set_gc_rules  # noqa: E501
  1997  
  1998          This method makes a synchronous HTTP request by default. To make an
  1999          asynchronous HTTP request, please pass async_req=True
  2000  
  2001          >>> thread = api.set_gc_rules_with_http_info(repository, garbage_collection_rules, async_req=True)
  2002          >>> result = thread.get()
  2003  
  2004          :param repository: (required)
  2005          :type repository: str
  2006          :param garbage_collection_rules: (required)
  2007          :type garbage_collection_rules: GarbageCollectionRules
  2008          :param async_req: Whether to execute the request asynchronously.
  2009          :type async_req: bool, optional
  2010          :param _preload_content: if False, the ApiResponse.data will
  2011                                   be set to none and raw_data will store the 
  2012                                   HTTP response body without reading/decoding.
  2013                                   Default is True.
  2014          :type _preload_content: bool, optional
  2015          :param _return_http_data_only: response data instead of ApiResponse
  2016                                         object with status code, headers, etc
  2017          :type _return_http_data_only: bool, optional
  2018          :param _request_timeout: timeout setting for this request. If one
  2019                                   number provided, it will be total request
  2020                                   timeout. It can also be a pair (tuple) of
  2021                                   (connection, read) timeouts.
  2022          :param _request_auth: set to override the auth_settings for an a single
  2023                                request; this effectively ignores the authentication
  2024                                in the spec for a single request.
  2025          :type _request_auth: dict, optional
  2026          :type _content_type: string, optional: force content-type for the request
  2027          :return: Returns the result object.
  2028                   If the method is called asynchronously,
  2029                   returns the request thread.
  2030          :rtype: None
  2031          """
  2032  
  2033          _params = locals()
  2034  
  2035          _all_params = [
  2036              'repository',
  2037              'garbage_collection_rules'
  2038          ]
  2039          _all_params.extend(
  2040              [
  2041                  'async_req',
  2042                  '_return_http_data_only',
  2043                  '_preload_content',
  2044                  '_request_timeout',
  2045                  '_request_auth',
  2046                  '_content_type',
  2047                  '_headers'
  2048              ]
  2049          )
  2050  
  2051          # validate the arguments
  2052          for _key, _val in _params['kwargs'].items():
  2053              if _key not in _all_params:
  2054                  raise ApiTypeError(
  2055                      "Got an unexpected keyword argument '%s'"
  2056                      " to method set_gc_rules" % _key
  2057                  )
  2058              _params[_key] = _val
  2059          del _params['kwargs']
  2060  
  2061          _collection_formats = {}
  2062  
  2063          # process the path parameters
  2064          _path_params = {}
  2065          if _params['repository']:
  2066              _path_params['repository'] = _params['repository']
  2067  
  2068  
  2069          # process the query parameters
  2070          _query_params = []
  2071          # process the header parameters
  2072          _header_params = dict(_params.get('_headers', {}))
  2073          # process the form parameters
  2074          _form_params = []
  2075          _files = {}
  2076          # process the body parameter
  2077          _body_params = None
  2078          if _params['garbage_collection_rules'] is not None:
  2079              _body_params = _params['garbage_collection_rules']
  2080  
  2081          # set the HTTP header `Accept`
  2082          _header_params['Accept'] = self.api_client.select_header_accept(
  2083              ['application/json'])  # noqa: E501
  2084  
  2085          # set the HTTP header `Content-Type`
  2086          _content_types_list = _params.get('_content_type',
  2087              self.api_client.select_header_content_type(
  2088                  ['application/json']))
  2089          if _content_types_list:
  2090                  _header_params['Content-Type'] = _content_types_list
  2091  
  2092          # authentication setting
  2093          _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token']  # noqa: E501
  2094  
  2095          _response_types_map = {}
  2096  
  2097          return self.api_client.call_api(
  2098              '/repositories/{repository}/settings/gc_rules', 'PUT',
  2099              _path_params,
  2100              _query_params,
  2101              _header_params,
  2102              body=_body_params,
  2103              post_params=_form_params,
  2104              files=_files,
  2105              response_types_map=_response_types_map,
  2106              auth_settings=_auth_settings,
  2107              async_req=_params.get('async_req'),
  2108              _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
  2109              _preload_content=_params.get('_preload_content', True),
  2110              _request_timeout=_params.get('_request_timeout'),
  2111              collection_formats=_collection_formats,
  2112              _request_auth=_params.get('_request_auth'))