text:
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: apprunner
using AWS.Compat
using AWS.UUIDs

"""
    associate_custom_domain(domain_name, service_arn)
    associate_custom_domain(domain_name, service_arn, params::Dict{String,<:Any})

Associate your own domain name with the App Runner subdomain URL of your App Runner
service. After you call AssociateCustomDomain and receive a successful response, use the
information in the CustomDomain record that's returned to add CNAME records to your Domain
Name System (DNS). For each mapped domain name, add a mapping to the target App Runner
subdomain and one or more certificate validation records. App Runner then performs DNS
validation to verify that you own or control the domain name that you associated. App
Runner tracks domain validity in a certificate stored in AWS Certificate Manager (ACM).

# Arguments
- `domain_name`: A custom domain endpoint to associate. Specify a root domain (for example,
  example.com), a subdomain (for example, login.example.com or admin.login.example.com), or a
  wildcard (for example, *.example.com).
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want to
  associate a custom domain name with.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"EnableWWWSubdomain"`: Set to true to associate the subdomain www.DomainName  with the
  App Runner service in addition to the base domain. Default: true
"""
function associate_custom_domain(
    DomainName, ServiceArn; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "AssociateCustomDomain",
        Dict{String,Any}("DomainName" => DomainName, "ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function associate_custom_domain(
    DomainName,
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "AssociateCustomDomain",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}("DomainName" => DomainName, "ServiceArn" => ServiceArn),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    create_auto_scaling_configuration(auto_scaling_configuration_name)
    create_auto_scaling_configuration(auto_scaling_configuration_name, params::Dict{String,<:Any})

Create an App Runner automatic scaling configuration resource. App Runner requires this
resource when you create App Runner services that require non-default auto scaling
settings. You can share an auto scaling configuration across multiple services. Create
multiple revisions of a configuration by using the same AutoScalingConfigurationName and
different AutoScalingConfigurationRevision values. When you create a service, you can set
it to use the latest active revision of an auto scaling configuration or a specific
revision. Configure a higher MinSize to increase the spread of your App Runner service over
more Availability Zones in the Amazon Web Services Region. The tradeoff is a higher minimal
cost. Configure a lower MaxSize to control your cost. The tradeoff is lower responsiveness
during peak demand.

# Arguments
- `auto_scaling_configuration_name`: A name for the auto scaling configuration. When you
  use it for the first time in an Amazon Web Services Region, App Runner creates revision
  number 1 of this name. When you use the same name in subsequent calls, App Runner creates
  incremental revisions of the configuration.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxConcurrency"`: The maximum number of concurrent requests that you want an instance
  to process. If the number of concurrent requests exceeds this limit, App Runner scales up
  your service. Default: 100
- `"MaxSize"`: The maximum number of instances that your service scales up to. At most
  MaxSize instances actively serve traffic for your service. Default: 25
- `"MinSize"`: The minimum number of instances that App Runner provisions for your service.
  The service always has at least MinSize provisioned instances. Some of them actively serve
  traffic. The rest of them (provisioned and inactive instances) are a cost-effective compute
  capacity reserve and are ready to be quickly activated. You pay for memory usage of all the
  provisioned instances. You pay for CPU usage of only the active subset. App Runner
  temporarily doubles the number of provisioned instances during deployments, to maintain the
  same capacity for both old and new code. Default: 1
- `"Tags"`: A list of metadata items that you can associate with your auto scaling
  configuration resource. A tag is a key-value pair.
"""
function create_auto_scaling_configuration(
    AutoScalingConfigurationName; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "CreateAutoScalingConfiguration",
        Dict{String,Any}("AutoScalingConfigurationName" => AutoScalingConfigurationName);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function create_auto_scaling_configuration(
    AutoScalingConfigurationName,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "CreateAutoScalingConfiguration",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "AutoScalingConfigurationName" => AutoScalingConfigurationName
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    create_connection(connection_name, provider_type)
    create_connection(connection_name, provider_type, params::Dict{String,<:Any})

Create an App Runner connection resource. App Runner requires a connection resource when
you create App Runner services that access private repositories from certain third-party
providers. You can share a connection across multiple services. A connection resource is
needed to access GitHub repositories. GitHub requires a user interface approval process
through the App Runner console before you can use the connection.

# Arguments
- `connection_name`: A name for the new connection. It must be unique across all App Runner
  connections for the Amazon Web Services account in the Amazon Web Services Region.
- `provider_type`: The source repository provider.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"Tags"`: A list of metadata items that you can associate with your connection resource.
  A tag is a key-value pair.
"""
function create_connection(
    ConnectionName, ProviderType; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "CreateConnection",
        Dict{String,Any}(
            "ConnectionName" => ConnectionName, "ProviderType" => ProviderType
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function create_connection(
    ConnectionName,
    ProviderType,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "CreateConnection",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "ConnectionName" => ConnectionName, "ProviderType" => ProviderType
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    create_service(service_name, source_configuration)
    create_service(service_name, source_configuration, params::Dict{String,<:Any})

Create an App Runner service. After the service is created, the action also automatically
starts a deployment. This is an asynchronous operation. On a successful call, you can use
the returned OperationId and the ListOperations call to track the operation's progress.

# Arguments
- `service_name`: A name for the new service. It must be unique across all the running App
  Runner services in your Amazon Web Services account in the Amazon Web Services Region.
- `source_configuration`: The source to deploy to the App Runner service. It can be a code
  or an image repository.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"AutoScalingConfigurationArn"`: The Amazon Resource Name (ARN) of an App Runner
  automatic scaling configuration resource that you want to associate with your service. If
  not provided, App Runner associates the latest revision of a default auto scaling
  configuration.
- `"EncryptionConfiguration"`: An optional custom encryption key that App Runner uses to
  encrypt the copy of your source repository that it maintains and your service logs. By
  default, App Runner uses an Amazon Web Services managed CMK.
- `"HealthCheckConfiguration"`: The settings for the health check that App Runner performs
  to monitor the health of your service.
- `"InstanceConfiguration"`: The runtime configuration of instances (scaling units) of the
  App Runner service.
- `"Tags"`: An optional list of metadata items that you can associate with your service
  resource. A tag is a key-value pair.
"""
function create_service(
    ServiceName, SourceConfiguration; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "CreateService",
        Dict{String,Any}(
            "ServiceName" => ServiceName, "SourceConfiguration" => SourceConfiguration
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function create_service(
    ServiceName,
    SourceConfiguration,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "CreateService",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "ServiceName" => ServiceName,
                    "SourceConfiguration" => SourceConfiguration,
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    delete_auto_scaling_configuration(auto_scaling_configuration_arn)
    delete_auto_scaling_configuration(auto_scaling_configuration_arn, params::Dict{String,<:Any})

Delete an App Runner automatic scaling configuration resource. You can delete a specific
revision or the latest active revision. You can't delete a configuration that's used by one
or more App Runner services.

# Arguments
- `auto_scaling_configuration_arn`: The Amazon Resource Name (ARN) of the App Runner auto
  scaling configuration that you want to delete. The ARN can be a full auto scaling
  configuration ARN, or a partial ARN ending with either .../name  or .../name/revision . If
  a revision isn't specified, the latest active revision is deleted.

"""
function delete_auto_scaling_configuration(
    AutoScalingConfigurationArn; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "DeleteAutoScalingConfiguration",
        Dict{String,Any}("AutoScalingConfigurationArn" => AutoScalingConfigurationArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function delete_auto_scaling_configuration(
    AutoScalingConfigurationArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "DeleteAutoScalingConfiguration",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "AutoScalingConfigurationArn" => AutoScalingConfigurationArn
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    delete_connection(connection_arn)
    delete_connection(connection_arn, params::Dict{String,<:Any})

Delete an App Runner connection. You must first ensure that there are no running App Runner
services that use this connection. If there are any, the DeleteConnection action fails.

# Arguments
- `connection_arn`: The Amazon Resource Name (ARN) of the App Runner connection that you
  want to delete.

"""
function delete_connection(ConnectionArn; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "DeleteConnection",
        Dict{String,Any}("ConnectionArn" => ConnectionArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function delete_connection(
    ConnectionArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "DeleteConnection",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ConnectionArn" => ConnectionArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    delete_service(service_arn)
    delete_service(service_arn, params::Dict{String,<:Any})

Delete an App Runner service. This is an asynchronous operation. On a successful call, you
can use the returned OperationId and the ListOperations call to track the operation's
progress.

# Arguments
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want to
  delete.

"""
function delete_service(ServiceArn; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "DeleteService",
        Dict{String,Any}("ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function delete_service(
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "DeleteService",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ServiceArn" => ServiceArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    describe_auto_scaling_configuration(auto_scaling_configuration_arn)
    describe_auto_scaling_configuration(auto_scaling_configuration_arn, params::Dict{String,<:Any})

Return a full description of an App Runner automatic scaling configuration resource.

# Arguments
- `auto_scaling_configuration_arn`: The Amazon Resource Name (ARN) of the App Runner auto
  scaling configuration that you want a description for. The ARN can be a full auto scaling
  configuration ARN, or a partial ARN ending with either .../name  or .../name/revision . If
  a revision isn't specified, the latest active revision is described.

"""
function describe_auto_scaling_configuration(
    AutoScalingConfigurationArn; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "DescribeAutoScalingConfiguration",
        Dict{String,Any}("AutoScalingConfigurationArn" => AutoScalingConfigurationArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function describe_auto_scaling_configuration(
    AutoScalingConfigurationArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "DescribeAutoScalingConfiguration",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "AutoScalingConfigurationArn" => AutoScalingConfigurationArn
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    describe_custom_domains(service_arn)
    describe_custom_domains(service_arn, params::Dict{String,<:Any})

Return a description of custom domain names that are associated with an App Runner service.

# Arguments
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want
  associated custom domain names to be described for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The maximum number of results that each response (result page) can
  include. It's used for a paginated request. If you don't specify MaxResults, the request
  retrieves all available results in a single response.
- `"NextToken"`: A token from a previous result page. It's used for a paginated request.
  The request retrieves the next result page. All other parameter values must be identical to
  the ones that are specified in the initial request. If you don't specify NextToken, the
  request retrieves the first result page.
"""
function describe_custom_domains(
    ServiceArn; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "DescribeCustomDomains",
        Dict{String,Any}("ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function describe_custom_domains(
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "DescribeCustomDomains",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ServiceArn" => ServiceArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    describe_service(service_arn)
    describe_service(service_arn, params::Dict{String,<:Any})

Return a full description of an App Runner service.

# Arguments
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want a
  description for.

"""
function describe_service(ServiceArn; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "DescribeService",
        Dict{String,Any}("ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function describe_service(
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "DescribeService",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ServiceArn" => ServiceArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    disassociate_custom_domain(domain_name, service_arn)
    disassociate_custom_domain(domain_name, service_arn, params::Dict{String,<:Any})

Disassociate a custom domain name from an App Runner service. Certificates tracking domain
validity are associated with a custom domain and are stored in AWS Certificate Manager
(ACM). These certificates aren't deleted as part of this action. App Runner delays
certificate deletion for 30 days after a domain is disassociated from your service.

# Arguments
- `domain_name`: The domain name that you want to disassociate from the App Runner service.
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want to
  disassociate a custom domain name from.

"""
function disassociate_custom_domain(
    DomainName, ServiceArn; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "DisassociateCustomDomain",
        Dict{String,Any}("DomainName" => DomainName, "ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function disassociate_custom_domain(
    DomainName,
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "DisassociateCustomDomain",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}("DomainName" => DomainName, "ServiceArn" => ServiceArn),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_auto_scaling_configurations()
    list_auto_scaling_configurations(params::Dict{String,<:Any})

Returns a list of App Runner automatic scaling configurations in your Amazon Web Services
account. You can query the revisions for a specific configuration name or the revisions for
all configurations in your account. You can optionally query only the latest revision of
each requested name.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"AutoScalingConfigurationName"`: The name of the App Runner auto scaling configuration
  that you want to list. If specified, App Runner lists revisions that share this name. If
  not specified, App Runner returns revisions of all configurations.
- `"LatestOnly"`: Set to true to list only the latest revision for each requested
  configuration name. Keep as false to list all revisions for each requested configuration
  name. Default: false
- `"MaxResults"`: The maximum number of results to include in each response (result page).
  It's used for a paginated request. If you don't specify MaxResults, the request retrieves
  all available results in a single response.
- `"NextToken"`: A token from a previous result page. It's used for a paginated request.
  The request retrieves the next result page. All other parameter values must be identical to
  the ones that are specified in the initial request. If you don't specify NextToken, the
  request retrieves the first result page.
"""
function list_auto_scaling_configurations(;
    aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "ListAutoScalingConfigurations";
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_auto_scaling_configurations(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "ListAutoScalingConfigurations",
        params;
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_connections()
    list_connections(params::Dict{String,<:Any})

Returns a list of App Runner connections that are associated with your Amazon Web Services
account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"ConnectionName"`: If specified, only this connection is returned. If not specified, the
  result isn't filtered by name.
- `"MaxResults"`: The maximum number of results to include in each response (result page).
  Used for a paginated request. If you don't specify MaxResults, the request retrieves all
  available results in a single response.
- `"NextToken"`: A token from a previous result page. Used for a paginated request. The
  request retrieves the next result page. All other parameter values must be identical to the
  ones specified in the initial request. If you don't specify NextToken, the request
  retrieves the first result page.
"""
function list_connections(; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "ListConnections"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end
function list_connections(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "ListConnections", params; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end

"""
    list_operations(service_arn)
    list_operations(service_arn, params::Dict{String,<:Any})

Return a list of operations that occurred on an App Runner service. The resulting list of
OperationSummary objects is sorted in reverse chronological order. The first object on the
list represents the last started operation.

# Arguments
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want a
  list of operations for.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The maximum number of results to include in each response (result page).
  It's used for a paginated request. If you don't specify MaxResults, the request retrieves
  all available results in a single response.
- `"NextToken"`: A token from a previous result page. It's used for a paginated request.
  The request retrieves the next result page. All other parameter values must be identical to
  the ones specified in the initial request. If you don't specify NextToken, the request
  retrieves the first result page.
"""
function list_operations(ServiceArn; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "ListOperations",
        Dict{String,Any}("ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_operations(
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "ListOperations",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ServiceArn" => ServiceArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    list_services()
    list_services(params::Dict{String,<:Any})

Returns a list of running App Runner services in your Amazon Web Services account.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"MaxResults"`: The maximum number of results to include in each response (result page).
  It's used for a paginated request. If you don't specify MaxResults, the request retrieves
  all available results in a single response.
- `"NextToken"`: A token from a previous result page. Used for a paginated request. The
  request retrieves the next result page. All other parameter values must be identical to the
  ones specified in the initial request. If you don't specify NextToken, the request
  retrieves the first result page.
"""
function list_services(; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner("ListServices"; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET)
end
function list_services(
    params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "ListServices", params; aws_config=aws_config, feature_set=SERVICE_FEATURE_SET
    )
end

"""
    list_tags_for_resource(resource_arn)
    list_tags_for_resource(resource_arn, params::Dict{String,<:Any})

List tags that are associated with for an App Runner resource. The response contains a list
of tag key-value pairs.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the resource that a tag list is
  requested for. It must be the ARN of an App Runner resource.

"""
function list_tags_for_resource(
    ResourceArn; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "ListTagsForResource",
        Dict{String,Any}("ResourceArn" => ResourceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function list_tags_for_resource(
    ResourceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "ListTagsForResource",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ResourceArn" => ResourceArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    pause_service(service_arn)
    pause_service(service_arn, params::Dict{String,<:Any})

Pause an active App Runner service. App Runner reduces compute capacity for the service to
zero and loses state (for example, ephemeral storage is removed). This is an asynchronous
operation. On a successful call, you can use the returned OperationId and the
ListOperations call to track the operation's progress.

# Arguments
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want to
  pause.

"""
function pause_service(ServiceArn; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "PauseService",
        Dict{String,Any}("ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function pause_service(
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "PauseService",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ServiceArn" => ServiceArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    resume_service(service_arn)
    resume_service(service_arn, params::Dict{String,<:Any})

Resume an active App Runner service. App Runner provisions compute capacity for the
service. This is an asynchronous operation. On a successful call, you can use the returned
OperationId and the ListOperations call to track the operation's progress.

# Arguments
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want to
  resume.

"""
function resume_service(ServiceArn; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "ResumeService",
        Dict{String,Any}("ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function resume_service(
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "ResumeService",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ServiceArn" => ServiceArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    start_deployment(service_arn)
    start_deployment(service_arn, params::Dict{String,<:Any})

Initiate a manual deployment of the latest commit in a source code repository or the latest
image in a source image repository to an App Runner service. For a source code repository,
App Runner retrieves the commit and builds a Docker image. For a source image repository,
App Runner retrieves the latest Docker image. In both cases, App Runner then deploys the
new image to your service and starts a new container instance. This is an asynchronous
operation. On a successful call, you can use the returned OperationId and the
ListOperations call to track the operation's progress.

# Arguments
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want to
  manually deploy to.

"""
function start_deployment(ServiceArn; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "StartDeployment",
        Dict{String,Any}("ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function start_deployment(
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "StartDeployment",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ServiceArn" => ServiceArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    tag_resource(resource_arn, tags)
    tag_resource(resource_arn, tags, params::Dict{String,<:Any})

Add tags to, or update the tag values of, an App Runner resource. A tag is a key-value pair.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the resource that you want to update
  tags for. It must be the ARN of an App Runner resource.
- `tags`: A list of tag key-value pairs to add or update. If a key is new to the resource,
  the tag is added with the provided value. If a key is already associated with the resource,
  the value of the tag is updated.

"""
function tag_resource(ResourceArn, Tags; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "TagResource",
        Dict{String,Any}("ResourceArn" => ResourceArn, "Tags" => Tags);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function tag_resource(
    ResourceArn,
    Tags,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "TagResource",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}("ResourceArn" => ResourceArn, "Tags" => Tags),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    untag_resource(resource_arn, tag_keys)
    untag_resource(resource_arn, tag_keys, params::Dict{String,<:Any})

Remove tags from an App Runner resource.

# Arguments
- `resource_arn`: The Amazon Resource Name (ARN) of the resource that you want to remove
  tags from. It must be the ARN of an App Runner resource.
- `tag_keys`: A list of tag keys that you want to remove.

"""
function untag_resource(
    ResourceArn, TagKeys; aws_config::AbstractAWSConfig=global_aws_config()
)
    return apprunner(
        "UntagResource",
        Dict{String,Any}("ResourceArn" => ResourceArn, "TagKeys" => TagKeys);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function untag_resource(
    ResourceArn,
    TagKeys,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "UntagResource",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}("ResourceArn" => ResourceArn, "TagKeys" => TagKeys),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    update_service(service_arn)
    update_service(service_arn, params::Dict{String,<:Any})

Update an App Runner service. You can update the source configuration and instance
configuration of the service. You can also update the ARN of the auto scaling configuration
resource that's associated with the service. However, you can't change the name or the
encryption configuration of the service. These can be set only when you create the service.
To update the tags applied to your service, use the separate actions TagResource and
UntagResource. This is an asynchronous operation. On a successful call, you can use the
returned OperationId and the ListOperations call to track the operation's progress.

# Arguments
- `service_arn`: The Amazon Resource Name (ARN) of the App Runner service that you want to
  update.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"AutoScalingConfigurationArn"`: The Amazon Resource Name (ARN) of an App Runner
  automatic scaling configuration resource that you want to associate with your service.
- `"HealthCheckConfiguration"`: The settings for the health check that App Runner performs
  to monitor the health of your service.
- `"InstanceConfiguration"`: The runtime configuration to apply to instances (scaling
  units) of the App Runner service.
- `"SourceConfiguration"`: The source configuration to apply to the App Runner service. You
  can change the configuration of the code or image repository that the service uses.
  However, you can't switch from code to image or the other way around. This means that you
  must provide the same structure member of SourceConfiguration that you originally included
  when you created the service. Specifically, you can include either CodeRepository or
  ImageRepository. To update the source configuration, set the values to members of the
  structure that you include.
"""
function update_service(ServiceArn; aws_config::AbstractAWSConfig=global_aws_config())
    return apprunner(
        "UpdateService",
        Dict{String,Any}("ServiceArn" => ServiceArn);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function update_service(
    ServiceArn,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return apprunner(
        "UpdateService",
        Dict{String,Any}(
            mergewith(_merge, Dict{String,Any}("ServiceArn" => ServiceArn), params)
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end


text:
Py_Type(x::PyPtr) = PyPtr(UnsafePtr(x).type[!])

PyObject_Type(x::PyPtr) = (t=Py_Type(x); Py_IncRef(t); t)

Py_TypeCheck(o::PyPtr, t::PyPtr) = PyType_IsSubtype(Py_Type(o), t)
Py_TypeCheckFast(o::PyPtr, f::Integer) = PyType_IsSubtypeFast(Py_Type(o), f)

PyType_IsSubtypeFast(t::PyPtr, f::Integer) = Cint(!iszero(UnsafePtr{PyTypeObject}(t).flags[] & f))

PyMemoryView_GET_BUFFER(m::PyPtr) = Ptr{Py_buffer}(UnsafePtr{PyMemoryViewObject}(m).view)

PyType_CheckBuffer(t::PyPtr) = begin
    p = UnsafePtr{PyTypeObject}(t).as_buffer[]
    return p != C_NULL && p.get[!] != C_NULL
end

PyObject_CheckBuffer(o::PyPtr) = PyType_CheckBuffer(Py_Type(o))

PyObject_GetBuffer(o::PyPtr, b, flags) = begin
    p = UnsafePtr{PyTypeObject}(Py_Type(o)).as_buffer[]
    if p == C_NULL || p.get[!] == C_NULL
        PyErr_SetString(
            POINTERS.PyExc_TypeError,
            "a bytes-like object is required, not '$(String(UnsafePtr{PyTypeObject}(Py_Type(o)).name[]))'",
        )
        return Cint(-1)
    end
    return ccall(p.get[!], Cint, (PyPtr, Ptr{Py_buffer}, Cint), o, b, flags)
end

PyBuffer_Release(_b) = begin
    b = UnsafePtr(Base.unsafe_convert(Ptr{Py_buffer}, _b))
    o = b.obj[]
    o == C_NULL && return
    p = UnsafePtr{PyTypeObject}(Py_Type(o)).as_buffer[]
    if (p != C_NULL && p.release[!] != C_NULL)
        ccall(p.release[!], Cvoid, (PyPtr, Ptr{Py_buffer}), o, b)
    end
    b.obj[] = C_NULL
    Py_DecRef(o)
    return
end

function PyOS_RunInputHook()
    hook = Base.unsafe_load(Ptr{Ptr{Cvoid}}(dlsym(CTX.lib_ptr, :PyOS_InputHook)))
    if hook == C_NULL
        return false
    else
        ccall(hook, Cint, ())
        return true
    end
end

# FAST REFCOUNTING
#
# _Py_IncRef(o) = ccall(POINTERS.Py_IncRef, Cvoid, (PyPtr,), o)
# _Py_DecRef(o) = ccall(POINTERS.Py_DecRef, Cvoid, (PyPtr,), o)
# const FAST_INCREF = true
# const FAST_DECREF = true
# if FAST_INCREF
#     # This avoids calling the C-API Py_IncRef().
#     # It just needs to increase the reference count.
#     # Assumes Python is not built for debugging reference counts.
#     # Speed up from 2.5ns to 1.3ns.
#     Py_INCREF(o) = GC.@preserve o begin
#         p = UnsafePtr(Base.unsafe_convert(PyPtr, o))
#         p.refcnt[] += 1
#         nothing
#     end
#     Py_IncRef(o) = GC.@preserve o begin
#         p = UnsafePtr(Base.unsafe_convert(PyPtr, o))
#         if p != C_NULL
#             p.refcnt[] += 1
#         end
#         nothing
#     end
# else
#     Py_INCREF(o) = _Py_IncRef(o)
#     Py_IncRef(o) = _Py_IncRef(o)
# end
# if FAST_DECREF
#     # This avoids calling the C-API Py_IncRef() unless the object is about to be deallocated.
#     # It just needs to decrement the reference count.
#     # Assumes Python is not built for debugging reference counts.
#     # Speed up from 2.5ns to 1.8ns in non-deallocating case.
#     Py_DECREF(o) = GC.@preserve o begin
#         p = UnsafePtr(Base.unsafe_convert(PyPtr, o))
#         c = p.refcnt[]
#         if c > 1
#             p.refcnt[] = c - 1
#         else
#             _Py_DecRef(o)
#         end
#         nothing
#     end
#     Py_DecRef(o) = GC.@preserve o begin
#         p = UnsafePtr(Base.unsafe_convert(PyPtr, o))
#         if p != C_NULL
#             c = p.refcnt[]
#             if c > 1
#                 p.refcnt[] = c - 1
#             else
#                 _Py_DecRef(o)
#             end
#         end
#         nothing
#     end
# else
#     Py_DECREF(o) = _Py_DecRef(o)
#     Py_DecRef(o) = _Py_DecRef(o)
# end
# Py_RefCnt(o) = GC.@preserve o UnsafePtr(Base.unsafe_convert(PyPtr, o)).refcnt[]

# Py_DecRef(f::Function, o::Ptr, dflt = PYERR()) =
#     isnull(o) ? dflt : (r = f(o); Py_DecRef(o); r)

ext: jl


text:
" solution status (from ipopt) "
ApplicationReturnStatus = Dict(
    0 => :Solve_Succeeded,
    1 => :Solved_To_Acceptable_Level,
    2 => :Infeasible_Problem_Detected,
    3 => :Search_Direction_Becomes_Too_Small,
    4 => :Diverging_Iterates,
    5 => :User_Requested_Stop,
    6 => :Feasible_Point_Found,
    -1 => :Maximum_Iterations_Exceeded,
    -2 => :Restoration_Failed,
    -3 => :Error_In_Step_Computation,
    -4 => :Maximum_CpuTime_Exceeded,
    -5 => :Optimize_not_called,
    -6 => :Method_not_defined,
    -10 => :Not_Enough_Degrees_Of_Freedom,
    -11 => :Invalid_Problem_Definition,
    -12 => :Invalid_Option,
    -13 => :Invalid_Number_Detected,
    -100 => :Unrecoverable_Exception,
    -102 => :Insufficient_Memory,
    -199 => :Internal_Error,
)


text:
# Julia wrapper for header: cuda_device_runtime_api.h
# Automatically generated using Clang.jl

# Not fully automated, since Clang.jl can't handle the `extern "C"`, and we
# change the `ccall` invocation to refer to a manually-provided library (`extern ...`).
# We also provide 1.0-compatible definitions for functionality that is officially supported.

# TODO: checking

import Base.Sys: WORD_SIZE

function cudaDeviceGetAttribute(value, attr, device)
    ccall("extern cudaDeviceGetAttribute", llvmcall, cudaError_t,
          (Ptr{Cint}, cudaDeviceAttr, Cint),
          value, attr, device)
end

function cudaDeviceGetLimit(pValue, limit)
    ccall("extern cudaDeviceGetLimit", llvmcall, cudaError_t,
          (Ptr{Csize_t}, cudaLimit),
          pValue, limit)
end

function cudaDeviceGetCacheConfig(pCacheConfig)
    ccall("extern cudaDeviceGetCacheConfig", llvmcall, cudaError_t,
          (Ptr{cudaFuncCache},),
          pCacheConfig)
end

function cudaDeviceGetSharedMemConfig(pConfig)
    ccall("extern cudaDeviceGetSharedMemConfig", llvmcall, cudaError_t,
          (Ptr{cudaSharedMemConfig},),
          pConfig)
end

if VERSION >= v"1.2.0-DEV.512"
    function cudaDeviceSynchronize()
        ccall("extern cudaDeviceSynchronize", llvmcall, cudaError_t, ())
    end
else
    @eval cudaDeviceSynchronize() = Base.llvmcall(
        $("declare i32 @cudaDeviceSynchronize()",
          "%rv = call i32 @cudaDeviceSynchronize()
           ret i32 %rv"), cudaError_t, Tuple{})
end

function cudaGetLastError()
    ccall("extern cudaGetLastError", llvmcall, cudaError_t, ())
end

function cudaPeekAtLastError()
    ccall("extern cudaPeekAtLastError", llvmcall, cudaError_t, ())
end

function cudaGetErrorString(error)
    ccall("extern cudaGetErrorString", llvmcall, Cstring,
          (cudaError_t,),
          error)
end

function cudaGetErrorName(error)
    ccall("extern cudaGetErrorName", llvmcall, Cstring,
          (cudaError_t,),
          error)
end

function cudaGetDeviceCount(count)
    ccall("extern cudaGetDeviceCount", llvmcall, cudaError_t,
          (Ptr{Cint},),
          count)
end

function cudaGetDevice(device)
    ccall("extern cudaGetDevice", llvmcall, cudaError_t,
          (Ptr{Cint},),
          device)
end

if VERSION >= v"1.2.0-DEV.512"
    function cudaStreamCreateWithFlags(pStream, flags)
        ccall("extern cudaStreamCreateWithFlags", llvmcall, cudaError_t,
            (Ptr{cudaStream_t}, UInt32),
            pStream, flags)
    end
else
    @eval cudaStreamCreateWithFlags(pStream, flags) = Base.llvmcall(
        $("declare i32 @cudaStreamCreateWithFlags(i8**, i32)",
          "%pStream = inttoptr i$WORD_SIZE %0 to i8**
           %rv = call i32 @cudaStreamCreateWithFlags(i8** %pStream, i32 %1)
           ret i32 %rv"), cudaError_t,
           Tuple{Ptr{cudaStream_t}, UInt32},
           Base.unsafe_convert(Ptr{cudaStream_t}, Base.cconvert(Ptr{cudaStream_t}, pStream)),
           Base.unsafe_convert(UInt32, Base.cconvert(UInt32, flags)))
end

if VERSION >= v"1.2.0-DEV.512"
    function cudaStreamDestroy(stream)
        ccall("extern cudaStreamDestroy", llvmcall, cudaError_t,
            (cudaStream_t,),
            stream)
    end
else
    @eval cudaStreamDestroy(stream) = Base.llvmcall(
        $("declare i32 @cudaStreamDestroy(i8*)",
          "%stream = inttoptr i$WORD_SIZE %0 to i8*
           %rv = call i32 @cudaStreamDestroy(i8* %stream)
           ret i32 %rv"), cudaError_t,
           Tuple{cudaStream_t},
           Base.unsafe_convert(cudaStream_t, Base.cconvert(cudaStream_t, stream)))
end

function cudaStreamWaitEvent(stream, event, flags)
    ccall("extern cudaStreamWaitEvent", llvmcall, cudaError_t,
          (cudaStream_t, cudaEvent_t, UInt32),
          stream, event, flags)
end

function cudaStreamWaitEvent_ptsz(stream, event, flags)
    ccall("extern cudaStreamWaitEvent_ptsz", llvmcall, cudaError_t,
          (cudaStream_t, cudaEvent_t, UInt32),
          stream, event, flags)
end

function cudaEventCreateWithFlags(event, flags)
    ccall("extern cudaEventCreateWithFlags", llvmcall, cudaError_t,
          (Ptr{cudaEvent_t}, UInt32),
          event, flags)
end

function cudaEventRecord(event, stream)
    ccall("extern cudaEventRecord", llvmcall, cudaError_t,
          (cudaEvent_t, cudaStream_t),
          event, stream)
end

function cudaEventRecord_ptsz(event, stream)
    ccall("extern cudaEventRecord_ptsz", llvmcall, cudaError_t,
          (cudaEvent_t, cudaStream_t),
          event, stream)
end

function cudaEventDestroy(event)
    ccall("extern cudaEventDestroy", llvmcall, cudaError_t,
          (cudaEvent_t,),
          event)
end

function cudaFuncGetAttributes(attr, func)
    ccall("extern cudaFuncGetAttributes", llvmcall, cudaError_t,
          (Ptr{cudaFuncAttributes}, Ptr{Cvoid}),
          attr, func)
end

function cudaFree(devPtr)
    ccall("extern cudaFree", llvmcall, cudaError_t,
          (Ptr{Cvoid},),
          devPtr)
end

function cudaMalloc(devPtr, size)
    ccall("extern cudaMalloc", llvmcall, cudaError_t,
          (Ptr{Ptr{Cvoid}}, Csize_t),
          devPtr, size)
end

function cudaMemcpyAsync(dst, src, count, kind, stream)
    ccall("extern cudaMemcpyAsync", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Ptr{Cvoid}, Csize_t, cudaMemcpyKind, cudaStream_t),
          dst, src, count, kind, stream)
end

function cudaMemcpyAsync_ptsz(dst, src, count, kind, stream)
    ccall("extern cudaMemcpyAsync_ptsz", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Ptr{Cvoid}, Csize_t, cudaMemcpyKind, cudaStream_t),
          dst, src, count, kind, stream)
end

function cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream)
    ccall("extern cudaMemcpy2DAsync", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Csize_t, Ptr{Cvoid}, Csize_t, Csize_t, Csize_t, cudaMemcpyKind,
           cudaStream_t),
          dst, dpitch, src, spitch, width, height, kind, stream)
end

function cudaMemcpy2DAsync_ptsz(dst, dpitch, src, spitch, width, height, kind, stream)
    ccall("extern cudaMemcpy2DAsync_ptsz", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Csize_t, Ptr{Cvoid}, Csize_t, Csize_t, Csize_t, cudaMemcpyKind,
           cudaStream_t),
          dst, dpitch, src, spitch, width, height, kind, stream)
end

function cudaMemcpy3DAsync(p, stream)
    ccall("extern cudaMemcpy3DAsync", llvmcall, cudaError_t,
          (Ptr{cudaMemcpy3DParms}, cudaStream_t),
          p, stream)
end

function cudaMemcpy3DAsync_ptsz(p, stream)
    ccall("extern cudaMemcpy3DAsync_ptsz", llvmcall, cudaError_t,
          (Ptr{cudaMemcpy3DParms}, cudaStream_t),
          p, stream)
end

function cudaMemsetAsync(devPtr, value, count, stream)
    ccall("extern cudaMemsetAsync", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Cint, Csize_t, cudaStream_t),
          devPtr, value, count, stream)
end

function cudaMemsetAsync_ptsz(devPtr, value, count, stream)
    ccall("extern cudaMemsetAsync_ptsz", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Cint, Csize_t, cudaStream_t),
          devPtr, value, count, stream)
end

function cudaMemset2DAsync(devPtr, pitch, value, width, height, stream)
    ccall("extern cudaMemset2DAsync", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Csize_t, Cint, Csize_t, Csize_t, cudaStream_t),
          devPtr, pitch, value, width, height, stream)
end

function cudaMemset2DAsync_ptsz(devPtr, pitch, value, width, height, stream)
    ccall("extern cudaMemset2DAsync_ptsz", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Csize_t, Cint, Csize_t, Csize_t, cudaStream_t),
          devPtr, pitch, value, width, height, stream)
end

function cudaMemset3DAsync(pitchedDevPtr, value, extent, stream)
    ccall("extern cudaMemset3DAsync", llvmcall, cudaError_t,
          (cudaPitchedPtr, Cint, cudaExtent, cudaStream_t),
          pitchedDevPtr, value, extent, stream)
end

function cudaMemset3DAsync_ptsz(pitchedDevPtr, value, extent, stream)
    ccall("extern cudaMemset3DAsync_ptsz", llvmcall, cudaError_t,
          (cudaPitchedPtr, Cint, cudaExtent, cudaStream_t),
          pitchedDevPtr, value, extent, stream)
end

function cudaRuntimeGetVersion(runtimeVersion)
    ccall("extern cudaRuntimeGetVersion", llvmcall, cudaError_t,
          (Ptr{Cint},),
          runtimeVersion)
end

function cudaGetParameterBuffer(alignment, size)
    ccall("extern cudaGetParameterBuffer", llvmcall, Ptr{Cvoid},
          (Csize_t, Csize_t),
          alignment, size)
end

if VERSION >= v"1.2.0-DEV.512"
    function cudaGetParameterBufferV2(func, gridDimension, blockDimension, sharedMemSize)
        ccall("extern cudaGetParameterBufferV2", llvmcall, Ptr{Cvoid},
            (Ptr{Cvoid}, dim3, dim3, UInt32),
            func, gridDimension, blockDimension, sharedMemSize)
    end
else
    @eval cudaGetParameterBufferV2(func, gridDimension, blockDimension, sharedMemSize) =
            Base.llvmcall(
                $("declare i8* @cudaGetParameterBufferV2(i8*, {i32,i32,i32}, {i32,i32,i32}, i32)",
                  "%func = inttoptr i$WORD_SIZE %0 to i8*
                   %gridDimension.x = insertvalue { i32, i32, i32 } undef, i32 %1, 0
                   %gridDimension.y = insertvalue { i32, i32, i32 } %gridDimension.x, i32 %2, 1
                   %gridDimension.z = insertvalue { i32, i32, i32 } %gridDimension.y, i32 %3, 2
                   %blockDimension.x = insertvalue { i32, i32, i32 } undef, i32 %4, 0
                   %blockDimension.y = insertvalue { i32, i32, i32 } %blockDimension.x, i32 %5, 1
                   %blockDimension.z = insertvalue { i32, i32, i32 } %blockDimension.y, i32 %6, 2
                   %rv = call i8* @cudaGetParameterBufferV2(i8* %func, {i32,i32,i32} %gridDimension.z, {i32,i32,i32} %blockDimension.z, i32 %7)
                   %buf = ptrtoint i8* %rv to i$WORD_SIZE
                   ret i$WORD_SIZE %buf"), Ptr{Cvoid},
                Tuple{Ptr{Cvoid}, Cuint, Cuint, Cuint, Cuint, Cuint, Cuint, Cuint},
                Base.unsafe_convert(Ptr{Cvoid}, Base.cconvert(Ptr{Cvoid}, func)),
                gridDimension.x, gridDimension.y, gridDimension.z,    # known to be Cuint
                blockDimension.x, blockDimension.y, blockDimension.z, # known to be Cuint
                Base.unsafe_convert(Cuint, Base.cconvert(Cuint, sharedMemSize)))
end

function cudaLaunchDevice_ptsz(func, parameterBuffer, gridDimension, blockDimension,
                               sharedMemSize, stream)
    ccall("extern cudaLaunchDevice_ptsz", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Ptr{Cvoid}, dim3, dim3, UInt32, cudaStream_t),
          func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream)
end

function cudaLaunchDeviceV2_ptsz(parameterBuffer, stream)
    ccall("extern cudaLaunchDeviceV2_ptsz", llvmcall, cudaError_t,
          (Ptr{Cvoid}, cudaStream_t),
          parameterBuffer, stream)
end

function cudaLaunchDevice(func, parameterBuffer, gridDimension, blockDimension,
                          sharedMemSize, stream)
    ccall("extern cudaLaunchDevice", llvmcall, cudaError_t,
          (Ptr{Cvoid}, Ptr{Cvoid}, dim3, dim3, UInt32, cudaStream_t),
          func, parameterBuffer, gridDimension, blockDimension, sharedMemSize, stream)
end

if VERSION >= v"1.2.0-DEV.512"
    function cudaLaunchDeviceV2(parameterBuffer, stream)
        ccall("extern cudaLaunchDeviceV2", llvmcall, cudaError_t,
            (Ptr{Cvoid}, cudaStream_t),
            parameterBuffer, stream)
    end
else
    @eval cudaLaunchDeviceV2(parameterBuffer, stream) =
            Base.llvmcall(
                $("declare i32 @cudaLaunchDeviceV2(i8*, i8*)",
                  "%buf = inttoptr i$WORD_SIZE %0 to i8*
                   %stream = inttoptr i$WORD_SIZE %1 to i8*
                   %rv = call i32 @cudaLaunchDeviceV2(i8* %buf, i8* %stream)
                   ret i32 %rv"), cudaError_t,
                Tuple{Ptr{Cvoid}, cudaStream_t},
                Base.unsafe_convert(Ptr{Cvoid}, Base.cconvert(Ptr{Cvoid}, parameterBuffer)),
                Base.unsafe_convert(cudaStream_t, Base.cconvert(cudaStream_t, stream)))
end

function cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize,
                                                       dynamicSmemSize)
    ccall("extern cudaOccupancyMaxActiveBlocksPerMultiprocessor", llvmcall, cudaError_t,
          (Ptr{Cint}, Ptr{Cvoid}, Cint, Csize_t),
          numBlocks, func, blockSize, dynamicSmemSize)
end

function cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize,
                                                                dynamicSmemSize, flags)
    ccall("extern cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", llvmcall, cudaError_t,
          (Ptr{Cint}, Ptr{Cvoid}, Cint, Csize_t, UInt32),
          numBlocks, func, blockSize, dynamicSmemSize, flags)
end

if VERSION >= v"1.2.0-DEV.512"
    function cudaCGGetIntrinsicHandle(scope)
        ccall("extern cudaCGGetIntrinsicHandle", llvmcall, Culonglong,
            (cudaCGScope,),
            scope)
    end
else
    @eval cudaCGGetIntrinsicHandle(scope) = Base.llvmcall(
        $("declare i64 @cudaCGGetIntrinsicHandle(i32)",
          "%rv = call i64 @cudaCGGetIntrinsicHandle(i32 1)
           ret i64 %rv"), Culonglong,
        Tuple{cudaCGScope},
        Base.unsafe_convert(cudaCGScope, Base.cconvert(cudaCGScope, scope)))
end

if VERSION >= v"1.2.0-DEV.512"
    function cudaCGSynchronize(handle, flags)
        ccall("extern cudaCGSynchronize", llvmcall, cudaError_t,
            (Culonglong, UInt32),
            handle, flags)
    end
else
    @eval cudaCGSynchronize(handle, flags) = Base.llvmcall(
        $("declare i32 @cudaCGSynchronize(i64, i32)",
         "%rv = call i32 @cudaCGSynchronize(i64 %0, i32 %1)
           ret i32 %rv"), cudaError_t,
        Tuple{Culonglong, UInt32},
        Base.unsafe_convert(Culonglong, Base.cconvert(Culonglong, handle)),
        Base.unsafe_convert(UInt32, Base.cconvert(UInt32, flags)))
end

function cudaCGSynchronizeGrid(handle, flags)
    ccall("extern cudaCGSynchronizeGrid", llvmcall, cudaError_t,
          (Culonglong, UInt32),
          handle, flags)
end

function cudaCGGetSize(numThreads, numGrids, handle)
    ccall("extern cudaCGGetSize", llvmcall, cudaError_t,
          (Ptr{UInt32}, Ptr{UInt32}, Culonglong),
          numThreads, numGrids, handle)
end

function cudaCGGetRank(threadRank, gridRank, handle)
    ccall("extern cudaCGGetRank", llvmcall, cudaError_t,
          (Ptr{UInt32}, Ptr{UInt32}, Culonglong),
          threadRank, gridRank, handle)
end


text:
function test_fun(x,y)
    2x+y
end

function test_dx(x,y)
    ForwardDiff.derivative(x->test_fun(x,y),x)
end

function newton(f,df,x₀; maxiter=100, tol = 1e-6)
    return 0.0
end

function test_update(s::String)
    s*"hello"
end

function test_update(x)
    0
end


text:
struct PermuteFactor{S<:Unsigned, T<:Unsigned} <: AbstractFactor{T}
    name::String
    levels::AbstractVector{<:AbstractString}
    basefactor::AbstractFactor{S}
    newindex::Vector{T}
end

Base.length(factor::PermuteFactor{T}) where {T<:Unsigned} = length(factor.basefactor)

function slice(factor::PermuteFactor{S, T}, fromobs::Integer, toobs::Integer, slicelength::Integer) where {T<:Unsigned} where {S<:Unsigned}
    newindex = factor.newindex
    f = (i::S -> newindex[i + 1])
    slicelength = verifyslicelength(fromobs, toobs, slicelength)
    slices = slice(factor.basefactor, fromobs, toobs, slicelength)
    mapslice(f, slices, slicelength, T)
end

function PermuteFactor(basefactor::AbstractFactor{T}, factortopermute::AbstractFactor{S}) where {T<:Unsigned} where {S<:Unsigned}
    baselevels = getlevels(basefactor)
    baselen = length(baselevels)
    permlevels = getlevels(factortopermute)
    unionlevels = union(Set(baselevels), Set(permlevels))
    difflevels = [x for x in setdiff(unionlevels, Set(baselevels))]
    levels = [i <= baselen ? baselevels[i] : difflevels[i - baselen] for i in 1:length(unionlevels)]
    newindex = [i == 0 ? 0 : findfirst(levels, permlevels[i]) for i in 0:length(permlevels)]
    if length(levels) <= typemax(UInt8)
        PermuteFactor{S, UInt8}(getname(factortopermute), levels, factortopermute, convert(Vector{UInt8}, newindex))
    elseif length(levels) <= typemax(UInt16)
        PermuteFactor{S, UInt16}(getname(factortopermute), levels, factortopermute, convert(Vector{UInt16}, newindex))
    else
        PermuteFactor{S, UInt32}(getname(factortopermute), levels, factortopermute, convert(Vector{UInt32}, newindex))
    end
end

function Base.map(factor::PermuteFactor, dataframe::AbstractDataFrame)
    islessfun = (x, y) -> isless(findfirst(factor.levels, x), findfirst(factor.levels, y))
    OrdinalFactor(factor.name, map(factor.basefactor, dataframe), islessfun)
end

max_stars_repo_name: Statfactory/JuML

max_issues_repo_name: Statfactory/JuML

max_forks_repo_name: Statfactory/JuML


text:
using StarAlgebras
using Documenter

DocMeta.setdocmeta!(StarAlgebras, :DocTestSetup, :(using StarAlgebras); recursive=true)

makedocs(;
    modules=[StarAlgebras],
    authors="Marek Kaluba <kalmar@mailbox.org>",
    repo="https://github.com/kalmar@amu.edu.pl/StarAlgebras.jl/blob/{commit}{path}#{line}",
    sitename="StarAlgebras.jl",
    format=Documenter.HTML(;
        prettyurls=get(ENV, "CI", "false") == "true",
        canonical="https://kalmar@amu.edu.pl.github.io/StarAlgebras.jl",
        assets=String[],
    ),
    pages=[
        "Home" => "index.md",
    ],
)

deploydocs(;
    repo="github.com/kalmar@amu.edu.pl/StarAlgebras.jl",
)