def create_repo_body(repo_type=None, compress=True, chunk_size=None, max_restore_bytes_per_sec=None, max_snapshot_bytes_per_sec=None, location=None, bucket=None, region=None, base_path=None, access_key=None, secret_key=None, **kwargs):
 if (not repo_type):
  raise MissingArgument('Missing required parameter --repo_type')
 argdict = locals()
 body = {}
 body['type'] = argdict['repo_type']
 body['settings'] = {}
 settingz = []
 maybes = ['compress', 'chunk_size', 'max_restore_bytes_per_sec', 'max_snapshot_bytes_per_sec']
 s3 = ['bucket', 'region', 'base_path', 'access_key', 'secret_key']
 settingz += [i for i in maybes if argdict[i]]
 if (argdict['repo_type'] == 'fs'):
  settingz.append('location')
 if (argdict['repo_type'] == 's3'):
  settingz += [i for i in s3 if argdict[i]]
 for k in settingz:
  body['settings'][k] = argdict[k]
 return body

def create_repo_body ( repo_type = None , compress = True , chunk_size = None , max_restore_bytes_per_sec = None , max_snapshot_bytes_per_sec = None , location = None , bucket = None , region = None , base_path = None , access_key = None , secret_key = None , ** kwargs ) : if ( not repo_type ) : raise MissingArgument ( 'Missing required parameter --repo_type' ) argdict = locals ( ) body = { } body [ 'type' ] = argdict [ 'repo_type' ] body [ 'settings' ] = { } settingz = [ ] maybes = [ 'compress' , 'chunk_size' , 'max_restore_bytes_per_sec' , 'max_snapshot_bytes_per_sec' ] s3 = [ 'bucket' , 'region' , 'base_path' , 'access_key' , 'secret_key' ] settingz += [ i for i in maybes if argdict [ i ] ] if ( argdict [ 'repo_type' ] == 'fs' ) : settingz . append ( 'location' ) if ( argdict [ 'repo_type' ] == 's3' ) : settingz += [ i for i in s3 if argdict [ i ] ] for k in settingz : body [ 'settings' ] [ k ] = argdict [ k ] return body
build the body portion for use in creating a repository .