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

     1  """
     2      lakeFS API
     3  
     4      lakeFS HTTP API  # noqa: E501
     5  
     6      The version of the OpenAPI document: 1.0.0
     7      Contact: services@treeverse.io
     8      Generated by: https://openapi-generator.tech
     9  """
    10  
    11  
    12  import re  # noqa: F401
    13  import sys  # noqa: F401
    14  
    15  from lakefs_client.api_client import ApiClient, Endpoint as _Endpoint
    16  from lakefs_client.model_utils import (  # noqa: F401
    17      check_allowed_values,
    18      check_validations,
    19      date,
    20      datetime,
    21      file_type,
    22      none_type,
    23      validate_and_convert_types
    24  )
    25  from lakefs_client.model.branch_creation import BranchCreation
    26  from lakefs_client.model.cherry_pick_creation import CherryPickCreation
    27  from lakefs_client.model.commit import Commit
    28  from lakefs_client.model.diff_list import DiffList
    29  from lakefs_client.model.error import Error
    30  from lakefs_client.model.ref import Ref
    31  from lakefs_client.model.ref_list import RefList
    32  from lakefs_client.model.reset_creation import ResetCreation
    33  from lakefs_client.model.revert_creation import RevertCreation
    34  
    35  
    36  class BranchesApi(object):
    37      """NOTE: This class is auto generated by OpenAPI Generator
    38      Ref: https://openapi-generator.tech
    39  
    40      Do not edit the class manually.
    41      """
    42  
    43      def __init__(self, api_client=None):
    44          if api_client is None:
    45              api_client = ApiClient()
    46          self.api_client = api_client
    47          self.cherry_pick_endpoint = _Endpoint(
    48              settings={
    49                  'response_type': (Commit,),
    50                  'auth': [
    51                      'basic_auth',
    52                      'cookie_auth',
    53                      'jwt_token',
    54                      'oidc_auth',
    55                      'saml_auth'
    56                  ],
    57                  'endpoint_path': '/repositories/{repository}/branches/{branch}/cherry-pick',
    58                  'operation_id': 'cherry_pick',
    59                  'http_method': 'POST',
    60                  'servers': None,
    61              },
    62              params_map={
    63                  'all': [
    64                      'repository',
    65                      'branch',
    66                      'cherry_pick_creation',
    67                  ],
    68                  'required': [
    69                      'repository',
    70                      'branch',
    71                      'cherry_pick_creation',
    72                  ],
    73                  'nullable': [
    74                  ],
    75                  'enum': [
    76                  ],
    77                  'validation': [
    78                  ]
    79              },
    80              root_map={
    81                  'validations': {
    82                  },
    83                  'allowed_values': {
    84                  },
    85                  'openapi_types': {
    86                      'repository':
    87                          (str,),
    88                      'branch':
    89                          (str,),
    90                      'cherry_pick_creation':
    91                          (CherryPickCreation,),
    92                  },
    93                  'attribute_map': {
    94                      'repository': 'repository',
    95                      'branch': 'branch',
    96                  },
    97                  'location_map': {
    98                      'repository': 'path',
    99                      'branch': 'path',
   100                      'cherry_pick_creation': 'body',
   101                  },
   102                  'collection_format_map': {
   103                  }
   104              },
   105              headers_map={
   106                  'accept': [
   107                      'application/json'
   108                  ],
   109                  'content_type': [
   110                      'application/json'
   111                  ]
   112              },
   113              api_client=api_client
   114          )
   115          self.create_branch_endpoint = _Endpoint(
   116              settings={
   117                  'response_type': (str,),
   118                  'auth': [
   119                      'basic_auth',
   120                      'cookie_auth',
   121                      'jwt_token',
   122                      'oidc_auth',
   123                      'saml_auth'
   124                  ],
   125                  'endpoint_path': '/repositories/{repository}/branches',
   126                  'operation_id': 'create_branch',
   127                  'http_method': 'POST',
   128                  'servers': None,
   129              },
   130              params_map={
   131                  'all': [
   132                      'repository',
   133                      'branch_creation',
   134                  ],
   135                  'required': [
   136                      'repository',
   137                      'branch_creation',
   138                  ],
   139                  'nullable': [
   140                  ],
   141                  'enum': [
   142                  ],
   143                  'validation': [
   144                  ]
   145              },
   146              root_map={
   147                  'validations': {
   148                  },
   149                  'allowed_values': {
   150                  },
   151                  'openapi_types': {
   152                      'repository':
   153                          (str,),
   154                      'branch_creation':
   155                          (BranchCreation,),
   156                  },
   157                  'attribute_map': {
   158                      'repository': 'repository',
   159                  },
   160                  'location_map': {
   161                      'repository': 'path',
   162                      'branch_creation': 'body',
   163                  },
   164                  'collection_format_map': {
   165                  }
   166              },
   167              headers_map={
   168                  'accept': [
   169                      'text/html',
   170                      'application/json'
   171                  ],
   172                  'content_type': [
   173                      'application/json'
   174                  ]
   175              },
   176              api_client=api_client
   177          )
   178          self.delete_branch_endpoint = _Endpoint(
   179              settings={
   180                  'response_type': None,
   181                  'auth': [
   182                      'basic_auth',
   183                      'cookie_auth',
   184                      'jwt_token',
   185                      'oidc_auth',
   186                      'saml_auth'
   187                  ],
   188                  'endpoint_path': '/repositories/{repository}/branches/{branch}',
   189                  'operation_id': 'delete_branch',
   190                  'http_method': 'DELETE',
   191                  'servers': None,
   192              },
   193              params_map={
   194                  'all': [
   195                      'repository',
   196                      'branch',
   197                      'force',
   198                  ],
   199                  'required': [
   200                      'repository',
   201                      'branch',
   202                  ],
   203                  'nullable': [
   204                  ],
   205                  'enum': [
   206                  ],
   207                  'validation': [
   208                  ]
   209              },
   210              root_map={
   211                  'validations': {
   212                  },
   213                  'allowed_values': {
   214                  },
   215                  'openapi_types': {
   216                      'repository':
   217                          (str,),
   218                      'branch':
   219                          (str,),
   220                      'force':
   221                          (bool,),
   222                  },
   223                  'attribute_map': {
   224                      'repository': 'repository',
   225                      'branch': 'branch',
   226                      'force': 'force',
   227                  },
   228                  'location_map': {
   229                      'repository': 'path',
   230                      'branch': 'path',
   231                      'force': 'query',
   232                  },
   233                  'collection_format_map': {
   234                  }
   235              },
   236              headers_map={
   237                  'accept': [
   238                      'application/json'
   239                  ],
   240                  'content_type': [],
   241              },
   242              api_client=api_client
   243          )
   244          self.diff_branch_endpoint = _Endpoint(
   245              settings={
   246                  'response_type': (DiffList,),
   247                  'auth': [
   248                      'basic_auth',
   249                      'cookie_auth',
   250                      'jwt_token',
   251                      'oidc_auth',
   252                      'saml_auth'
   253                  ],
   254                  'endpoint_path': '/repositories/{repository}/branches/{branch}/diff',
   255                  'operation_id': 'diff_branch',
   256                  'http_method': 'GET',
   257                  'servers': None,
   258              },
   259              params_map={
   260                  'all': [
   261                      'repository',
   262                      'branch',
   263                      'after',
   264                      'amount',
   265                      'prefix',
   266                      'delimiter',
   267                  ],
   268                  'required': [
   269                      'repository',
   270                      'branch',
   271                  ],
   272                  'nullable': [
   273                  ],
   274                  'enum': [
   275                  ],
   276                  'validation': [
   277                      'amount',
   278                  ]
   279              },
   280              root_map={
   281                  'validations': {
   282                      ('amount',): {
   283  
   284                          'inclusive_maximum': 1000,
   285                          'inclusive_minimum': -1,
   286                      },
   287                  },
   288                  'allowed_values': {
   289                  },
   290                  'openapi_types': {
   291                      'repository':
   292                          (str,),
   293                      'branch':
   294                          (str,),
   295                      'after':
   296                          (str,),
   297                      'amount':
   298                          (int,),
   299                      'prefix':
   300                          (str,),
   301                      'delimiter':
   302                          (str,),
   303                  },
   304                  'attribute_map': {
   305                      'repository': 'repository',
   306                      'branch': 'branch',
   307                      'after': 'after',
   308                      'amount': 'amount',
   309                      'prefix': 'prefix',
   310                      'delimiter': 'delimiter',
   311                  },
   312                  'location_map': {
   313                      'repository': 'path',
   314                      'branch': 'path',
   315                      'after': 'query',
   316                      'amount': 'query',
   317                      'prefix': 'query',
   318                      'delimiter': 'query',
   319                  },
   320                  'collection_format_map': {
   321                  }
   322              },
   323              headers_map={
   324                  'accept': [
   325                      'application/json'
   326                  ],
   327                  'content_type': [],
   328              },
   329              api_client=api_client
   330          )
   331          self.get_branch_endpoint = _Endpoint(
   332              settings={
   333                  'response_type': (Ref,),
   334                  'auth': [
   335                      'basic_auth',
   336                      'cookie_auth',
   337                      'jwt_token',
   338                      'oidc_auth',
   339                      'saml_auth'
   340                  ],
   341                  'endpoint_path': '/repositories/{repository}/branches/{branch}',
   342                  'operation_id': 'get_branch',
   343                  'http_method': 'GET',
   344                  'servers': None,
   345              },
   346              params_map={
   347                  'all': [
   348                      'repository',
   349                      'branch',
   350                  ],
   351                  'required': [
   352                      'repository',
   353                      'branch',
   354                  ],
   355                  'nullable': [
   356                  ],
   357                  'enum': [
   358                  ],
   359                  'validation': [
   360                  ]
   361              },
   362              root_map={
   363                  'validations': {
   364                  },
   365                  'allowed_values': {
   366                  },
   367                  'openapi_types': {
   368                      'repository':
   369                          (str,),
   370                      'branch':
   371                          (str,),
   372                  },
   373                  'attribute_map': {
   374                      'repository': 'repository',
   375                      'branch': 'branch',
   376                  },
   377                  'location_map': {
   378                      'repository': 'path',
   379                      'branch': 'path',
   380                  },
   381                  'collection_format_map': {
   382                  }
   383              },
   384              headers_map={
   385                  'accept': [
   386                      'application/json'
   387                  ],
   388                  'content_type': [],
   389              },
   390              api_client=api_client
   391          )
   392          self.list_branches_endpoint = _Endpoint(
   393              settings={
   394                  'response_type': (RefList,),
   395                  'auth': [
   396                      'basic_auth',
   397                      'cookie_auth',
   398                      'jwt_token',
   399                      'oidc_auth',
   400                      'saml_auth'
   401                  ],
   402                  'endpoint_path': '/repositories/{repository}/branches',
   403                  'operation_id': 'list_branches',
   404                  'http_method': 'GET',
   405                  'servers': None,
   406              },
   407              params_map={
   408                  'all': [
   409                      'repository',
   410                      'prefix',
   411                      'after',
   412                      'amount',
   413                  ],
   414                  'required': [
   415                      'repository',
   416                  ],
   417                  'nullable': [
   418                  ],
   419                  'enum': [
   420                  ],
   421                  'validation': [
   422                      'amount',
   423                  ]
   424              },
   425              root_map={
   426                  'validations': {
   427                      ('amount',): {
   428  
   429                          'inclusive_maximum': 1000,
   430                          'inclusive_minimum': -1,
   431                      },
   432                  },
   433                  'allowed_values': {
   434                  },
   435                  'openapi_types': {
   436                      'repository':
   437                          (str,),
   438                      'prefix':
   439                          (str,),
   440                      'after':
   441                          (str,),
   442                      'amount':
   443                          (int,),
   444                  },
   445                  'attribute_map': {
   446                      'repository': 'repository',
   447                      'prefix': 'prefix',
   448                      'after': 'after',
   449                      'amount': 'amount',
   450                  },
   451                  'location_map': {
   452                      'repository': 'path',
   453                      'prefix': 'query',
   454                      'after': 'query',
   455                      'amount': 'query',
   456                  },
   457                  'collection_format_map': {
   458                  }
   459              },
   460              headers_map={
   461                  'accept': [
   462                      'application/json'
   463                  ],
   464                  'content_type': [],
   465              },
   466              api_client=api_client
   467          )
   468          self.reset_branch_endpoint = _Endpoint(
   469              settings={
   470                  'response_type': None,
   471                  'auth': [
   472                      'basic_auth',
   473                      'cookie_auth',
   474                      'jwt_token',
   475                      'oidc_auth',
   476                      'saml_auth'
   477                  ],
   478                  'endpoint_path': '/repositories/{repository}/branches/{branch}',
   479                  'operation_id': 'reset_branch',
   480                  'http_method': 'PUT',
   481                  'servers': None,
   482              },
   483              params_map={
   484                  'all': [
   485                      'repository',
   486                      'branch',
   487                      'reset_creation',
   488                  ],
   489                  'required': [
   490                      'repository',
   491                      'branch',
   492                      'reset_creation',
   493                  ],
   494                  'nullable': [
   495                  ],
   496                  'enum': [
   497                  ],
   498                  'validation': [
   499                  ]
   500              },
   501              root_map={
   502                  'validations': {
   503                  },
   504                  'allowed_values': {
   505                  },
   506                  'openapi_types': {
   507                      'repository':
   508                          (str,),
   509                      'branch':
   510                          (str,),
   511                      'reset_creation':
   512                          (ResetCreation,),
   513                  },
   514                  'attribute_map': {
   515                      'repository': 'repository',
   516                      'branch': 'branch',
   517                  },
   518                  'location_map': {
   519                      'repository': 'path',
   520                      'branch': 'path',
   521                      'reset_creation': 'body',
   522                  },
   523                  'collection_format_map': {
   524                  }
   525              },
   526              headers_map={
   527                  'accept': [
   528                      'application/json'
   529                  ],
   530                  'content_type': [
   531                      'application/json'
   532                  ]
   533              },
   534              api_client=api_client
   535          )
   536          self.revert_branch_endpoint = _Endpoint(
   537              settings={
   538                  'response_type': None,
   539                  'auth': [
   540                      'basic_auth',
   541                      'cookie_auth',
   542                      'jwt_token',
   543                      'oidc_auth',
   544                      'saml_auth'
   545                  ],
   546                  'endpoint_path': '/repositories/{repository}/branches/{branch}/revert',
   547                  'operation_id': 'revert_branch',
   548                  'http_method': 'POST',
   549                  'servers': None,
   550              },
   551              params_map={
   552                  'all': [
   553                      'repository',
   554                      'branch',
   555                      'revert_creation',
   556                  ],
   557                  'required': [
   558                      'repository',
   559                      'branch',
   560                      'revert_creation',
   561                  ],
   562                  'nullable': [
   563                  ],
   564                  'enum': [
   565                  ],
   566                  'validation': [
   567                  ]
   568              },
   569              root_map={
   570                  'validations': {
   571                  },
   572                  'allowed_values': {
   573                  },
   574                  'openapi_types': {
   575                      'repository':
   576                          (str,),
   577                      'branch':
   578                          (str,),
   579                      'revert_creation':
   580                          (RevertCreation,),
   581                  },
   582                  'attribute_map': {
   583                      'repository': 'repository',
   584                      'branch': 'branch',
   585                  },
   586                  'location_map': {
   587                      'repository': 'path',
   588                      'branch': 'path',
   589                      'revert_creation': 'body',
   590                  },
   591                  'collection_format_map': {
   592                  }
   593              },
   594              headers_map={
   595                  'accept': [
   596                      'application/json'
   597                  ],
   598                  'content_type': [
   599                      'application/json'
   600                  ]
   601              },
   602              api_client=api_client
   603          )
   604  
   605      def cherry_pick(
   606          self,
   607          repository,
   608          branch,
   609          cherry_pick_creation,
   610          **kwargs
   611      ):
   612          """Replay the changes from the given commit on the branch  # noqa: E501
   613  
   614          This method makes a synchronous HTTP request by default. To make an
   615          asynchronous HTTP request, please pass async_req=True
   616  
   617          >>> thread = api.cherry_pick(repository, branch, cherry_pick_creation, async_req=True)
   618          >>> result = thread.get()
   619  
   620          Args:
   621              repository (str):
   622              branch (str):
   623              cherry_pick_creation (CherryPickCreation):
   624  
   625          Keyword Args:
   626              _return_http_data_only (bool): response data without head status
   627                  code and headers. Default is True.
   628              _preload_content (bool): if False, the urllib3.HTTPResponse object
   629                  will be returned without reading/decoding response data.
   630                  Default is True.
   631              _request_timeout (int/float/tuple): timeout setting for this request. If
   632                  one number provided, it will be total request timeout. It can also
   633                  be a pair (tuple) of (connection, read) timeouts.
   634                  Default is None.
   635              _check_input_type (bool): specifies if type checking
   636                  should be done one the data sent to the server.
   637                  Default is True.
   638              _check_return_type (bool): specifies if type checking
   639                  should be done one the data received from the server.
   640                  Default is True.
   641              _host_index (int/None): specifies the index of the server
   642                  that we want to use.
   643                  Default is read from the configuration.
   644              async_req (bool): execute request asynchronously
   645  
   646          Returns:
   647              Commit
   648                  If the method is called asynchronously, returns the request
   649                  thread.
   650          """
   651          kwargs['async_req'] = kwargs.get(
   652              'async_req', False
   653          )
   654          kwargs['_return_http_data_only'] = kwargs.get(
   655              '_return_http_data_only', True
   656          )
   657          kwargs['_preload_content'] = kwargs.get(
   658              '_preload_content', True
   659          )
   660          kwargs['_request_timeout'] = kwargs.get(
   661              '_request_timeout', None
   662          )
   663          kwargs['_check_input_type'] = kwargs.get(
   664              '_check_input_type', True
   665          )
   666          kwargs['_check_return_type'] = kwargs.get(
   667              '_check_return_type', True
   668          )
   669          kwargs['_host_index'] = kwargs.get('_host_index')
   670          kwargs['repository'] = \
   671              repository
   672          kwargs['branch'] = \
   673              branch
   674          kwargs['cherry_pick_creation'] = \
   675              cherry_pick_creation
   676          return self.cherry_pick_endpoint.call_with_http_info(**kwargs)
   677  
   678      def create_branch(
   679          self,
   680          repository,
   681          branch_creation,
   682          **kwargs
   683      ):
   684          """create branch  # noqa: E501
   685  
   686          This method makes a synchronous HTTP request by default. To make an
   687          asynchronous HTTP request, please pass async_req=True
   688  
   689          >>> thread = api.create_branch(repository, branch_creation, async_req=True)
   690          >>> result = thread.get()
   691  
   692          Args:
   693              repository (str):
   694              branch_creation (BranchCreation):
   695  
   696          Keyword Args:
   697              _return_http_data_only (bool): response data without head status
   698                  code and headers. Default is True.
   699              _preload_content (bool): if False, the urllib3.HTTPResponse object
   700                  will be returned without reading/decoding response data.
   701                  Default is True.
   702              _request_timeout (int/float/tuple): timeout setting for this request. If
   703                  one number provided, it will be total request timeout. It can also
   704                  be a pair (tuple) of (connection, read) timeouts.
   705                  Default is None.
   706              _check_input_type (bool): specifies if type checking
   707                  should be done one the data sent to the server.
   708                  Default is True.
   709              _check_return_type (bool): specifies if type checking
   710                  should be done one the data received from the server.
   711                  Default is True.
   712              _host_index (int/None): specifies the index of the server
   713                  that we want to use.
   714                  Default is read from the configuration.
   715              async_req (bool): execute request asynchronously
   716  
   717          Returns:
   718              str
   719                  If the method is called asynchronously, returns the request
   720                  thread.
   721          """
   722          kwargs['async_req'] = kwargs.get(
   723              'async_req', False
   724          )
   725          kwargs['_return_http_data_only'] = kwargs.get(
   726              '_return_http_data_only', True
   727          )
   728          kwargs['_preload_content'] = kwargs.get(
   729              '_preload_content', True
   730          )
   731          kwargs['_request_timeout'] = kwargs.get(
   732              '_request_timeout', None
   733          )
   734          kwargs['_check_input_type'] = kwargs.get(
   735              '_check_input_type', True
   736          )
   737          kwargs['_check_return_type'] = kwargs.get(
   738              '_check_return_type', True
   739          )
   740          kwargs['_host_index'] = kwargs.get('_host_index')
   741          kwargs['repository'] = \
   742              repository
   743          kwargs['branch_creation'] = \
   744              branch_creation
   745          return self.create_branch_endpoint.call_with_http_info(**kwargs)
   746  
   747      def delete_branch(
   748          self,
   749          repository,
   750          branch,
   751          **kwargs
   752      ):
   753          """delete branch  # noqa: E501
   754  
   755          This method makes a synchronous HTTP request by default. To make an
   756          asynchronous HTTP request, please pass async_req=True
   757  
   758          >>> thread = api.delete_branch(repository, branch, async_req=True)
   759          >>> result = thread.get()
   760  
   761          Args:
   762              repository (str):
   763              branch (str):
   764  
   765          Keyword Args:
   766              force (bool): [optional] if omitted the server will use the default value of False
   767              _return_http_data_only (bool): response data without head status
   768                  code and headers. Default is True.
   769              _preload_content (bool): if False, the urllib3.HTTPResponse object
   770                  will be returned without reading/decoding response data.
   771                  Default is True.
   772              _request_timeout (int/float/tuple): timeout setting for this request. If
   773                  one number provided, it will be total request timeout. It can also
   774                  be a pair (tuple) of (connection, read) timeouts.
   775                  Default is None.
   776              _check_input_type (bool): specifies if type checking
   777                  should be done one the data sent to the server.
   778                  Default is True.
   779              _check_return_type (bool): specifies if type checking
   780                  should be done one the data received from the server.
   781                  Default is True.
   782              _host_index (int/None): specifies the index of the server
   783                  that we want to use.
   784                  Default is read from the configuration.
   785              async_req (bool): execute request asynchronously
   786  
   787          Returns:
   788              None
   789                  If the method is called asynchronously, returns the request
   790                  thread.
   791          """
   792          kwargs['async_req'] = kwargs.get(
   793              'async_req', False
   794          )
   795          kwargs['_return_http_data_only'] = kwargs.get(
   796              '_return_http_data_only', True
   797          )
   798          kwargs['_preload_content'] = kwargs.get(
   799              '_preload_content', True
   800          )
   801          kwargs['_request_timeout'] = kwargs.get(
   802              '_request_timeout', None
   803          )
   804          kwargs['_check_input_type'] = kwargs.get(
   805              '_check_input_type', True
   806          )
   807          kwargs['_check_return_type'] = kwargs.get(
   808              '_check_return_type', True
   809          )
   810          kwargs['_host_index'] = kwargs.get('_host_index')
   811          kwargs['repository'] = \
   812              repository
   813          kwargs['branch'] = \
   814              branch
   815          return self.delete_branch_endpoint.call_with_http_info(**kwargs)
   816  
   817      def diff_branch(
   818          self,
   819          repository,
   820          branch,
   821          **kwargs
   822      ):
   823          """diff branch  # noqa: E501
   824  
   825          This method makes a synchronous HTTP request by default. To make an
   826          asynchronous HTTP request, please pass async_req=True
   827  
   828          >>> thread = api.diff_branch(repository, branch, async_req=True)
   829          >>> result = thread.get()
   830  
   831          Args:
   832              repository (str):
   833              branch (str):
   834  
   835          Keyword Args:
   836              after (str): return items after this value. [optional]
   837              amount (int): how many items to return. [optional] if omitted the server will use the default value of 100
   838              prefix (str): return items prefixed with this value. [optional]
   839              delimiter (str): delimiter used to group common prefixes by. [optional]
   840              _return_http_data_only (bool): response data without head status
   841                  code and headers. Default is True.
   842              _preload_content (bool): if False, the urllib3.HTTPResponse object
   843                  will be returned without reading/decoding response data.
   844                  Default is True.
   845              _request_timeout (int/float/tuple): timeout setting for this request. If
   846                  one number provided, it will be total request timeout. It can also
   847                  be a pair (tuple) of (connection, read) timeouts.
   848                  Default is None.
   849              _check_input_type (bool): specifies if type checking
   850                  should be done one the data sent to the server.
   851                  Default is True.
   852              _check_return_type (bool): specifies if type checking
   853                  should be done one the data received from the server.
   854                  Default is True.
   855              _host_index (int/None): specifies the index of the server
   856                  that we want to use.
   857                  Default is read from the configuration.
   858              async_req (bool): execute request asynchronously
   859  
   860          Returns:
   861              DiffList
   862                  If the method is called asynchronously, returns the request
   863                  thread.
   864          """
   865          kwargs['async_req'] = kwargs.get(
   866              'async_req', False
   867          )
   868          kwargs['_return_http_data_only'] = kwargs.get(
   869              '_return_http_data_only', True
   870          )
   871          kwargs['_preload_content'] = kwargs.get(
   872              '_preload_content', True
   873          )
   874          kwargs['_request_timeout'] = kwargs.get(
   875              '_request_timeout', None
   876          )
   877          kwargs['_check_input_type'] = kwargs.get(
   878              '_check_input_type', True
   879          )
   880          kwargs['_check_return_type'] = kwargs.get(
   881              '_check_return_type', True
   882          )
   883          kwargs['_host_index'] = kwargs.get('_host_index')
   884          kwargs['repository'] = \
   885              repository
   886          kwargs['branch'] = \
   887              branch
   888          return self.diff_branch_endpoint.call_with_http_info(**kwargs)
   889  
   890      def get_branch(
   891          self,
   892          repository,
   893          branch,
   894          **kwargs
   895      ):
   896          """get branch  # noqa: E501
   897  
   898          This method makes a synchronous HTTP request by default. To make an
   899          asynchronous HTTP request, please pass async_req=True
   900  
   901          >>> thread = api.get_branch(repository, branch, async_req=True)
   902          >>> result = thread.get()
   903  
   904          Args:
   905              repository (str):
   906              branch (str):
   907  
   908          Keyword Args:
   909              _return_http_data_only (bool): response data without head status
   910                  code and headers. Default is True.
   911              _preload_content (bool): if False, the urllib3.HTTPResponse object
   912                  will be returned without reading/decoding response data.
   913                  Default is True.
   914              _request_timeout (int/float/tuple): timeout setting for this request. If
   915                  one number provided, it will be total request timeout. It can also
   916                  be a pair (tuple) of (connection, read) timeouts.
   917                  Default is None.
   918              _check_input_type (bool): specifies if type checking
   919                  should be done one the data sent to the server.
   920                  Default is True.
   921              _check_return_type (bool): specifies if type checking
   922                  should be done one the data received from the server.
   923                  Default is True.
   924              _host_index (int/None): specifies the index of the server
   925                  that we want to use.
   926                  Default is read from the configuration.
   927              async_req (bool): execute request asynchronously
   928  
   929          Returns:
   930              Ref
   931                  If the method is called asynchronously, returns the request
   932                  thread.
   933          """
   934          kwargs['async_req'] = kwargs.get(
   935              'async_req', False
   936          )
   937          kwargs['_return_http_data_only'] = kwargs.get(
   938              '_return_http_data_only', True
   939          )
   940          kwargs['_preload_content'] = kwargs.get(
   941              '_preload_content', True
   942          )
   943          kwargs['_request_timeout'] = kwargs.get(
   944              '_request_timeout', None
   945          )
   946          kwargs['_check_input_type'] = kwargs.get(
   947              '_check_input_type', True
   948          )
   949          kwargs['_check_return_type'] = kwargs.get(
   950              '_check_return_type', True
   951          )
   952          kwargs['_host_index'] = kwargs.get('_host_index')
   953          kwargs['repository'] = \
   954              repository
   955          kwargs['branch'] = \
   956              branch
   957          return self.get_branch_endpoint.call_with_http_info(**kwargs)
   958  
   959      def list_branches(
   960          self,
   961          repository,
   962          **kwargs
   963      ):
   964          """list branches  # noqa: E501
   965  
   966          This method makes a synchronous HTTP request by default. To make an
   967          asynchronous HTTP request, please pass async_req=True
   968  
   969          >>> thread = api.list_branches(repository, async_req=True)
   970          >>> result = thread.get()
   971  
   972          Args:
   973              repository (str):
   974  
   975          Keyword Args:
   976              prefix (str): return items prefixed with this value. [optional]
   977              after (str): return items after this value. [optional]
   978              amount (int): how many items to return. [optional] if omitted the server will use the default value of 100
   979              _return_http_data_only (bool): response data without head status
   980                  code and headers. Default is True.
   981              _preload_content (bool): if False, the urllib3.HTTPResponse object
   982                  will be returned without reading/decoding response data.
   983                  Default is True.
   984              _request_timeout (int/float/tuple): timeout setting for this request. If
   985                  one number provided, it will be total request timeout. It can also
   986                  be a pair (tuple) of (connection, read) timeouts.
   987                  Default is None.
   988              _check_input_type (bool): specifies if type checking
   989                  should be done one the data sent to the server.
   990                  Default is True.
   991              _check_return_type (bool): specifies if type checking
   992                  should be done one the data received from the server.
   993                  Default is True.
   994              _host_index (int/None): specifies the index of the server
   995                  that we want to use.
   996                  Default is read from the configuration.
   997              async_req (bool): execute request asynchronously
   998  
   999          Returns:
  1000              RefList
  1001                  If the method is called asynchronously, returns the request
  1002                  thread.
  1003          """
  1004          kwargs['async_req'] = kwargs.get(
  1005              'async_req', False
  1006          )
  1007          kwargs['_return_http_data_only'] = kwargs.get(
  1008              '_return_http_data_only', True
  1009          )
  1010          kwargs['_preload_content'] = kwargs.get(
  1011              '_preload_content', True
  1012          )
  1013          kwargs['_request_timeout'] = kwargs.get(
  1014              '_request_timeout', None
  1015          )
  1016          kwargs['_check_input_type'] = kwargs.get(
  1017              '_check_input_type', True
  1018          )
  1019          kwargs['_check_return_type'] = kwargs.get(
  1020              '_check_return_type', True
  1021          )
  1022          kwargs['_host_index'] = kwargs.get('_host_index')
  1023          kwargs['repository'] = \
  1024              repository
  1025          return self.list_branches_endpoint.call_with_http_info(**kwargs)
  1026  
  1027      def reset_branch(
  1028          self,
  1029          repository,
  1030          branch,
  1031          reset_creation,
  1032          **kwargs
  1033      ):
  1034          """reset branch  # noqa: E501
  1035  
  1036          This method makes a synchronous HTTP request by default. To make an
  1037          asynchronous HTTP request, please pass async_req=True
  1038  
  1039          >>> thread = api.reset_branch(repository, branch, reset_creation, async_req=True)
  1040          >>> result = thread.get()
  1041  
  1042          Args:
  1043              repository (str):
  1044              branch (str):
  1045              reset_creation (ResetCreation):
  1046  
  1047          Keyword Args:
  1048              _return_http_data_only (bool): response data without head status
  1049                  code and headers. Default is True.
  1050              _preload_content (bool): if False, the urllib3.HTTPResponse object
  1051                  will be returned without reading/decoding response data.
  1052                  Default is True.
  1053              _request_timeout (int/float/tuple): timeout setting for this request. If
  1054                  one number provided, it will be total request timeout. It can also
  1055                  be a pair (tuple) of (connection, read) timeouts.
  1056                  Default is None.
  1057              _check_input_type (bool): specifies if type checking
  1058                  should be done one the data sent to the server.
  1059                  Default is True.
  1060              _check_return_type (bool): specifies if type checking
  1061                  should be done one the data received from the server.
  1062                  Default is True.
  1063              _host_index (int/None): specifies the index of the server
  1064                  that we want to use.
  1065                  Default is read from the configuration.
  1066              async_req (bool): execute request asynchronously
  1067  
  1068          Returns:
  1069              None
  1070                  If the method is called asynchronously, returns the request
  1071                  thread.
  1072          """
  1073          kwargs['async_req'] = kwargs.get(
  1074              'async_req', False
  1075          )
  1076          kwargs['_return_http_data_only'] = kwargs.get(
  1077              '_return_http_data_only', True
  1078          )
  1079          kwargs['_preload_content'] = kwargs.get(
  1080              '_preload_content', True
  1081          )
  1082          kwargs['_request_timeout'] = kwargs.get(
  1083              '_request_timeout', None
  1084          )
  1085          kwargs['_check_input_type'] = kwargs.get(
  1086              '_check_input_type', True
  1087          )
  1088          kwargs['_check_return_type'] = kwargs.get(
  1089              '_check_return_type', True
  1090          )
  1091          kwargs['_host_index'] = kwargs.get('_host_index')
  1092          kwargs['repository'] = \
  1093              repository
  1094          kwargs['branch'] = \
  1095              branch
  1096          kwargs['reset_creation'] = \
  1097              reset_creation
  1098          return self.reset_branch_endpoint.call_with_http_info(**kwargs)
  1099  
  1100      def revert_branch(
  1101          self,
  1102          repository,
  1103          branch,
  1104          revert_creation,
  1105          **kwargs
  1106      ):
  1107          """revert  # noqa: E501
  1108  
  1109          This method makes a synchronous HTTP request by default. To make an
  1110          asynchronous HTTP request, please pass async_req=True
  1111  
  1112          >>> thread = api.revert_branch(repository, branch, revert_creation, async_req=True)
  1113          >>> result = thread.get()
  1114  
  1115          Args:
  1116              repository (str):
  1117              branch (str):
  1118              revert_creation (RevertCreation):
  1119  
  1120          Keyword Args:
  1121              _return_http_data_only (bool): response data without head status
  1122                  code and headers. Default is True.
  1123              _preload_content (bool): if False, the urllib3.HTTPResponse object
  1124                  will be returned without reading/decoding response data.
  1125                  Default is True.
  1126              _request_timeout (int/float/tuple): timeout setting for this request. If
  1127                  one number provided, it will be total request timeout. It can also
  1128                  be a pair (tuple) of (connection, read) timeouts.
  1129                  Default is None.
  1130              _check_input_type (bool): specifies if type checking
  1131                  should be done one the data sent to the server.
  1132                  Default is True.
  1133              _check_return_type (bool): specifies if type checking
  1134                  should be done one the data received from the server.
  1135                  Default is True.
  1136              _host_index (int/None): specifies the index of the server
  1137                  that we want to use.
  1138                  Default is read from the configuration.
  1139              async_req (bool): execute request asynchronously
  1140  
  1141          Returns:
  1142              None
  1143                  If the method is called asynchronously, returns the request
  1144                  thread.
  1145          """
  1146          kwargs['async_req'] = kwargs.get(
  1147              'async_req', False
  1148          )
  1149          kwargs['_return_http_data_only'] = kwargs.get(
  1150              '_return_http_data_only', True
  1151          )
  1152          kwargs['_preload_content'] = kwargs.get(
  1153              '_preload_content', True
  1154          )
  1155          kwargs['_request_timeout'] = kwargs.get(
  1156              '_request_timeout', None
  1157          )
  1158          kwargs['_check_input_type'] = kwargs.get(
  1159              '_check_input_type', True
  1160          )
  1161          kwargs['_check_return_type'] = kwargs.get(
  1162              '_check_return_type', True
  1163          )
  1164          kwargs['_host_index'] = kwargs.get('_host_index')
  1165          kwargs['repository'] = \
  1166              repository
  1167          kwargs['branch'] = \
  1168              branch
  1169          kwargs['revert_creation'] = \
  1170              revert_creation
  1171          return self.revert_branch_endpoint.call_with_http_info(**kwargs)
  1172