text:
# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.

struct FlowcontrolApiserverV1alpha1Api <: SwaggerApi
    client::Swagger.Client
end

function _swaggerinternal_createFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", IoK8sApiFlowcontrolV1alpha1FlowSchema, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas", ["BearerToken"], body)
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

create a FlowSchema
Param: body::IoK8sApiFlowcontrolV1alpha1FlowSchema (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Return: IoK8sApiFlowcontrolV1alpha1FlowSchema
"""
function createFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_createFlowcontrolApiserverV1alpha1FlowSchema(_api, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function createFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_createFlowcontrolApiserverV1alpha1FlowSchema(_api, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_createFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "POST", IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations", ["BearerToken"], body)
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

create a PriorityLevelConfiguration
Param: body::IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Return: IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration
"""
function createFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_createFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function createFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_createFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_deleteFlowcontrolApiserverV1alpha1CollectionFlowSchema(_api::FlowcontrolApiserverV1alpha1Api; pretty=nothing, allowWatchBookmarks=nothing, body=nothing, __continue__=nothing, dryRun=nothing, fieldSelector=nothing, gracePeriodSeconds=nothing, labelSelector=nothing, limit=nothing, orphanDependents=nothing, propagationPolicy=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "DELETE", IoK8sApimachineryPkgApisMetaV1Status, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas", ["BearerToken"], body)
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks)  # type Bool
    Swagger.set_param(_ctx.query, "continue", __continue__)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector)  # type String
    Swagger.set_param(_ctx.query, "gracePeriodSeconds", gracePeriodSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "labelSelector", labelSelector)  # type String
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_param(_ctx.query, "orphanDependents", orphanDependents)  # type Bool
    Swagger.set_param(_ctx.query, "propagationPolicy", propagationPolicy)  # type String
    Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion)  # type String
    Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "watch", watch)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

delete collection of FlowSchema
Param: pretty::String
Param: allowWatchBookmarks::Bool
Param: body::IoK8sApimachineryPkgApisMetaV1DeleteOptions
Param: __continue__::String
Param: dryRun::String
Param: fieldSelector::String
Param: gracePeriodSeconds::Int32
Param: labelSelector::String
Param: limit::Int32
Param: orphanDependents::Bool
Param: propagationPolicy::String
Param: resourceVersion::String
Param: timeoutSeconds::Int32
Param: watch::Bool
Return: IoK8sApimachineryPkgApisMetaV1Status
"""
function deleteFlowcontrolApiserverV1alpha1CollectionFlowSchema(_api::FlowcontrolApiserverV1alpha1Api; pretty=nothing, allowWatchBookmarks=nothing, body=nothing, __continue__=nothing, dryRun=nothing, fieldSelector=nothing, gracePeriodSeconds=nothing, labelSelector=nothing, limit=nothing, orphanDependents=nothing, propagationPolicy=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_deleteFlowcontrolApiserverV1alpha1CollectionFlowSchema(_api; pretty=pretty, allowWatchBookmarks=allowWatchBookmarks, body=body, __continue__=__continue__, dryRun=dryRun, fieldSelector=fieldSelector, gracePeriodSeconds=gracePeriodSeconds, labelSelector=labelSelector, limit=limit, orphanDependents=orphanDependents, propagationPolicy=propagationPolicy, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function deleteFlowcontrolApiserverV1alpha1CollectionFlowSchema(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel; pretty=nothing, allowWatchBookmarks=nothing, body=nothing, __continue__=nothing, dryRun=nothing, fieldSelector=nothing, gracePeriodSeconds=nothing, labelSelector=nothing, limit=nothing, orphanDependents=nothing, propagationPolicy=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_deleteFlowcontrolApiserverV1alpha1CollectionFlowSchema(_api; pretty=pretty, allowWatchBookmarks=allowWatchBookmarks, body=body, __continue__=__continue__, dryRun=dryRun, fieldSelector=fieldSelector, gracePeriodSeconds=gracePeriodSeconds, labelSelector=labelSelector, limit=limit, orphanDependents=orphanDependents, propagationPolicy=propagationPolicy, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_deleteFlowcontrolApiserverV1alpha1CollectionPriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api; pretty=nothing, allowWatchBookmarks=nothing, body=nothing, __continue__=nothing, dryRun=nothing, fieldSelector=nothing, gracePeriodSeconds=nothing, labelSelector=nothing, limit=nothing, orphanDependents=nothing, propagationPolicy=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "DELETE", IoK8sApimachineryPkgApisMetaV1Status, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations", ["BearerToken"], body)
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks)  # type Bool
    Swagger.set_param(_ctx.query, "continue", __continue__)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector)  # type String
    Swagger.set_param(_ctx.query, "gracePeriodSeconds", gracePeriodSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "labelSelector", labelSelector)  # type String
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_param(_ctx.query, "orphanDependents", orphanDependents)  # type Bool
    Swagger.set_param(_ctx.query, "propagationPolicy", propagationPolicy)  # type String
    Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion)  # type String
    Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "watch", watch)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

delete collection of PriorityLevelConfiguration
Param: pretty::String
Param: allowWatchBookmarks::Bool
Param: body::IoK8sApimachineryPkgApisMetaV1DeleteOptions
Param: __continue__::String
Param: dryRun::String
Param: fieldSelector::String
Param: gracePeriodSeconds::Int32
Param: labelSelector::String
Param: limit::Int32
Param: orphanDependents::Bool
Param: propagationPolicy::String
Param: resourceVersion::String
Param: timeoutSeconds::Int32
Param: watch::Bool
Return: IoK8sApimachineryPkgApisMetaV1Status
"""
function deleteFlowcontrolApiserverV1alpha1CollectionPriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api; pretty=nothing, allowWatchBookmarks=nothing, body=nothing, __continue__=nothing, dryRun=nothing, fieldSelector=nothing, gracePeriodSeconds=nothing, labelSelector=nothing, limit=nothing, orphanDependents=nothing, propagationPolicy=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_deleteFlowcontrolApiserverV1alpha1CollectionPriorityLevelConfiguration(_api; pretty=pretty, allowWatchBookmarks=allowWatchBookmarks, body=body, __continue__=__continue__, dryRun=dryRun, fieldSelector=fieldSelector, gracePeriodSeconds=gracePeriodSeconds, labelSelector=labelSelector, limit=limit, orphanDependents=orphanDependents, propagationPolicy=propagationPolicy, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function deleteFlowcontrolApiserverV1alpha1CollectionPriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel; pretty=nothing, allowWatchBookmarks=nothing, body=nothing, __continue__=nothing, dryRun=nothing, fieldSelector=nothing, gracePeriodSeconds=nothing, labelSelector=nothing, limit=nothing, orphanDependents=nothing, propagationPolicy=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_deleteFlowcontrolApiserverV1alpha1CollectionPriorityLevelConfiguration(_api; pretty=pretty, allowWatchBookmarks=allowWatchBookmarks, body=body, __continue__=__continue__, dryRun=dryRun, fieldSelector=fieldSelector, gracePeriodSeconds=gracePeriodSeconds, labelSelector=labelSelector, limit=limit, orphanDependents=orphanDependents, propagationPolicy=propagationPolicy, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_deleteFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, body=nothing, dryRun=nothing, gracePeriodSeconds=nothing, orphanDependents=nothing, propagationPolicy=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "DELETE", IoK8sApimachineryPkgApisMetaV1Status, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas/{name}", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "gracePeriodSeconds", gracePeriodSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "orphanDependents", orphanDependents)  # type Bool
    Swagger.set_param(_ctx.query, "propagationPolicy", propagationPolicy)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

delete a FlowSchema
Param: name::String (required)
Param: pretty::String
Param: body::IoK8sApimachineryPkgApisMetaV1DeleteOptions
Param: dryRun::String
Param: gracePeriodSeconds::Int32
Param: orphanDependents::Bool
Param: propagationPolicy::String
Return: IoK8sApimachineryPkgApisMetaV1Status
"""
function deleteFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, body=nothing, dryRun=nothing, gracePeriodSeconds=nothing, orphanDependents=nothing, propagationPolicy=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_deleteFlowcontrolApiserverV1alpha1FlowSchema(_api, name; pretty=pretty, body=body, dryRun=dryRun, gracePeriodSeconds=gracePeriodSeconds, orphanDependents=orphanDependents, propagationPolicy=propagationPolicy, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function deleteFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String; pretty=nothing, body=nothing, dryRun=nothing, gracePeriodSeconds=nothing, orphanDependents=nothing, propagationPolicy=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_deleteFlowcontrolApiserverV1alpha1FlowSchema(_api, name; pretty=pretty, body=body, dryRun=dryRun, gracePeriodSeconds=gracePeriodSeconds, orphanDependents=orphanDependents, propagationPolicy=propagationPolicy, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_deleteFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, body=nothing, dryRun=nothing, gracePeriodSeconds=nothing, orphanDependents=nothing, propagationPolicy=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "DELETE", IoK8sApimachineryPkgApisMetaV1Status, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations/{name}", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "gracePeriodSeconds", gracePeriodSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "orphanDependents", orphanDependents)  # type Bool
    Swagger.set_param(_ctx.query, "propagationPolicy", propagationPolicy)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

delete a PriorityLevelConfiguration
Param: name::String (required)
Param: pretty::String
Param: body::IoK8sApimachineryPkgApisMetaV1DeleteOptions
Param: dryRun::String
Param: gracePeriodSeconds::Int32
Param: orphanDependents::Bool
Param: propagationPolicy::String
Return: IoK8sApimachineryPkgApisMetaV1Status
"""
function deleteFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, body=nothing, dryRun=nothing, gracePeriodSeconds=nothing, orphanDependents=nothing, propagationPolicy=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_deleteFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name; pretty=pretty, body=body, dryRun=dryRun, gracePeriodSeconds=gracePeriodSeconds, orphanDependents=orphanDependents, propagationPolicy=propagationPolicy, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function deleteFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String; pretty=nothing, body=nothing, dryRun=nothing, gracePeriodSeconds=nothing, orphanDependents=nothing, propagationPolicy=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_deleteFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name; pretty=pretty, body=body, dryRun=dryRun, gracePeriodSeconds=gracePeriodSeconds, orphanDependents=orphanDependents, propagationPolicy=propagationPolicy, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_getFlowcontrolApiserverV1alpha1APIResources(_api::FlowcontrolApiserverV1alpha1Api; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApimachineryPkgApisMetaV1APIResourceList, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/", ["BearerToken"])
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"] : [_mediaType])
    return _ctx
end

"""

get available resources
Return: IoK8sApimachineryPkgApisMetaV1APIResourceList
"""
function getFlowcontrolApiserverV1alpha1APIResources(_api::FlowcontrolApiserverV1alpha1Api; _mediaType=nothing)
    _ctx = _swaggerinternal_getFlowcontrolApiserverV1alpha1APIResources(_api; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function getFlowcontrolApiserverV1alpha1APIResources(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel; _mediaType=nothing)
    _ctx = _swaggerinternal_getFlowcontrolApiserverV1alpha1APIResources(_api; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_listFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api; pretty=nothing, allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiFlowcontrolV1alpha1FlowSchemaList, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas", ["BearerToken"])
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks)  # type Bool
    Swagger.set_param(_ctx.query, "continue", __continue__)  # type String
    Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector)  # type String
    Swagger.set_param(_ctx.query, "labelSelector", labelSelector)  # type String
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion)  # type String
    Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "watch", watch)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

list or watch objects of kind FlowSchema
Param: pretty::String
Param: allowWatchBookmarks::Bool
Param: __continue__::String
Param: fieldSelector::String
Param: labelSelector::String
Param: limit::Int32
Param: resourceVersion::String
Param: timeoutSeconds::Int32
Param: watch::Bool
Return: IoK8sApiFlowcontrolV1alpha1FlowSchemaList
"""
function listFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api; pretty=nothing, allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_listFlowcontrolApiserverV1alpha1FlowSchema(_api; pretty=pretty, allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function listFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel; pretty=nothing, allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_listFlowcontrolApiserverV1alpha1FlowSchema(_api; pretty=pretty, allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_listFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api; pretty=nothing, allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiFlowcontrolV1alpha1PriorityLevelConfigurationList, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations", ["BearerToken"])
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks)  # type Bool
    Swagger.set_param(_ctx.query, "continue", __continue__)  # type String
    Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector)  # type String
    Swagger.set_param(_ctx.query, "labelSelector", labelSelector)  # type String
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion)  # type String
    Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "watch", watch)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

list or watch objects of kind PriorityLevelConfiguration
Param: pretty::String
Param: allowWatchBookmarks::Bool
Param: __continue__::String
Param: fieldSelector::String
Param: labelSelector::String
Param: limit::Int32
Param: resourceVersion::String
Param: timeoutSeconds::Int32
Param: watch::Bool
Return: IoK8sApiFlowcontrolV1alpha1PriorityLevelConfigurationList
"""
function listFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api; pretty=nothing, allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_listFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api; pretty=pretty, allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function listFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel; pretty=nothing, allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_listFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api; pretty=pretty, allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_patchFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", IoK8sApiFlowcontrolV1alpha1FlowSchema, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas/{name}", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_param(_ctx.query, "force", force)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml"] : [_mediaType])
    return _ctx
end

"""

partially update the specified FlowSchema
Param: name::String (required)
Param: body::IoK8sApimachineryPkgApisMetaV1Patch (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Param: force::Bool
Return: IoK8sApiFlowcontrolV1alpha1FlowSchema
"""
function patchFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_patchFlowcontrolApiserverV1alpha1FlowSchema(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, force=force, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function patchFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_patchFlowcontrolApiserverV1alpha1FlowSchema(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, force=force, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_patchFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", IoK8sApiFlowcontrolV1alpha1FlowSchema, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas/{name}/status", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_param(_ctx.query, "force", force)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml"] : [_mediaType])
    return _ctx
end

"""

partially update status of the specified FlowSchema
Param: name::String (required)
Param: body::IoK8sApimachineryPkgApisMetaV1Patch (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Param: force::Bool
Return: IoK8sApiFlowcontrolV1alpha1FlowSchema
"""
function patchFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_patchFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, force=force, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function patchFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_patchFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, force=force, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_patchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations/{name}", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_param(_ctx.query, "force", force)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml"] : [_mediaType])
    return _ctx
end

"""

partially update the specified PriorityLevelConfiguration
Param: name::String (required)
Param: body::IoK8sApimachineryPkgApisMetaV1Patch (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Param: force::Bool
Return: IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration
"""
function patchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_patchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, force=force, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function patchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_patchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, force=force, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_patchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PATCH", IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations/{name}/status", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_param(_ctx.query, "force", force)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml"] : [_mediaType])
    return _ctx
end

"""

partially update status of the specified PriorityLevelConfiguration
Param: name::String (required)
Param: body::IoK8sApimachineryPkgApisMetaV1Patch (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Param: force::Bool
Return: IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration
"""
function patchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_patchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, force=force, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function patchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, force=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_patchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, force=force, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_readFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, exact=nothing, __export__=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiFlowcontrolV1alpha1FlowSchema, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas/{name}", ["BearerToken"])
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "exact", exact)  # type Bool
    Swagger.set_param(_ctx.query, "export", __export__)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

read the specified FlowSchema
Param: name::String (required)
Param: pretty::String
Param: exact::Bool
Param: __export__::Bool
Return: IoK8sApiFlowcontrolV1alpha1FlowSchema
"""
function readFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, exact=nothing, __export__=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_readFlowcontrolApiserverV1alpha1FlowSchema(_api, name; pretty=pretty, exact=exact, __export__=__export__, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function readFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String; pretty=nothing, exact=nothing, __export__=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_readFlowcontrolApiserverV1alpha1FlowSchema(_api, name; pretty=pretty, exact=exact, __export__=__export__, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_readFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiFlowcontrolV1alpha1FlowSchema, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas/{name}/status", ["BearerToken"])
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

read status of the specified FlowSchema
Param: name::String (required)
Param: pretty::String
Return: IoK8sApiFlowcontrolV1alpha1FlowSchema
"""
function readFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_readFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api, name; pretty=pretty, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function readFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String; pretty=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_readFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api, name; pretty=pretty, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_readFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, exact=nothing, __export__=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations/{name}", ["BearerToken"])
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "exact", exact)  # type Bool
    Swagger.set_param(_ctx.query, "export", __export__)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

read the specified PriorityLevelConfiguration
Param: name::String (required)
Param: pretty::String
Param: exact::Bool
Param: __export__::Bool
Return: IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration
"""
function readFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, exact=nothing, __export__=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_readFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name; pretty=pretty, exact=exact, __export__=__export__, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function readFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String; pretty=nothing, exact=nothing, __export__=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_readFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name; pretty=pretty, exact=exact, __export__=__export__, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_readFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations/{name}/status", ["BearerToken"])
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

read status of the specified PriorityLevelConfiguration
Param: name::String (required)
Param: pretty::String
Return: IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration
"""
function readFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String; pretty=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_readFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api, name; pretty=pretty, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function readFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String; pretty=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_readFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api, name; pretty=pretty, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_replaceFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", IoK8sApiFlowcontrolV1alpha1FlowSchema, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas/{name}", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

replace the specified FlowSchema
Param: name::String (required)
Param: body::IoK8sApiFlowcontrolV1alpha1FlowSchema (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Return: IoK8sApiFlowcontrolV1alpha1FlowSchema
"""
function replaceFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_replaceFlowcontrolApiserverV1alpha1FlowSchema(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function replaceFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_replaceFlowcontrolApiserverV1alpha1FlowSchema(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_replaceFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", IoK8sApiFlowcontrolV1alpha1FlowSchema, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas/{name}/status", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

replace status of the specified FlowSchema
Param: name::String (required)
Param: body::IoK8sApiFlowcontrolV1alpha1FlowSchema (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Return: IoK8sApiFlowcontrolV1alpha1FlowSchema
"""
function replaceFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_replaceFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function replaceFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_replaceFlowcontrolApiserverV1alpha1FlowSchemaStatus(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_replaceFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations/{name}", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

replace the specified PriorityLevelConfiguration
Param: name::String (required)
Param: body::IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Return: IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration
"""
function replaceFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_replaceFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function replaceFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_replaceFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_replaceFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "PUT", IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations/{name}/status", ["BearerToken"], body)
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "dryRun", dryRun)  # type String
    Swagger.set_param(_ctx.query, "fieldManager", fieldManager)  # type String
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

replace status of the specified PriorityLevelConfiguration
Param: name::String (required)
Param: body::IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration (required)
Param: pretty::String
Param: dryRun::String
Param: fieldManager::String
Return: IoK8sApiFlowcontrolV1alpha1PriorityLevelConfiguration
"""
function replaceFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api::FlowcontrolApiserverV1alpha1Api, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_replaceFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function replaceFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String, body; pretty=nothing, dryRun=nothing, fieldManager=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_replaceFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus(_api, name, body; pretty=pretty, dryRun=dryRun, fieldManager=fieldManager, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_watchFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApimachineryPkgApisMetaV1WatchEvent, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/watch/flowschemas/{name}", ["BearerToken"])
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks)  # type Bool
    Swagger.set_param(_ctx.query, "continue", __continue__)  # type String
    Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector)  # type String
    Swagger.set_param(_ctx.query, "labelSelector", labelSelector)  # type String
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion)  # type String
    Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "watch", watch)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

watch changes to an object of kind FlowSchema. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
Param: name::String (required)
Param: allowWatchBookmarks::Bool
Param: __continue__::String
Param: fieldSelector::String
Param: labelSelector::String
Param: limit::Int32
Param: pretty::String
Param: resourceVersion::String
Param: timeoutSeconds::Int32
Param: watch::Bool
Return: IoK8sApimachineryPkgApisMetaV1WatchEvent
"""
function watchFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, name::String; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_watchFlowcontrolApiserverV1alpha1FlowSchema(_api, name; allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, pretty=pretty, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function watchFlowcontrolApiserverV1alpha1FlowSchema(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_watchFlowcontrolApiserverV1alpha1FlowSchema(_api, name; allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, pretty=pretty, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_watchFlowcontrolApiserverV1alpha1FlowSchemaList(_api::FlowcontrolApiserverV1alpha1Api; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApimachineryPkgApisMetaV1WatchEvent, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/watch/flowschemas", ["BearerToken"])
    Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks)  # type Bool
    Swagger.set_param(_ctx.query, "continue", __continue__)  # type String
    Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector)  # type String
    Swagger.set_param(_ctx.query, "labelSelector", labelSelector)  # type String
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion)  # type String
    Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "watch", watch)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

watch individual changes to a list of FlowSchema. deprecated: use the 'watch' parameter with a list operation instead.
Param: allowWatchBookmarks::Bool
Param: __continue__::String
Param: fieldSelector::String
Param: labelSelector::String
Param: limit::Int32
Param: pretty::String
Param: resourceVersion::String
Param: timeoutSeconds::Int32
Param: watch::Bool
Return: IoK8sApimachineryPkgApisMetaV1WatchEvent
"""
function watchFlowcontrolApiserverV1alpha1FlowSchemaList(_api::FlowcontrolApiserverV1alpha1Api; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_watchFlowcontrolApiserverV1alpha1FlowSchemaList(_api; allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, pretty=pretty, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function watchFlowcontrolApiserverV1alpha1FlowSchemaList(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_watchFlowcontrolApiserverV1alpha1FlowSchemaList(_api; allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, pretty=pretty, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_watchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApimachineryPkgApisMetaV1WatchEvent, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/watch/prioritylevelconfigurations/{name}", ["BearerToken"])
    Swagger.set_param(_ctx.path, "name", name)  # type String
    Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks)  # type Bool
    Swagger.set_param(_ctx.query, "continue", __continue__)  # type String
    Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector)  # type String
    Swagger.set_param(_ctx.query, "labelSelector", labelSelector)  # type String
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion)  # type String
    Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "watch", watch)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

watch changes to an object of kind PriorityLevelConfiguration. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
Param: name::String (required)
Param: allowWatchBookmarks::Bool
Param: __continue__::String
Param: fieldSelector::String
Param: labelSelector::String
Param: limit::Int32
Param: pretty::String
Param: resourceVersion::String
Param: timeoutSeconds::Int32
Param: watch::Bool
Return: IoK8sApimachineryPkgApisMetaV1WatchEvent
"""
function watchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, name::String; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_watchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name; allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, pretty=pretty, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function watchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel, name::String; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_watchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration(_api, name; allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, pretty=pretty, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_watchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationList(_api::FlowcontrolApiserverV1alpha1Api; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", IoK8sApimachineryPkgApisMetaV1WatchEvent, "/apis/flowcontrol.apiserver.k8s.io/v1alpha1/watch/prioritylevelconfigurations", ["BearerToken"])
    Swagger.set_param(_ctx.query, "allowWatchBookmarks", allowWatchBookmarks)  # type Bool
    Swagger.set_param(_ctx.query, "continue", __continue__)  # type String
    Swagger.set_param(_ctx.query, "fieldSelector", fieldSelector)  # type String
    Swagger.set_param(_ctx.query, "labelSelector", labelSelector)  # type String
    Swagger.set_param(_ctx.query, "limit", limit)  # type Int32
    Swagger.set_param(_ctx.query, "pretty", pretty)  # type String
    Swagger.set_param(_ctx.query, "resourceVersion", resourceVersion)  # type String
    Swagger.set_param(_ctx.query, "timeoutSeconds", timeoutSeconds)  # type Int32
    Swagger.set_param(_ctx.query, "watch", watch)  # type Bool
    Swagger.set_header_accept(_ctx, ["application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["*/*"] : [_mediaType])
    return _ctx
end

"""

watch individual changes to a list of PriorityLevelConfiguration. deprecated: use the 'watch' parameter with a list operation instead.
Param: allowWatchBookmarks::Bool
Param: __continue__::String
Param: fieldSelector::String
Param: labelSelector::String
Param: limit::Int32
Param: pretty::String
Param: resourceVersion::String
Param: timeoutSeconds::Int32
Param: watch::Bool
Return: IoK8sApimachineryPkgApisMetaV1WatchEvent
"""
function watchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationList(_api::FlowcontrolApiserverV1alpha1Api; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_watchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationList(_api; allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, pretty=pretty, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function watchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationList(_api::FlowcontrolApiserverV1alpha1Api, response_stream::Channel; allowWatchBookmarks=nothing, __continue__=nothing, fieldSelector=nothing, labelSelector=nothing, limit=nothing, pretty=nothing, resourceVersion=nothing, timeoutSeconds=nothing, watch=nothing, _mediaType=nothing)
    _ctx = _swaggerinternal_watchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationList(_api; allowWatchBookmarks=allowWatchBookmarks, __continue__=__continue__, fieldSelector=fieldSelector, labelSelector=labelSelector, limit=limit, pretty=pretty, resourceVersion=resourceVersion, timeoutSeconds=timeoutSeconds, watch=watch, _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export createFlowcontrolApiserverV1alpha1FlowSchema, createFlowcontrolApiserverV1alpha1PriorityLevelConfiguration, deleteFlowcontrolApiserverV1alpha1CollectionFlowSchema, deleteFlowcontrolApiserverV1alpha1CollectionPriorityLevelConfiguration, deleteFlowcontrolApiserverV1alpha1FlowSchema, deleteFlowcontrolApiserverV1alpha1PriorityLevelConfiguration, getFlowcontrolApiserverV1alpha1APIResources, listFlowcontrolApiserverV1alpha1FlowSchema, listFlowcontrolApiserverV1alpha1PriorityLevelConfiguration, patchFlowcontrolApiserverV1alpha1FlowSchema, patchFlowcontrolApiserverV1alpha1FlowSchemaStatus, patchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration, patchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus, readFlowcontrolApiserverV1alpha1FlowSchema, readFlowcontrolApiserverV1alpha1FlowSchemaStatus, readFlowcontrolApiserverV1alpha1PriorityLevelConfiguration, readFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus, replaceFlowcontrolApiserverV1alpha1FlowSchema, replaceFlowcontrolApiserverV1alpha1FlowSchemaStatus, replaceFlowcontrolApiserverV1alpha1PriorityLevelConfiguration, replaceFlowcontrolApiserverV1alpha1PriorityLevelConfigurationStatus, watchFlowcontrolApiserverV1alpha1FlowSchema, watchFlowcontrolApiserverV1alpha1FlowSchemaList, watchFlowcontrolApiserverV1alpha1PriorityLevelConfiguration, watchFlowcontrolApiserverV1alpha1PriorityLevelConfigurationList


text:
using Documenter
using SExpressions

makedocs(
    format = Documenter.HTML(analytics="UA-68884109-1"),
    sitename = "SExpressions.jl",
    authors = "Fengyang Wang",
    pages = [
        "index.md"
    ]
)

deploydocs(
    repo   = "github.com/TotalVerb/SExpressions.jl.git",
    target = "build",
    deps   = nothing,
    make   = nothing,
)

ext: jl


text:
getindex(g::MetaGraph) = g.gprops

function getindex(g::MetaGraph, label)
    _, val = g.vprops[label]
    val
end

getindex(g::MetaGraph, label_1, label_2) = g.eprops[arrange(g, label_1, label_2)]

"""
    haskey(g, :label)

Determine whether a graph `g` contains the vertex `:label`.
"""
haskey(g::MetaGraph, label) = haskey(g.vprops, label)

"""
    haskey(g, :v1, :v2)

Determine whether a graph `g` contains an edge from `:v1` to `:v2`. The order of `:v1` and `:v2` only matters if `g` is a digraph.
"""
function haskey(g::MetaGraph, label_1, label_2)
    return (
        haskey(g, label_1) &&
        haskey(g, label_2) &&
        haskey(g.eprops, arrange(g, label_1, label_2))
    )
end

function setindex!(g::MetaGraph, val, label)
    vprops = g.vprops
    v = if haskey(vprops, label)
        (v, _) = vprops[label]
        v
    else
        add_vertex!(g.graph)
        v = nv(g)
        g.metaindex[v] = label
        v
    end
    vprops[label] = (v, val)
    return nothing
end

function setindex!(g::MetaGraph, val, label_1, label_2)
    vprops = g.vprops
    u, _ = vprops[label_1]
    v, _ = vprops[label_2]
    add_edge!(g.graph, u, v)
    g.eprops[arrange(g, label_1, label_2, u, v)] = val
    return nothing
end

function delete!(g::MetaGraph, label)
    if haskey(g, label)
        v, _ = g.vprops[label]
        _rem_vertex!(g, label, v)
    end
    return nothing
end

function delete!(g::MetaGraph, label_1, label_2)
    vprops = g.vprops
    u, _ = vprops[label_1]
    v, _ = vprops[label_2]
    rem_edge!(g.graph, u, v)
    delete!(g.eprops, arrange(g, label_1, label_2, u, v))
    return nothing
end

function _copy_props!(oldg::T, newg::T, vmap) where {T<:MetaGraph}
    for (newv, oldv) in enumerate(vmap)
        oldl = oldg.metaindex[oldv]
        _, meta = oldg.vprops[oldl]
        newg.metaindex[newv] = oldl
        newg.vprops[oldl] = (newv, meta)
    end
    for newe in edges(newg.graph)
        metaindex = newg.metaindex
        u, v = Tuple(newe)
        label_1 = metaindex[u]
        label_2 = metaindex[v]
        newg.eprops[arrange(newg, label_1, label_2, u, v)] =
            oldg.eprops[arrange(oldg, label_1, label_2)]
    end
    return nothing
end

# TODO - would be nice to be able to apply a function to properties. Not sure
# how this might work, but if the property is a vector, a generic way to append to
# it would be a good thing.

"""
    code_for(meta::MetaGraph, vertex_label)

Find the code associated with a `vertex_label`. This can be useful to pass to methods inherited from `LightGraphs`. Note, however, that vertex codes could be
reassigned after vertex deletion.
"""
function code_for(meta::MetaGraph, vertex_label)
    code, _ = meta.vprops[vertex_label]
    code
end

"""
    label_for(meta::MetaGraph, vertex_code)

Find the label associated with a `vertex_code`. This can be useful to interpret the results of methods inherited from `LightGraphs`. Note, however, that vertex codes could be reassigned after vertex deletion.
"""
function label_for(meta::MetaGraph, vertex_code)
    meta.metaindex[vertex_code]
end


text:
export map_to

"""
    map_to(value::T) where T

Creates a map operator, which emits the given constant value on the output Observable every time the source Observable emits a value.

# Arguments
- `value::T`: the constant value to map each source value to

# Producing

Stream of type `<: Subscribable{T}`

# Examples
```jldoctest
using Rocket

source = from([ 1, 2, 3 ])
subscribe!(source |> map_to('a'), logger())
;

# output

[LogActor] Data: a
[LogActor] Data: a
[LogActor] Data: a
[LogActor] Completed
```

See also: [`map`](@ref), [`AbstractOperator`](@ref), [`RightTypedOperator`](@ref), [`ProxyObservable`](@ref), [`logger`](@ref)
"""
map_to(value::T) where T = map(T, _ -> value)


text:
export Unscented

struct Unscented <: AbstractNonLinearApproximation
    L   :: Int64
    α   :: Float64
    β   :: Float64
    κ   :: Float64
    λ   :: Float64
    Wm  :: Vector{Float64}
    Wc  :: Vector{Float64}
end

function Unscented(dim::Int64; α::Float64=1e-3, β::Float64=2.0, κ::Float64=0.0)
    λ = α^2*(dim + κ) - dim
    Wm = ones(2*dim + 1)
    Wc = ones(2*dim + 1)
    Wm ./= (2*(dim+λ))
    Wc ./= (2*(dim+λ))
    Wm[1] = λ/(dim+λ)
    Wc[1] = λ/(dim+λ) + (1 - α^2 + β)
    return Unscented(dim, α, β, κ, λ, Wm, Wc)
end

# get-functions for the Unscented structure
getL(approximation::Unscented)  = approximation.L
getα(approximation::Unscented)  = approximation.α
getβ(approximation::Unscented)  = approximation.β
getκ(approximation::Unscented)  = approximation.κ
getλ(approximation::Unscented)  = approximation.λ
getWm(approximation::Unscented) = approximation.Wm
getWc(approximation::Unscented) = approximation.Wc


text:
using Documenter
using DataFrameMacros

makedocs(
    sitename = "DataFrameMacros.jl",
    format = Documenter.HTML(),
)

# Documenter can also automatically deploy documentation to gh-pages.
# See "Hosting Documentation" and deploydocs() in the Documenter manual
# for more information.
deploydocs(
    repo = "github.com/jkrumbiegel/DataFrameMacros.jl.git",
    push_preview = true,
)


text:
deg(A::AbstractArray{Pol{T}, N}) where {T<:Number, N} = maximum(deg.(A))
deg(A::AbstractArray{T, N}) where {T<:Number, N} = 0

lc(P::AbstractArray{Pol{T}, N}) where {T<:Number, N} = coeff(P, deg(P))
lc(P::AbstractArray{T, N}) where {T<:Number, N} = P

coeff(A::AbstractArray{Pol{T}, N}, k::Int) where {T<:Number, N} = coeff.(A, k)

function rev(P::AbstractArray{Pol{T}, N}) where {T<:Number, N}
    res = zero(P)
    for i in 0:deg(P)
        res += Pol([0, 1])^(deg(P)-i)*coeff(P, i)
    end
    return res
end

subs(P::AbstractArray{Pol{T}, N}, val::S) where {T,S<:Number, N} = subs.(P, val)

Base.:+(A::AbstractArray{Pol{T}, N}, b::Number) where {T<:Number, N} = A .+ b
Base.:+(b::Number, A::AbstractArray{Pol{T}, N}) where {T<:Number, N} = b .+ A

Base.:-(A::AbstractArray{Pol{T}, N}, b::Number) where {T<:Number, N} = A .- b
Base.:-(b::Number, A::AbstractArray{Pol{T}, N}) where {T<:Number, N} = b .- A

for op in (:+, :-, :*)
    @eval Base.$op(A::AbstractArray, b::Pol) = [$op(a, b) for a in A]
    @eval Base.$op(b::Pol, A::AbstractArray) = [$op(b, a) for a in A]
end

"""
computes the companion pencil Bx-A of the polynomial matrix P
"""
function toPencil(P::AbstractArray{Pol{T}, N}) where {T<:Number, N}
    k = deg(P)

    m = size(P, 1)
    n = size(P, 2)

    # patological case of polynomial of degree zero
    if iszero(k)
        B = zeros(T, m, n)
        A = hcat(-coeff(P, 0)) # ensure array is 2-dimensional
        return A, B
    end

    A = zeros(T, (k-1)*n+m, k*n)
    B = zeros(T, (k-1)*n+m, k*n)
    B[1:m, 1:n] = lc(P)
    B[m+1:end, n+1:end] = Matrix(I, (k-1)*n, (k-1)*n)
    A[m+1:end, 1:(k-1)*n] = Matrix(I, (k-1)*n, (k-1)*n)
    @inbounds for i in 1:k
        A[1:m, (i-1)*n+1:i*n] = -coeff(P, k-i)
    end
    return A, B
end

function toPencil(P::AbstractArray{T, N}) where {T<:Number, N}
    m = size(P, 1)
    n = size(P, 2)
    B = zeros(T, m, n)
    A = hcat(-P)
    return A, B
end

function polrank(M::AbstractArray{Pol{T}, N}, tol=0.0) where {T<:Number, N}
    rnk  = 0
    imax = deg(M)*min(size(M)...)
    for i=1:imax
        rnk = max(rnk, rank(subs(M, i), atol=tol))
    end
    return rnk
end


text:
############################################################
## joAbstractDAparallelLinearOperator - extra functions

# elements(jo)
elements(A::joAbstractDAparallelLinearOperator{DDT,RDT}) where {DDT,RDT} = A*jo_eye(DDT,A.n)

# hasinverse(jo)
hasinverse(A::joAbstractDAparallelLinearOperator{DDT,RDT}) where {DDT,RDT} = !isnull(A.iop)

# issquare(jo)
issquare(A::joAbstractDAparallelLinearOperator{DDT,RDT}) where {DDT,RDT} = (A.m == A.n)

# istall(jo)
istall(A::joAbstractDAparallelLinearOperator{DDT,RDT}) where {DDT,RDT} = (A.m > A.n)

# iswide(jo)
iswide(A::joAbstractDAparallelLinearOperator{DDT,RDT}) where {DDT,RDT} = (A.m < A.n)

# iscomplex(jo)
iscomplex(A::joAbstractDAparallelLinearOperator{DDT,RDT}) where {DDT,RDT} = !(DDT<:Real && RDT<:Real)

# islinear(jo)
#function islinear(A::joAbstractDAparallelLinearOperator{DDT,RDT},samples::Integer=3;tol::Float64=0.,verbose::Bool=false) where {DDT,RDT}
#end

# isadjoint(jo)
#function isadjoint(A::joAbstractDAparallelLinearOperator{DDT,RDT},samples::Integer=3;tol::Float64=0.,normfactor::Real=1.,userange::Bool=false,verbose::Bool=false) where {DDT,RDT}
#end


text:
function Base.eps(x::arb)
    parent(x)(2)^(-(precision(parent(x)) - 1))
end

function Base.eps(RR::ArbField)
    RR(2)^(-(precision(RR) - 1))
end

function isnan(x::arb)
    x_mid = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), x)
    0 != ccall(("arf_is_nan", Nemo.libarb), Cint, (Ref{Nemo.arf_struct},), x_mid)
end

function inf(x::arb)
    y = parent(x)(0)
    ccall(("arb_pos_inf", Nemo.libarb), Cvoid, (Ref{arb},), y)
    y
end

function posinf(x::arb)
    y = parent(x)(0)
    ccall(("arb_pos_inf", Nemo.libarb), Cvoid, (Ref{arb},), y)
    y
end

function neginf(x::arb)
    y = parent(x)(0)
    ccall(("arb_neg_inf", Nemo.libarb), Cvoid, (Ref{arb},), y)
    y
end

"""
    max(x::arb, y::arb)
> Return a ball containing the maximum of x and y.
"""
function Base.max(x::arb, y::arb)
    z = parent(x)()
    ccall((:arb_max, Nemo.libarb), Nothing,
          (Ref{arb}, Ref{arb}, Ref{arb}, Int), z, x, y, precision(parent(x)))
    return z
end

"""
    min(x::arb, y::arb)
> Return a ball containing the minimum of x and y.
"""
function Base.min(x::arb, y::arb)
    z = parent(x)()
    ccall((:arb_min, Nemo.libarb), Nothing,
          (Ref{arb}, Ref{arb}, Ref{arb}, Int), z, x, y, precision(parent(x)))
    return z
end

"""
    setinterval(x::arb, y::arb)
> Return a ball containing the interval [x,y].
"""
function setinterval(x::arb, y::arb)
    z = parent(x)()
    x_lower = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), lbound(x))
    y_upper = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), ubound(y))
    ccall((:arb_set_interval_arf, Nemo.libarb), Cvoid,
          (Ref{arb}, Ptr{Nemo.arf_struct}, Ptr{Nemo.arf_struct}, Int),
          z, x_lower, y_upper, precision(parent(x)))
    return z
end

"""
    getinterval(x::arb)
    getinterval(::Type{arb}, x::arb)
> Return an interval [a,b] containing the ball x.
"""
function getinterval(x::arb)
    getinterval(arb, x)
end

function getinterval(::Type{arb}, x::arb)
    a, b = x.parent(), x.parent()
    a_mid = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), a)
    b_mid = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), b)
    ccall((:arb_get_interval_arf, Nemo.libarb), Cvoid,
          (Ptr{Nemo.arf_struct}, Ptr{Nemo.arf_struct}, Ref{arb}, Clong),
          a_mid, b_mid, x, precision(parent(x)))

    (a, b)
end

"""
    getinterval(::Type{BigFloat}, x::arb)
> Return an interval [a,b] containing the ball x.
"""
function getinterval(::Type{BigFloat}, x::arb)
    a, b = BigFloat(), BigFloat()
    ccall((:arb_get_interval_mpfr, Nemo.libarb), Cvoid,
          (Ref{BigFloat}, Ref{BigFloat}, Ref{arb}),
          a, b, x)

    (a, b)
end

"""
    convert(::Type{BigFloat}, x::arb)
> Return the midpoint of x as a BigFloat rounded down to the current
  precision of BigFloat.
"""
function BigFloat(x::arb)
    GC.@preserve x begin
        t = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), x)
        # 4 == round to nearest
        m = BigFloat()
        ccall((:arf_get_mpfr, Nemo.libarb), Float64,
              (Ref{BigFloat}, Ptr{Nemo.arf_struct}, Base.MPFR.MPFRRoundingMode),
              m, t, Base.MPFR.MPFRRoundNearest)
    end
    return m
end

"""
    convert(::Type{BigFloat}, x::arb)
> Return the midpoint of x as a BigFloat rounded down to the current
  precision of BigFloat.
"""
function Base.convert(::Type{BigFloat}, x::arb)
    return BigFloat(x)
end

"""
    rel_accuracy_bits(x)
> Compute the relatively accuracy of the ball `x` in bits.
"""
function rel_accuracy_bits(x::arb)
    ccall(("arb_rel_accuracy_bits", Nemo.libarb), Int,
          (Ref{arb},), x)
end

"""
    atan(x::arb, y::arb)
> Return atan(x, y) = arg(x + yi).
"""
function atan(x::arb, y::arb)
    z = parent(x)()
    ccall((:arb_atan2, Nemo.libarb), Nothing,
          (Ref{arb}, Ref{arb}, Ref{arb}, Int), z, x, y, precision(parent(x)))
    return z
end

function arb_dump(x::arb)
    cstr = ccall((:arb_dump_str, Nemo.libarb), Ptr{UInt8}, (Ref{arb},),
                 x)

    unsafe_string(cstr)
end

function arb_load_dump(str::String, r::ArbField)
    x = r()
    err = ccall((:arb_load_str, Nemo.libarb), Int32, (Ref{arb}, Ptr{UInt8}),
                x, str)
    err == 0 || Throw(error("Invalid string $str"))
    x
end

function format_arb(x::arb, digits::Int)
    cstr = ccall((:arb_get_str, Nemo.libarb), Ptr{UInt8}, (Ref{arb}, Int, UInt),
                 x, digits, UInt(0))
    str = unsafe_string(cstr)
    ccall((:flint_free, Nemo.libflint), Nothing, (Ptr{UInt8},), cstr)
    return str
end

function add_error!(x::arb, error::arb)
    ccall((:arb_add_error, Nemo.libarb), Nothing, (Ref{arb}, Ref{arb}), x, error)
    return x
end

function abs_ubound(x::arb)
    res = parent(x)()
    GC.@preserve x begin
        t = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), res)
        ccall((:arb_get_abs_ubound_arf, Nemo.libarb), Nothing, (Ptr{Nemo.arf_struct}, Ref{arb}, Int),
              t, x, precision(parent(x)))
    end
    return res
end

function abs_lbound(x::arb)
    res = parent(x)()
    GC.@preserve x begin
        t = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), res)
        ccall((:arb_get_abs_lbound_arf, Nemo.libarb), Nothing, (Ptr{Nemo.arf_struct}, Ref{arb}, Int),
              t, x, precision(parent(x)))
    end
    return res
end

function ubound(x::arb)
    res = parent(x)()
    GC.@preserve x begin
        t = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), res)
        ccall((:arb_get_ubound_arf, Nemo.libarb), Nothing, (Ptr{Nemo.arf_struct}, Ref{arb}, Int),
              t, x, precision(parent(x)))
    end
    return res
end

function lbound(x::arb)
    res = parent(x)()
    GC.@preserve x begin
        t = ccall((:arb_mid_ptr, Nemo.libarb), Ptr{Nemo.arf_struct}, (Ref{arb}, ), res)
        ccall((:arb_get_lbound_arf, Nemo.libarb), Nothing, (Ptr{Nemo.arf_struct}, Ref{arb}, Int),
              t, x, precision(parent(x)))
    end
    return res
end


text:
# Annotations related to GeneOntology
# http://geneontology.org/page/go-annotation-file-gaf-format-20

# Spec of annotation record (copied from GO Annotation File (GAF) Format 2.0)
#
#  Column    Content                         Required?   Cardinality     Example
# -------------------------------------------------------------------------------------
#  1         DB                              required    1               UniProtKB
#  2         DB Object ID                    required    1               P12345
#  3         DB Object Symbol                required    1               PHO3
#  4         Qualifier                       optional    0 or greater    NOT
#  5         GO ID                           required    1               GO:0003993
#  6         DB:Reference (|DB:Reference)    required    1 or greater    PMID:2676709
#  7         Evidence Code                   required    1               IMP
#  8         With (or) From                  optional    0 or greater    GO:0000346
#  9         Aspect                          required    1               F
#  10        DB Object Name                  optional    0 or 1          Toll-like receptor 4
#  11        DB Object Synonym (|Synonym)    optional    0 or greater    hToll|Tollbooth
#  12        DB Object Type                  required    1               protein
#  13        Taxon(|taxon)                   required    1 or 2          taxon:9606
#  14        Date                            required    1               20090118
#  15        Assigned By                     required    1               SGD
#  16        Annotation Extension            optional    0 or greater    part_of(CL:0000576)
#  17        Gene Product Form ID            optional    0 or 1          UniProtKB:P12345-2

type AnnotationRecord
    db::ASCIIString
    db_object_id::ASCIIString
    db_object_symbol::ASCIIString
    qualifier::Vector{ASCIIString}
    go_id::TermID
    db_reference::Vector{ASCIIString}
    evidence_code::ASCIIString
    with_or_from::Vector{ASCIIString}
    aspect::RootOntology
    db_object_name::Union(ASCIIString,Nothing)
    db_object_synonym::Vector{ASCIIString}
    db_object_type::ASCIIString
    taxon::Vector{ASCIIString}
    date::ASCIIString
    assigned_by::ASCIIString
    annotation_extension::Vector{String}
    gene_product_form::Union(ASCIIString,Nothing)
end

Base.show(io::IO, annot::AnnotationRecord) = @printf io "AnnotationRecord(\"%s\", \"%s\", \"%s\")" annot.db annot.db_object_id annot.go_id


text:
"""
    ArrayManifold{M <: Manifold} <: Manifold

A manifold to encapsulate manifolds working on array representations of
`MPoints` and `TVectors` in a transparent way, such that for these manifolds its
not necessary to introduce explicit types for the points and tangent vectors,
but they are encapusalted/stripped automatically when needed.
"""
struct ArrayManifold{M <: Manifold} <: Manifold
    manifold::M
end
convert(::Type{M},m::ArrayManifold{M}) where M <: Manifold = m.manifold
convert(::Type{ArrayManifold{M}},m::M) where M <: Manifold = ArrayManifold(M)

manifold_dimension(M::ArrayManifold) = manifold_dimension(M.manifold)

@traitimpl IsDecoratorManifold{ArrayManifold}

struct ArrayMPoint{V <: AbstractArray{<:Number}} <: MPoint
    value::V
end
convert(::Type{V},x::ArrayMPoint{V}) where V <: AbstractArray{<:Number} = x.value
convert(::Type{ArrayMPoint{V}},x::V) where V <: AbstractArray{<:Number} = ArrayPoint{V}(x)
eltype(::Type{ArrayMPoint{V}}) where V = eltype(V)
similar(x::ArrayMPoint) = ArrayMPoint(similar(x.value))
similar(x::ArrayMPoint, ::Type{T}) where T = ArrayMPoint(similar(x.value, T))

struct ArrayTVector{V <: AbstractArray{<:Number}} <: TVector
    value::V
end
convert(::Type{V},v::ArrayTVector{V}) where V <: AbstractArray{<:Number} = v.value
convert(::Type{ArrayTVector{V}},v::V) where V <: AbstractArray{<:Number} = ArrayTVector{V}(v)
eltype(::Type{ArrayTVector{V}}) where V = eltype(V)
similar(x::ArrayTVector) = ArrayTVector(similar(x.value))
similar(x::ArrayTVector, ::Type{T}) where T = ArrayTVector(similar(x.value, T))

array_value(x::AbstractArray) = x
array_value(x::ArrayMPoint) = x.value
array_value(v::ArrayTVector) = v.value

(+)(v1::ArrayTVector, v2::ArrayTVector) = ArrayTVector(v1.value + v2.value)
(-)(v1::ArrayTVector, v2::ArrayTVector) = ArrayTVector(v1.value - v2.value)
(-)(v::ArrayTVector) = ArrayTVector(-v.value)
(*)(a::Number, v::ArrayTVector) = ArrayTVector(a*v.value)

function isapprox(M::ArrayManifold, x, y; kwargs...)
    is_manifold_point(M, x; kwargs...)
    is_manifold_point(M, y; kwargs...)
    return isapprox(M.manifold, array_value(x), array_value(y); kwargs...)
end

function isapprox(M::ArrayManifold, x, v, w; kwargs...)
    is_manifold_point(M, x; kwargs...)
    is_tangent_vector(M, x, v; kwargs...)
    is_tangent_vector(M, x, w; kwargs...)
    return isapprox(M.manifold, array_value(x), array_value(v), array_value(w); kwargs...)
end

function project_tangent!(M::ArrayManifold, w, x, v; kwargs...)
    is_manifold_point(M, x; kwargs...)
    project_tangent!(M.manifold, w.value, array_value(x), array_value(v))
    is_tangent_vector(M, x, w; kwargs...)
    return w
end

function distance(M::ArrayManifold, x, y; kwargs...)
    is_manifold_point(M, x; kwargs...)
    is_manifold_point(M, y; kwargs...)
    return distance(M.manifold, array_value(x), array_value(y))
end

function inner(M::ArrayManifold, x, v, w; kwargs...)
    is_manifold_point(M, x; kwargs...)
    is_tangent_vector(M, x, v; kwargs...)
    is_tangent_vector(M, x, w; kwargs...)
    return inner(M.manifold, array_value(x), array_value(v), array_value(w))
end

function exp!(M::ArrayManifold, y, x, v; kwargs...)
    is_manifold_point(M, x; kwargs...)
    is_tangent_vector(M, x, v; kwargs...)
    exp!(M.manifold, array_value(y), array_value(x), array_value(v))
    is_manifold_point(M, y; kwargs...)
    return y
end

function log(M::ArrayManifold, x, y; kwargs...)
    is_manifold_point(M, x; kwargs...)
    is_manifold_point(M, y; kwargs...)
    v = ArrayTVector(log(M.manifold, array_value(x), array_value(y)))
    is_tangent_vector(M, x, v; kwargs...)
    return v
end

function log!(M::ArrayManifold, v, x, y; kwargs...)
    is_manifold_point(M, x; kwargs...)
    is_manifold_point(M, y; kwargs...)
    log!(M.manifold, array_value(v), array_value(x), array_value(y))
    is_tangent_vector(M, x, v; kwargs...)
    return v
end

function zero_tangent_vector!(M::ArrayManifold, v, x; kwargs...)
    is_manifold_point(M, x; kwargs...)
    zero_tangent_vector!(M.manifold, array_value(v), array_value(x); kwargs...)
    is_tangent_vector(M, x, v; kwargs...)
    return v
end

function zero_tangent_vector(M::ArrayManifold, x; kwargs...)
    is_manifold_point(M, x; kwargs...)
    w = zero_tangent_vector(M.manifold, array_value(x))
    is_tangent_vector(M, x, w; kwargs...)
    return w
end

function vector_transport(M::ArrayManifold, x, v, y)
    return vector_transport(M.manifold,
                            array_value(x),
                            array_value(v),
                            array_value(y))
end

export ArrayManifold,
    ArrayMPoint,
    ArrayTVector


text:
using Compat
using KUnet
using HDF5,JLD
typealias LUP Union(Op,UpdateParam)
import Base.isequal

function isequal(l1::LUP, l2::LUP)
    for n in fieldnames(l1)
        isdefined(l1,n) || continue
        isdefined(l2,n) || return false
    end
    for n in fieldnames(l2)
        isdefined(l2,n) || continue
        isdefined(l1,n) || return false
        isequal(l1.(n),l2.(n)) || return false
    end
    return true
end

net=newnet(relu, 1326, 20000,10)
setparam!(net, learningRate=0.02, dropout=0.5)
save("foo.jld", net)
foo=newnet("foo.jld")
isequal(copy(net,:cpu),copy(foo,:cpu))


text:
getname(p::Dagger.OSProc) = "OS Process on worker $(p.pid)"
getname(p::Dagger.ThreadProc) = "Thread $(p.tid) on worker $(p.owner)"
getname(p) = sprint(Base.show, p)

function proclt(p1::T, p2::R) where {T,R}
    if p1.owner != p2.owner
        return p1.owner < p2.owner
    else
        return repr(T) < repr(R)
    end
end
function proclt(p1::T, p2::T) where {T}
    if p1.owner != p2.owner
        return p1.owner < p2.owner
    else
        for field in fieldnames(T)
            f1 = getfield(p1, field)
            f2 = getfield(p2, field)
            if f1 != f2
                return f1 < f2
            end
        end
    end
    false
end
proclt(p1::Dagger.OSProc, p2::Dagger.OSProc) = p1.pid < p2.pid
proclt(p1::Dagger.OSProc, p2) = p1.pid < p2.owner
proclt(p1, p2::Dagger.OSProc) = p1.owner < p2.pid

function update_window_logs!(window_logs, logs; root_time, window_start)
    if !isempty(logs)
        for id in keys(logs)
            append!(window_logs, map(x->(x,), filter(x->x.category==:compute||x.category==:scheduler_init, logs[id])))
        end
    end
    for idx in length(window_logs):-1:1
        log = window_logs[idx]
        if length(log) == 2
            # Clear out finished events older than window start
            log_finish_s = (log[2].timestamp-root_time)/(1000^3)
            if log_finish_s < window_start
                @debug "Gantt: Deleted event"
                deleteat!(window_logs, idx)
            end
        elseif log[1] isa Dagger.Event{:finish}
            # Pair finish events with start events
            sidx = findfirst(x->length(x) == 1 &&
                                x[1] isa Dagger.Event{:start} &&
                                x[1].id==log[1].id, window_logs)
            if sidx === nothing
                @debug "Gantt: Removed unpaired finish"
                deleteat!(window_logs, idx)
                continue
            end
            window_logs[sidx] = (window_logs[sidx][1], log[1])
            @debug "Gantt: Paired event"
            deleteat!(window_logs, idx)
        end
    end
end
function logs_to_stackframes(logs)
    data = UInt64[]
    lidict = Dict{UInt64, Vector{Base.StackTraces.StackFrame}}()
    for log in filter(x->length(x)==2, logs)
        append!(data, log[2].profiler_samples.samples)
        merge!(lidict, log[2].profiler_samples.lineinfo)
    end
    return data, lidict
end

const continue_rendering = Ref{Bool}(true)
const render_results = Channel()


text:
# Copyright 2019 Tobias Frilling
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is basically Base.findmin, but first applies f to the elements.
# faster than findmin(map(f, a))
function _findmin(f, a)
    p = pairs(a)
    (mi, mv), _ = iterate(p)
    i = mi
    f_mv = f(mv)
    for (i, v) in p
        f_v = f(v)
        if f_v < f_mv
            f_mv = f_v
            mi = i
        end
    end
    return (f_mv, mi)
end


text:
# Wolff single-cluster flip code
# Stefan Countryman
# stc2117@columbia.edu

type SpinArray
    Nx::Int64
    Ny::Int64
    N ::Int64
    σ ::Array{Int64,2}
    Eold::Float64
end

# Initialize a spin-up spin array with specified dimensions
SpinArray(Nx::Int64, Ny::Int64) = SpinArray(Nx, Ny, Nx*Ny, ones(Int64, Ny, Nx), 0.0)

function magnetization(A::SpinArray)
    return sum(A.σ)/A.N
end

function flip!(x::Int64, y::Int64, A::SpinArray, Δσ::Array{Int64,2}, flips::Int64, p::Float64)

    s0 = Δσ[x,y]                                # current spin
    Δσ[x,y] = -s0                               # flip this spot
    flips += 1                                  # add a flip
    nei = [
        (x, mod1(y+1, A.Ny))
        (x, mod1(y-1, A.Ny))
        (mod1(x+1, A.Nx), y)
        (mod1(x-1, A.Nx), y)
    ]

    for (xx, yy) in nei
        if (s0 == Δσ[xx,yy] && rand() < p)
            flips = flip!(xx, yy, A, Δσ, flips, p)
        end
    end
    return flips
end

function spatialcorelator(spins::Array{Int64,2}, Δx::Int64, Δy::Int64)

    Δx >= 0 || error("Δx must be nonnegative")
    Δy >= 0 || error("Δy must be nonnegative")

    shifted = spins
    shifted = [shifted[:,(Δx+1):end]  shifted[:,(1:Δx)]]            # x shift
    shifted = [shifted[(end-Δy+1):end,:]; shifted[1:(end-Δy),:]]    # y shift

    shifted .*= spins                                   # spatial correlations
    return mean(shifted)                                # ⟨σ(x⃗)σ(y⃗)⟩

end

# energies are -2J*∑s1*s2/T; sum them all up
function interactionenergy(spins::Array{Int64,2}, J::Float64)
    interactions = 0
    horshift = [spins[:,2:end]  spins[:,1]]
    horshift .*= spins
    vershift = [spins[2:end,:]; spins[1,:]]
    vershift .*= spins
    interactions += sum(horshift)
    interactions += sum(vershift)
    interactions *= -2
    return J * float64(interactions)
end

function magneticenergy(spins::Array{Int64,2}, B::Float64)
    spin = sum(spins)
    spin *= -1
    return B * float(spin)
end

function cluster(Nx::Int64, Ny::Int64, steps::Int64, J::Float64, B::Float64, T::Float64, mcd::Int64)

    print("Finding normalized magnetization for J=$J, B=$B, T=$T... ")
    p = 1-exp(-2J/T)
    A = SpinArray(Nx, Ny)
    A.Eold = magneticenergy(A.σ, B) # + interactionenergy(A.σ, J)
    Δσ = zeros(A.σ)                             # proposed spins
    magnetizations = zeros(steps)
    accepts = 0
    Enew = 0.0
    ΔE = 0.0
    Pacc = 0.0
    mcd == 0 ? (cor = false) : (cor = true)
    if cor == true
        naivecorrelators = zeros(Float64, mcd, steps)
 ###       correlators =      zeros(Float64, steps)
    end

    for n in 1:steps

        # randomly pick a spot to flip
        x = int(ceil(rand() * Nx))
        y = int(ceil(rand() * Ny))

        # reset variables
        Δσ[:] = A.σ[:]
        s0 = Δσ[x,y]
        flips = 0

        # propose flip
        flips = flip!(x, y, A, Δσ, flips, p)
        # showspins(Δσ)

        # calculate energies; ΔE = (Eint + Emag) - Eold
        # Enew = interactionenergy(Δσ, J) # apparently shouldn't have this...
        Enew = magneticenergy(Δσ, B)
        ΔE = Enew - A.Eold
        Pacc = exp(-ΔE/T)

        # accept/reject
        if rand() < Pacc
            A.σ[:] = Δσ[:]
            A.Eold = Enew
            # println("Accepted step $n")
            accepts += 1
        end

        # find naive correlator
        for d in 1:mcd
            naivecorrelators[d,n] += spatialcorelator(A.σ, d, 0)
            naivecorrelators[d,n] += spatialcorelator(A.σ, 0, d)
        end

        # get magnetization
        magnetizations[n] = magnetization(A)
        # n%100 == 0 && println("\tMagnetization for step $n: ",magnetizations[n])
    end

    println("done with ",(accepts/steps)," accept ratio.")
    if cor == false
        return magnetizations, accepts/steps
    else
        return magnetizations, accepts/steps, naivecorrelators ###, correlators
    end
end

# for when you don't want the correlator
cluster(Nx, Ny, steps, J, B, T) = cluster(Nx, Ny, steps, J, B, T, 0)

function M(T,J)
    return (1 - (sinh(2J./T)).^-4).^(1/8)
end

function showspins(spins::Array{Int64,2})
    up = "██"
    down = "  "
    println("Spins (\"$up\" is ↑, \"$down\" is ↓):")
    for nrow in 1:size(spins)[2]
        for spin in spins[:,nrow]
            if spin == 1
                print(up)
            elseif spin == -1
                print(down)
            else
                error("Spin array must have values of 1 or -1.")
            end
        end
        println()
    end
end

function aoft(correlators::Array{Float64, 2})
    l = size(correlators)[1]                # number of distance values used
    D = [1:l]                               # distances between lattice points
    return -D ./ log(abs(correlators))
end