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

"""
    BatchDeleteBuilds()

Deletes one or more builds.

# Required Parameters
- `ids`: The IDs of the builds to delete.

"""
batch_delete_builds(ids; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchDeleteBuilds", Dict{String, Any}("ids"=>ids); aws_config=aws_config)
batch_delete_builds(ids, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchDeleteBuilds", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ids"=>ids), args)); aws_config=aws_config)

"""
    BatchGetBuildBatches()

Retrieves information about one or more batch builds.

# Required Parameters
- `ids`: An array that contains the batch build identifiers to retrieve.

"""
batch_get_build_batches(ids; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetBuildBatches", Dict{String, Any}("ids"=>ids); aws_config=aws_config)
batch_get_build_batches(ids, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetBuildBatches", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ids"=>ids), args)); aws_config=aws_config)

"""
    BatchGetBuilds()

Gets information about one or more builds.

# Required Parameters
- `ids`: The IDs of the builds.

"""
batch_get_builds(ids; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetBuilds", Dict{String, Any}("ids"=>ids); aws_config=aws_config)
batch_get_builds(ids, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetBuilds", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("ids"=>ids), args)); aws_config=aws_config)

"""
    BatchGetProjects()

Gets information about one or more build projects.

# Required Parameters
- `names`: The names or ARNs of the build projects. To get information about a project shared with your AWS account, its ARN must be specified. You cannot specify a shared project using its name.

"""
batch_get_projects(names; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetProjects", Dict{String, Any}("names"=>names); aws_config=aws_config)
batch_get_projects(names, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetProjects", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("names"=>names), args)); aws_config=aws_config)

"""
    BatchGetReportGroups()

 Returns an array of report groups.

# Required Parameters
- `reportGroupArns`:  An array of report group ARNs that identify the report groups to return.

"""
batch_get_report_groups(reportGroupArns; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetReportGroups", Dict{String, Any}("reportGroupArns"=>reportGroupArns); aws_config=aws_config)
batch_get_report_groups(reportGroupArns, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetReportGroups", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("reportGroupArns"=>reportGroupArns), args)); aws_config=aws_config)

"""
    BatchGetReports()

 Returns an array of reports.

# Required Parameters
- `reportArns`:  An array of ARNs that identify the Report objects to return.

"""
batch_get_reports(reportArns; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetReports", Dict{String, Any}("reportArns"=>reportArns); aws_config=aws_config)
batch_get_reports(reportArns, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("BatchGetReports", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("reportArns"=>reportArns), args)); aws_config=aws_config)

"""
    CreateProject()

Creates a build project.

# Required Parameters
- `artifacts`: Information about the build output artifacts for the build project.
- `environment`: Information about the build environment for the build project.
- `name`: The name of the build project.
- `serviceRole`: The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
- `source`: Information about the build input source code for the build project.

# Optional Parameters
- `badgeEnabled`: Set this to true to generate a publicly accessible URL for your project's build badge.
- `buildBatchConfig`: A ProjectBuildBatchConfig object that defines the batch build options for the project.
- `cache`: Stores recently used information so that it can be quickly accessed at a later time.
- `description`: A description that makes the build project easy to identify.
- `encryptionKey`: The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.  You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.   You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format alias/<alias-name>).
- `fileSystemLocations`:  An array of ProjectFileSystemLocation objects for a CodeBuild build project. A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint, and type of a file system created using Amazon Elastic File System.
- `logsConfig`: Information about logs for the build project. These can be logs in Amazon CloudWatch Logs, logs uploaded to a specified S3 bucket, or both.
- `queuedTimeoutInMinutes`: The number of minutes a build is allowed to be queued before it times out.
- `secondaryArtifacts`: An array of ProjectArtifacts objects.
- `secondarySourceVersions`: An array of ProjectSourceVersion objects. If secondarySourceVersions is specified at the build level, then they take precedence over these secondarySourceVersions (at the project level).
- `secondarySources`: An array of ProjectSource objects.
- `sourceVersion`: A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:    For AWS CodeCommit: the commit ID, branch, or Git tag to use.   For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID (for example pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.   For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.   For Amazon Simple Storage Service (Amazon S3): the version ID of the object that represents the build input ZIP file to use.   If sourceVersion is specified at the build level, then that version takes precedence over this sourceVersion (at the project level).  For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide.
- `tags`: A list of tag key and value pairs associated with this build project. These tags are available for use by AWS services that support AWS CodeBuild build project tags.
- `timeoutInMinutes`: How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before it times out any build that has not been marked as completed. The default is 60 minutes.
- `vpcConfig`: VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.
"""
create_project(artifacts, environment, name, serviceRole, source; aws_config::AWSConfig=global_aws_config()) = codebuild("CreateProject", Dict{String, Any}("artifacts"=>artifacts, "environment"=>environment, "name"=>name, "serviceRole"=>serviceRole, "source"=>source); aws_config=aws_config)
create_project(artifacts, environment, name, serviceRole, source, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("CreateProject", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("artifacts"=>artifacts, "environment"=>environment, "name"=>name, "serviceRole"=>serviceRole, "source"=>source), args)); aws_config=aws_config)

"""
    CreateReportGroup()

 Creates a report group. A report group contains a collection of reports.

# Required Parameters
- `exportConfig`:  A ReportExportConfig object that contains information about where the report group test results are exported.
- `name`:  The name of the report group.
- `type`:  The type of report group.

# Optional Parameters
- `tags`:  A list of tag key and value pairs associated with this report group.  These tags are available for use by AWS services that support AWS CodeBuild report group tags.
"""
create_report_group(exportConfig, name, type; aws_config::AWSConfig=global_aws_config()) = codebuild("CreateReportGroup", Dict{String, Any}("exportConfig"=>exportConfig, "name"=>name, "type"=>type); aws_config=aws_config)
create_report_group(exportConfig, name, type, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("CreateReportGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("exportConfig"=>exportConfig, "name"=>name, "type"=>type), args)); aws_config=aws_config)

"""
    CreateWebhook()

For an existing AWS CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, enables AWS CodeBuild to start rebuilding the source code every time a code change is pushed to the repository.  If you enable webhooks for an AWS CodeBuild project, and the project is used as a build step in AWS CodePipeline, then two identical builds are created for each commit. One build is triggered through webhooks, and one through AWS CodePipeline. Because billing is on a per-build basis, you are billed for both builds. Therefore, if you are using AWS CodePipeline, we recommend that you disable webhooks in AWS CodeBuild. In the AWS CodeBuild console, clear the Webhook box. For more information, see step 5 in Change a Build Project's Settings.

# Required Parameters
- `projectName`: The name of the AWS CodeBuild project.

# Optional Parameters
- `branchFilter`: A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.  It is recommended that you use filterGroups instead of branchFilter.
- `buildType`: Specifies the type of build this webhook will trigger.
- `filterGroups`: An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least one WebhookFilter in the array must specify EVENT as its type.  For a build to be triggered, at least one filter group in the filterGroups array must pass. For a filter group to pass, each of its filters must pass.
"""
create_webhook(projectName; aws_config::AWSConfig=global_aws_config()) = codebuild("CreateWebhook", Dict{String, Any}("projectName"=>projectName); aws_config=aws_config)
create_webhook(projectName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("CreateWebhook", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("projectName"=>projectName), args)); aws_config=aws_config)

"""
    DeleteBuildBatch()

Deletes a batch build.

# Required Parameters
- `id`: The identifier of the batch build to delete.

"""
delete_build_batch(id; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteBuildBatch", Dict{String, Any}("id"=>id); aws_config=aws_config)
delete_build_batch(id, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteBuildBatch", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("id"=>id), args)); aws_config=aws_config)

"""
    DeleteProject()

 Deletes a build project. When you delete a project, its builds are not deleted.

# Required Parameters
- `name`: The name of the build project.

"""
delete_project(name; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteProject", Dict{String, Any}("name"=>name); aws_config=aws_config)
delete_project(name, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteProject", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("name"=>name), args)); aws_config=aws_config)

"""
    DeleteReport()

 Deletes a report.

# Required Parameters
- `arn`:  The ARN of the report to delete.

"""
delete_report(arn; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteReport", Dict{String, Any}("arn"=>arn); aws_config=aws_config)
delete_report(arn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteReport", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("arn"=>arn), args)); aws_config=aws_config)

"""
    DeleteReportGroup()

Deletes a report group. Before you delete a report group, you must delete its reports.

# Required Parameters
- `arn`: The ARN of the report group to delete.

# Optional Parameters
- `deleteReports`: If true, deletes any reports that belong to a report group before deleting the report group.  If false, you must delete any reports in the report group. Use ListReportsForReportGroup to get the reports in a report group. Use DeleteReport to delete the reports. If you call DeleteReportGroup for a report group that contains one or more reports, an exception is thrown.
"""
delete_report_group(arn; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteReportGroup", Dict{String, Any}("arn"=>arn); aws_config=aws_config)
delete_report_group(arn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteReportGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("arn"=>arn), args)); aws_config=aws_config)

"""
    DeleteResourcePolicy()

 Deletes a resource policy that is identified by its resource ARN.

# Required Parameters
- `resourceArn`:  The ARN of the resource that is associated with the resource policy.

"""
delete_resource_policy(resourceArn; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteResourcePolicy", Dict{String, Any}("resourceArn"=>resourceArn); aws_config=aws_config)
delete_resource_policy(resourceArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteResourcePolicy", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("resourceArn"=>resourceArn), args)); aws_config=aws_config)

"""
    DeleteSourceCredentials()

 Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials.

# Required Parameters
- `arn`:  The Amazon Resource Name (ARN) of the token.

"""
delete_source_credentials(arn; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteSourceCredentials", Dict{String, Any}("arn"=>arn); aws_config=aws_config)
delete_source_credentials(arn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteSourceCredentials", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("arn"=>arn), args)); aws_config=aws_config)

"""
    DeleteWebhook()

For an existing AWS CodeBuild build project that has its source code stored in a GitHub or Bitbucket repository, stops AWS CodeBuild from rebuilding the source code every time a code change is pushed to the repository.

# Required Parameters
- `projectName`: The name of the AWS CodeBuild project.

"""
delete_webhook(projectName; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteWebhook", Dict{String, Any}("projectName"=>projectName); aws_config=aws_config)
delete_webhook(projectName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("DeleteWebhook", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("projectName"=>projectName), args)); aws_config=aws_config)

"""
    DescribeCodeCoverages()

Retrieves one or more code coverage reports.

# Required Parameters
- `reportArn`:  The ARN of the report for which test cases are returned.

# Optional Parameters
- `maxLineCoveragePercentage`: The maximum line coverage percentage to report.
- `maxResults`: The maximum number of results to return.
- `minLineCoveragePercentage`: The minimum line coverage percentage to report.
- `nextToken`: The nextToken value returned from a previous call to DescribeCodeCoverages. This specifies the next item to return. To return the beginning of the list, exclude this parameter.
- `sortBy`: Specifies how the results are sorted. Possible values are:  FILE_PATH  The results are sorted by file path.  LINE_COVERAGE_PERCENTAGE  The results are sorted by the percentage of lines that are covered.
- `sortOrder`: Specifies if the results are sorted in ascending or descending order.
"""
describe_code_coverages(reportArn; aws_config::AWSConfig=global_aws_config()) = codebuild("DescribeCodeCoverages", Dict{String, Any}("reportArn"=>reportArn); aws_config=aws_config)
describe_code_coverages(reportArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("DescribeCodeCoverages", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("reportArn"=>reportArn), args)); aws_config=aws_config)

"""
    DescribeTestCases()

 Returns a list of details about test cases for a report.

# Required Parameters
- `reportArn`:  The ARN of the report for which test cases are returned.

# Optional Parameters
- `filter`:  A TestCaseFilter object used to filter the returned reports.
- `maxResults`:  The maximum number of paginated test cases returned per response. Use nextToken to iterate pages in the list of returned TestCase objects. The default value is 100.
- `nextToken`:  During a previous call, the maximum number of items that can be returned is the value specified in maxResults. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
"""
describe_test_cases(reportArn; aws_config::AWSConfig=global_aws_config()) = codebuild("DescribeTestCases", Dict{String, Any}("reportArn"=>reportArn); aws_config=aws_config)
describe_test_cases(reportArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("DescribeTestCases", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("reportArn"=>reportArn), args)); aws_config=aws_config)

"""
    GetReportGroupTrend()

# Required Parameters
- `reportGroupArn`:
- `trendField`:

# Optional Parameters
- `numOfReports`:
"""
get_report_group_trend(reportGroupArn, trendField; aws_config::AWSConfig=global_aws_config()) = codebuild("GetReportGroupTrend", Dict{String, Any}("reportGroupArn"=>reportGroupArn, "trendField"=>trendField); aws_config=aws_config)
get_report_group_trend(reportGroupArn, trendField, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("GetReportGroupTrend", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("reportGroupArn"=>reportGroupArn, "trendField"=>trendField), args)); aws_config=aws_config)

"""
    GetResourcePolicy()

 Gets a resource policy that is identified by its resource ARN.

# Required Parameters
- `resourceArn`:  The ARN of the resource that is associated with the resource policy.

"""
get_resource_policy(resourceArn; aws_config::AWSConfig=global_aws_config()) = codebuild("GetResourcePolicy", Dict{String, Any}("resourceArn"=>resourceArn); aws_config=aws_config)
get_resource_policy(resourceArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("GetResourcePolicy", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("resourceArn"=>resourceArn), args)); aws_config=aws_config)

"""
    ImportSourceCredentials()

 Imports the source repository credentials for an AWS CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository.

# Required Parameters
- `authType`:  The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the AWS CodeBuild console.
- `serverType`:  The source provider used for this project.
- `token`:  For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is the app password.

# Optional Parameters
- `shouldOverwrite`:  Set to false to prevent overwriting the repository source credentials. Set to true to overwrite the repository source credentials. The default value is true.
- `username`:  The Bitbucket username when the authType is BASIC_AUTH. This parameter is not valid for other types of source providers or connections.
"""
import_source_credentials(authType, serverType, token; aws_config::AWSConfig=global_aws_config()) = codebuild("ImportSourceCredentials", Dict{String, Any}("authType"=>authType, "serverType"=>serverType, "token"=>token); aws_config=aws_config)
import_source_credentials(authType, serverType, token, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ImportSourceCredentials", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("authType"=>authType, "serverType"=>serverType, "token"=>token), args)); aws_config=aws_config)

"""
    InvalidateProjectCache()

Resets the cache for a project.

# Required Parameters
- `projectName`: The name of the AWS CodeBuild build project that the cache is reset for.

"""
invalidate_project_cache(projectName; aws_config::AWSConfig=global_aws_config()) = codebuild("InvalidateProjectCache", Dict{String, Any}("projectName"=>projectName); aws_config=aws_config)
invalidate_project_cache(projectName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("InvalidateProjectCache", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("projectName"=>projectName), args)); aws_config=aws_config)

"""
    ListBuildBatches()

Retrieves the identifiers of your build batches in the current region.

# Optional Parameters
- `filter`: A BuildBatchFilter object that specifies the filters for the search.
- `maxResults`: The maximum number of results to return.
- `nextToken`: The nextToken value returned from a previous call to ListBuildBatches. This specifies the next item to return. To return the beginning of the list, exclude this parameter.
- `sortOrder`: Specifies the sort order of the returned items. Valid values include:    ASCENDING: List the batch build identifiers in ascending order by identifier.    DESCENDING: List the batch build identifiers in descending order by identifier.
"""
list_build_batches(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListBuildBatches"; aws_config=aws_config)
list_build_batches(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListBuildBatches", args; aws_config=aws_config)

"""
    ListBuildBatchesForProject()

Retrieves the identifiers of the build batches for a specific project.

# Optional Parameters
- `filter`: A BuildBatchFilter object that specifies the filters for the search.
- `maxResults`: The maximum number of results to return.
- `nextToken`: The nextToken value returned from a previous call to ListBuildBatchesForProject. This specifies the next item to return. To return the beginning of the list, exclude this parameter.
- `projectName`: The name of the project.
- `sortOrder`: Specifies the sort order of the returned items. Valid values include:    ASCENDING: List the batch build identifiers in ascending order by identifier.    DESCENDING: List the batch build identifiers in descending order by identifier.
"""
list_build_batches_for_project(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListBuildBatchesForProject"; aws_config=aws_config)
list_build_batches_for_project(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListBuildBatchesForProject", args; aws_config=aws_config)

"""
    ListBuilds()

Gets a list of build IDs, with each build ID representing a single build.

# Optional Parameters
- `nextToken`: During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- `sortOrder`: The order to list build IDs. Valid values include:    ASCENDING: List the build IDs in ascending order by build ID.    DESCENDING: List the build IDs in descending order by build ID.
"""
list_builds(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListBuilds"; aws_config=aws_config)
list_builds(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListBuilds", args; aws_config=aws_config)

"""
    ListBuildsForProject()

Gets a list of build IDs for the specified build project, with each build ID representing a single build.

# Required Parameters
- `projectName`: The name of the AWS CodeBuild project.

# Optional Parameters
- `nextToken`: During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- `sortOrder`: The order to list build IDs. Valid values include:    ASCENDING: List the build IDs in ascending order by build ID.    DESCENDING: List the build IDs in descending order by build ID.
"""
list_builds_for_project(projectName; aws_config::AWSConfig=global_aws_config()) = codebuild("ListBuildsForProject", Dict{String, Any}("projectName"=>projectName); aws_config=aws_config)
list_builds_for_project(projectName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListBuildsForProject", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("projectName"=>projectName), args)); aws_config=aws_config)

"""
    ListCuratedEnvironmentImages()

Gets information about Docker images that are managed by AWS CodeBuild.

"""
list_curated_environment_images(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListCuratedEnvironmentImages"; aws_config=aws_config)
list_curated_environment_images(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListCuratedEnvironmentImages", args; aws_config=aws_config)

"""
    ListProjects()

Gets a list of build project names, with each build project name representing a single build project.

# Optional Parameters
- `nextToken`: During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a nextToken. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- `sortBy`: The criterion to be used to list build project names. Valid values include:    CREATED_TIME: List based on when each build project was created.    LAST_MODIFIED_TIME: List based on when information about each build project was last changed.    NAME: List based on each build project's name.   Use sortOrder to specify in what order to list the build project names based on the preceding criteria.
- `sortOrder`: The order in which to list build projects. Valid values include:    ASCENDING: List in ascending order.    DESCENDING: List in descending order.   Use sortBy to specify the criterion to be used to list build project names.
"""
list_projects(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListProjects"; aws_config=aws_config)
list_projects(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListProjects", args; aws_config=aws_config)

"""
    ListReportGroups()

 Gets a list ARNs for the report groups in the current AWS account.

# Optional Parameters
- `maxResults`:  The maximum number of paginated report groups returned per response. Use nextToken to iterate pages in the list of returned ReportGroup objects. The default value is 100.
- `nextToken`:  During a previous call, the maximum number of items that can be returned is the value specified in maxResults. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- `sortBy`:  The criterion to be used to list build report groups. Valid values include:     CREATED_TIME: List based on when each report group was created.    LAST_MODIFIED_TIME: List based on when each report group was last changed.    NAME: List based on each report group's name.
- `sortOrder`:  Used to specify the order to sort the list of returned report groups. Valid values are ASCENDING and DESCENDING.
"""
list_report_groups(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListReportGroups"; aws_config=aws_config)
list_report_groups(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListReportGroups", args; aws_config=aws_config)

"""
    ListReports()

 Returns a list of ARNs for the reports in the current AWS account.

# Optional Parameters
- `filter`:  A ReportFilter object used to filter the returned reports.
- `maxResults`:  The maximum number of paginated reports returned per response. Use nextToken to iterate pages in the list of returned Report objects. The default value is 100.
- `nextToken`:  During a previous call, the maximum number of items that can be returned is the value specified in maxResults. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- `sortOrder`:  Specifies the sort order for the list of returned reports. Valid values are:     ASCENDING: return reports in chronological order based on their creation date.     DESCENDING: return reports in the reverse chronological order based on their creation date.
"""
list_reports(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListReports"; aws_config=aws_config)
list_reports(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListReports", args; aws_config=aws_config)

"""
    ListReportsForReportGroup()

 Returns a list of ARNs for the reports that belong to a ReportGroup.

# Required Parameters
- `reportGroupArn`:  The ARN of the report group for which you want to return report ARNs.

# Optional Parameters
- `filter`:  A ReportFilter object used to filter the returned reports.
- `maxResults`:  The maximum number of paginated reports in this report group returned per response. Use nextToken to iterate pages in the list of returned Report objects. The default value is 100.
- `nextToken`:  During a previous call, the maximum number of items that can be returned is the value specified in maxResults. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- `sortOrder`:  Use to specify whether the results are returned in ascending or descending order.
"""
list_reports_for_report_group(reportGroupArn; aws_config::AWSConfig=global_aws_config()) = codebuild("ListReportsForReportGroup", Dict{String, Any}("reportGroupArn"=>reportGroupArn); aws_config=aws_config)
list_reports_for_report_group(reportGroupArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListReportsForReportGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("reportGroupArn"=>reportGroupArn), args)); aws_config=aws_config)

"""
    ListSharedProjects()

 Gets a list of projects that are shared with other AWS accounts or users.

# Optional Parameters
- `maxResults`:  The maximum number of paginated shared build projects returned per response. Use nextToken to iterate pages in the list of returned Project objects. The default value is 100.
- `nextToken`:  During a previous call, the maximum number of items that can be returned is the value specified in maxResults. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- `sortBy`:  The criterion to be used to list build projects shared with the current AWS account or user. Valid values include:     ARN: List based on the ARN.     MODIFIED_TIME: List based on when information about the shared project was last changed.
- `sortOrder`: The order in which to list shared build projects. Valid values include:    ASCENDING: List in ascending order.    DESCENDING: List in descending order.
"""
list_shared_projects(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListSharedProjects"; aws_config=aws_config)
list_shared_projects(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListSharedProjects", args; aws_config=aws_config)

"""
    ListSharedReportGroups()

 Gets a list of report groups that are shared with other AWS accounts or users.

# Optional Parameters
- `maxResults`:  The maximum number of paginated shared report groups per response. Use nextToken to iterate pages in the list of returned ReportGroup objects. The default value is 100.
- `nextToken`:  During a previous call, the maximum number of items that can be returned is the value specified in maxResults. If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
- `sortBy`:  The criterion to be used to list report groups shared with the current AWS account or user. Valid values include:     ARN: List based on the ARN.     MODIFIED_TIME: List based on when information about the shared report group was last changed.
- `sortOrder`: The order in which to list shared report groups. Valid values include:    ASCENDING: List in ascending order.    DESCENDING: List in descending order.
"""
list_shared_report_groups(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListSharedReportGroups"; aws_config=aws_config)
list_shared_report_groups(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListSharedReportGroups", args; aws_config=aws_config)

"""
    ListSourceCredentials()

 Returns a list of SourceCredentialsInfo objects.

"""
list_source_credentials(; aws_config::AWSConfig=global_aws_config()) = codebuild("ListSourceCredentials"; aws_config=aws_config)
list_source_credentials(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("ListSourceCredentials", args; aws_config=aws_config)

"""
    PutResourcePolicy()

 Stores a resource policy for the ARN of a Project or ReportGroup object.

# Required Parameters
- `policy`:  A JSON-formatted resource policy. For more information, see Sharing a Project and Sharing a Report Group in the AWS CodeBuild User Guide.
- `resourceArn`:  The ARN of the Project or ReportGroup resource you want to associate with a resource policy.

"""
put_resource_policy(policy, resourceArn; aws_config::AWSConfig=global_aws_config()) = codebuild("PutResourcePolicy", Dict{String, Any}("policy"=>policy, "resourceArn"=>resourceArn); aws_config=aws_config)
put_resource_policy(policy, resourceArn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("PutResourcePolicy", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("policy"=>policy, "resourceArn"=>resourceArn), args)); aws_config=aws_config)

"""
    RetryBuild()

Restarts a build.

# Optional Parameters
- `id`: Specifies the identifier of the build to restart.
- `idempotencyToken`: A unique, case sensitive identifier you provide to ensure the idempotency of the RetryBuild request. The token is included in the RetryBuild request and is valid for five minutes. If you repeat the RetryBuild request with the same token, but change a parameter, AWS CodeBuild returns a parameter mismatch error.
"""
retry_build(; aws_config::AWSConfig=global_aws_config()) = codebuild("RetryBuild"; aws_config=aws_config)
retry_build(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("RetryBuild", args; aws_config=aws_config)

"""
    RetryBuildBatch()

Restarts a failed batch build. Only batch builds that have failed can be retried.

# Optional Parameters
- `id`: Specifies the identifier of the batch build to restart.
- `idempotencyToken`: A unique, case sensitive identifier you provide to ensure the idempotency of the RetryBuildBatch request. The token is included in the RetryBuildBatch request and is valid for five minutes. If you repeat the RetryBuildBatch request with the same token, but change a parameter, AWS CodeBuild returns a parameter mismatch error.
- `retryType`: Specifies the type of retry to perform.
"""
retry_build_batch(; aws_config::AWSConfig=global_aws_config()) = codebuild("RetryBuildBatch"; aws_config=aws_config)
retry_build_batch(args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("RetryBuildBatch", args; aws_config=aws_config)

"""
    StartBuild()

Starts running a build.

# Required Parameters
- `projectName`: The name of the AWS CodeBuild build project to start running a build.

# Optional Parameters
- `artifactsOverride`: Build output artifact settings that override, for this build only, the latest ones already defined in the build project.
- `buildStatusConfigOverride`: Contains information that defines how the build project reports the build status to the source provider. This option is only used when the source provider is GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.
- `buildspecOverride`: A buildspec file declaration that overrides, for this build only, the latest one already defined in the build project.  If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket. The bucket must be in the same AWS Region as the build project. Specify the buildspec file using its ARN (for example, arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see Buildspec File Name and Storage Location.
- `cacheOverride`: A ProjectCache object specified for this build that overrides the one defined in the build project.
- `certificateOverride`: The name of a certificate for this build that overrides the one specified in the build project.
- `computeTypeOverride`: The name of a compute type for this build that overrides the one specified in the build project.
- `debugSessionEnabled`: Specifies if session debugging is enabled for this build. For more information, see Viewing a running build in Session Manager.
- `encryptionKeyOverride`: The AWS Key Management Service (AWS KMS) customer master key (CMK) that overrides the one specified in the build project. The CMK key encrypts the build output artifacts.   You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.   You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format alias/<alias-name>).
- `environmentTypeOverride`: A container type for this build that overrides the one specified in the build project.
- `environmentVariablesOverride`: A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.
- `gitCloneDepthOverride`: The user-defined depth of history, with a minimum value of 0, that overrides, for this build only, any previous depth of history defined in the build project.
- `gitSubmodulesConfigOverride`:  Information about the Git submodules configuration for this build of an AWS CodeBuild build project.
- `idempotencyToken`: A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuild request. The token is included in the StartBuild request and is valid for 5 minutes. If you repeat the StartBuild request with the same token, but change a parameter, AWS CodeBuild returns a parameter mismatch error.
- `imageOverride`: The name of an image for this build that overrides the one specified in the build project.
- `imagePullCredentialsTypeOverride`: The type of credentials AWS CodeBuild uses to pull images in your build. There are two valid values:   CODEBUILD  Specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.  SERVICE_ROLE  Specifies that AWS CodeBuild uses your build project's service role.    When using a cross-account or private registry image, you must use SERVICE_ROLE credentials. When using an AWS CodeBuild curated image, you must use CODEBUILD credentials.
- `insecureSslOverride`: Enable this flag to override the insecure SSL setting that is specified in the build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.
- `logsConfigOverride`:  Log settings for this build that override the log settings defined in the build project.
- `privilegedModeOverride`: Enable this flag to override privileged mode in the build project.
- `queuedTimeoutInMinutesOverride`:  The number of minutes a build is allowed to be queued before it times out.
- `registryCredentialOverride`:  The credentials for access to a private registry.
- `reportBuildStatusOverride`:  Set to true to report to your source provider the status of a build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, or Bitbucket, an invalidInputException is thrown.    The status of a build triggered by a webhook is always reported to your source provider.
- `secondaryArtifactsOverride`:  An array of ProjectArtifacts objects.
- `secondarySourcesOverride`:  An array of ProjectSource objects.
- `secondarySourcesVersionOverride`:  An array of ProjectSourceVersion objects that specify one or more versions of the project's secondary sources to be used for this build only.
- `serviceRoleOverride`: The name of a service role for this build that overrides the one specified in the build project.
- `sourceAuthOverride`: An authorization type for this build that overrides the one defined in the build project. This override applies only if the build project's source is BitBucket or GitHub.
- `sourceLocationOverride`: A location that overrides, for this build, the source location for the one defined in the build project.
- `sourceTypeOverride`: A source input type, for this build, that overrides the source input defined in the build project.
- `sourceVersion`: The version of the build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:  AWS CodeCommit  The commit ID, branch, or Git tag to use.  GitHub  The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID (for example pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.  Bitbucket  The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.  Amazon Simple Storage Service (Amazon S3)  The version ID of the object that represents the build input ZIP file to use.   If sourceVersion is specified at the project level, then this sourceVersion (at the build level) takes precedence.  For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide.
- `timeoutInMinutesOverride`: The number of build timeout minutes, from 5 to 480 (8 hours), that overrides, for this build only, the latest setting already defined in the build project.
"""
start_build(projectName; aws_config::AWSConfig=global_aws_config()) = codebuild("StartBuild", Dict{String, Any}("projectName"=>projectName); aws_config=aws_config)
start_build(projectName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("StartBuild", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("projectName"=>projectName), args)); aws_config=aws_config)

"""
    StartBuildBatch()

Starts a batch build for a project.

# Required Parameters
- `projectName`: The name of the project.

# Optional Parameters
- `artifactsOverride`: An array of ProjectArtifacts objects that contains information about the build output artifact overrides for the build project.
- `buildBatchConfigOverride`: A BuildBatchConfigOverride object that contains batch build configuration overrides.
- `buildTimeoutInMinutesOverride`: Overrides the build timeout specified in the batch build project.
- `buildspecOverride`: A buildspec file declaration that overrides, for this build only, the latest one already defined in the build project. If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket. The bucket must be in the same AWS Region as the build project. Specify the buildspec file using its ARN (for example, arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see Buildspec File Name and Storage Location.
- `cacheOverride`: A ProjectCache object that specifies cache overrides.
- `certificateOverride`: The name of a certificate for this batch build that overrides the one specified in the batch build project.
- `computeTypeOverride`: The name of a compute type for this batch build that overrides the one specified in the batch build project.
- `encryptionKeyOverride`: The AWS Key Management Service (AWS KMS) customer master key (CMK) that overrides the one specified in the batch build project. The CMK key encrypts the build output artifacts.  You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.   You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format alias/<alias-name>).
- `environmentTypeOverride`: A container type for this batch build that overrides the one specified in the batch build project.
- `environmentVariablesOverride`: An array of EnvironmentVariable objects that override, or add to, the environment variables defined in the batch build project.
- `gitCloneDepthOverride`: The user-defined depth of history, with a minimum value of 0, that overrides, for this batch build only, any previous depth of history defined in the batch build project.
- `gitSubmodulesConfigOverride`: A GitSubmodulesConfig object that overrides the Git submodules configuration for this batch build.
- `idempotencyToken`: A unique, case sensitive identifier you provide to ensure the idempotency of the StartBuildBatch request. The token is included in the StartBuildBatch request and is valid for five minutes. If you repeat the StartBuildBatch request with the same token, but change a parameter, AWS CodeBuild returns a parameter mismatch error.
- `imageOverride`: The name of an image for this batch build that overrides the one specified in the batch build project.
- `imagePullCredentialsTypeOverride`: The type of credentials AWS CodeBuild uses to pull images in your batch build. There are two valid values:   CODEBUILD  Specifies that AWS CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust AWS CodeBuild's service principal.  SERVICE_ROLE  Specifies that AWS CodeBuild uses your build project's service role.    When using a cross-account or private registry image, you must use SERVICE_ROLE credentials. When using an AWS CodeBuild curated image, you must use CODEBUILD credentials.
- `insecureSslOverride`: Enable this flag to override the insecure SSL setting that is specified in the batch build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.
- `logsConfigOverride`: A LogsConfig object that override the log settings defined in the batch build project.
- `privilegedModeOverride`: Enable this flag to override privileged mode in the batch build project.
- `queuedTimeoutInMinutesOverride`: The number of minutes a batch build is allowed to be queued before it times out.
- `registryCredentialOverride`: A RegistryCredential object that overrides credentials for access to a private registry.
- `reportBuildBatchStatusOverride`: Set to true to report to your source provider the status of a batch build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, or Bitbucket, an invalidInputException is thrown.   The status of a build triggered by a webhook is always reported to your source provider.
- `secondaryArtifactsOverride`: An array of ProjectArtifacts objects that override the secondary artifacts defined in the batch build project.
- `secondarySourcesOverride`: An array of ProjectSource objects that override the secondary sources defined in the batch build project.
- `secondarySourcesVersionOverride`: An array of ProjectSourceVersion objects that override the secondary source versions in the batch build project.
- `serviceRoleOverride`: The name of a service role for this batch build that overrides the one specified in the batch build project.
- `sourceAuthOverride`: A SourceAuth object that overrides the one defined in the batch build project. This override applies only if the build project's source is BitBucket or GitHub.
- `sourceLocationOverride`: A location that overrides, for this batch build, the source location defined in the batch build project.
- `sourceTypeOverride`: The source input type that overrides the source input defined in the batch build project.
- `sourceVersion`: The version of the batch build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:  AWS CodeCommit  The commit ID, branch, or Git tag to use.  GitHub  The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID (for example pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.  Bitbucket  The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.  Amazon Simple Storage Service (Amazon S3)  The version ID of the object that represents the build input ZIP file to use.   If sourceVersion is specified at the project level, then this sourceVersion (at the build level) takes precedence.  For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide.
"""
start_build_batch(projectName; aws_config::AWSConfig=global_aws_config()) = codebuild("StartBuildBatch", Dict{String, Any}("projectName"=>projectName); aws_config=aws_config)
start_build_batch(projectName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("StartBuildBatch", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("projectName"=>projectName), args)); aws_config=aws_config)

"""
    StopBuild()

Attempts to stop running a build.

# Required Parameters
- `id`: The ID of the build.

"""
stop_build(id; aws_config::AWSConfig=global_aws_config()) = codebuild("StopBuild", Dict{String, Any}("id"=>id); aws_config=aws_config)
stop_build(id, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("StopBuild", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("id"=>id), args)); aws_config=aws_config)

"""
    StopBuildBatch()

Stops a running batch build.

# Required Parameters
- `id`: The identifier of the batch build to stop.

"""
stop_build_batch(id; aws_config::AWSConfig=global_aws_config()) = codebuild("StopBuildBatch", Dict{String, Any}("id"=>id); aws_config=aws_config)
stop_build_batch(id, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("StopBuildBatch", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("id"=>id), args)); aws_config=aws_config)

"""
    UpdateProject()

Changes the settings of a build project.

# Required Parameters
- `name`: The name of the build project.  You cannot change a build project's name.

# Optional Parameters
- `artifacts`: Information to be changed about the build output artifacts for the build project.
- `badgeEnabled`: Set this to true to generate a publicly accessible URL for your project's build badge.
- `buildBatchConfig`:
- `cache`: Stores recently used information so that it can be quickly accessed at a later time.
- `description`: A new or replacement description of the build project.
- `encryptionKey`: The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.   You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.   You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format alias/<alias-name>).
- `environment`: Information to be changed about the build environment for the build project.
- `fileSystemLocations`:  An array of ProjectFileSystemLocation objects for a CodeBuild build project. A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint, and type of a file system created using Amazon Elastic File System.
- `logsConfig`:  Information about logs for the build project. A project can create logs in Amazon CloudWatch Logs, logs in an S3 bucket, or both.
- `queuedTimeoutInMinutes`:  The number of minutes a build is allowed to be queued before it times out.
- `secondaryArtifacts`:  An array of ProjectSource objects.
- `secondarySourceVersions`:  An array of ProjectSourceVersion objects. If secondarySourceVersions is specified at the build level, then they take over these secondarySourceVersions (at the project level).
- `secondarySources`:  An array of ProjectSource objects.
- `serviceRole`: The replacement ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.
- `source`: Information to be changed about the build input source code for the build project.
- `sourceVersion`:  A version of the build input to be built for this project. If not specified, the latest version is used. If specified, it must be one of:    For AWS CodeCommit: the commit ID, branch, or Git tag to use.   For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format pr/pull-request-ID (for example pr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.   For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.   For Amazon Simple Storage Service (Amazon S3): the version ID of the object that represents the build input ZIP file to use.    If sourceVersion is specified at the build level, then that version takes precedence over this sourceVersion (at the project level).   For more information, see Source Version Sample with CodeBuild in the AWS CodeBuild User Guide.
- `tags`: An updated list of tag key and value pairs associated with this build project. These tags are available for use by AWS services that support AWS CodeBuild build project tags.
- `timeoutInMinutes`: The replacement value in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed.
- `vpcConfig`: VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC.
"""
update_project(name; aws_config::AWSConfig=global_aws_config()) = codebuild("UpdateProject", Dict{String, Any}("name"=>name); aws_config=aws_config)
update_project(name, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("UpdateProject", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("name"=>name), args)); aws_config=aws_config)

"""
    UpdateReportGroup()

 Updates a report group.

# Required Parameters
- `arn`:  The ARN of the report group to update.

# Optional Parameters
- `exportConfig`:  Used to specify an updated export type. Valid values are:     S3: The report results are exported to an S3 bucket.     NO_EXPORT: The report results are not exported.
- `tags`:  An updated list of tag key and value pairs associated with this report group.  These tags are available for use by AWS services that support AWS CodeBuild report group tags.
"""
update_report_group(arn; aws_config::AWSConfig=global_aws_config()) = codebuild("UpdateReportGroup", Dict{String, Any}("arn"=>arn); aws_config=aws_config)
update_report_group(arn, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("UpdateReportGroup", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("arn"=>arn), args)); aws_config=aws_config)

"""
    UpdateWebhook()

 Updates the webhook associated with an AWS CodeBuild build project.    If you use Bitbucket for your repository, rotateSecret is ignored.

# Required Parameters
- `projectName`: The name of the AWS CodeBuild project.

# Optional Parameters
- `branchFilter`: A regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If branchFilter is empty, then all branches are built.   It is recommended that you use filterGroups instead of branchFilter.
- `buildType`: Specifies the type of build this webhook will trigger.
- `filterGroups`:  An array of arrays of WebhookFilter objects used to determine if a webhook event can trigger a build. A filter group must contain at least one EVENT WebhookFilter.
- `rotateSecret`:  A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you use Bitbucket for your repository, rotateSecret is ignored.
"""
update_webhook(projectName; aws_config::AWSConfig=global_aws_config()) = codebuild("UpdateWebhook", Dict{String, Any}("projectName"=>projectName); aws_config=aws_config)
update_webhook(projectName, args::AbstractDict{String, <:Any}; aws_config::AWSConfig=global_aws_config()) = codebuild("UpdateWebhook", Dict{String, Any}(mergewith(_merge, Dict{String, Any}("projectName"=>projectName), args)); aws_config=aws_config)


text:
using SlidingDistancesBase
using Distances
using Test, Statistics
using SlidingDistancesBase: window_dot

norm = x -> sqrt(sum(abs2, x))

@testset "SlidingDistancesBase.jl" begin

    @testset "utils" begin
        @info "Testing utils"
        @test floattype(Int) == Float64
        @test floattype(Float32) == Float32
        @test floattype(missing) == Float64

        v = collect(1:3)
        @test v[!,1] == 1
        @test v[!,1:2] == 1:2

        v = copy([v v]')
        @test v[!,1] == [1,1]
        @test v[!,1:2] == [1 2; 1 2]

        v = cat(v,v,dims=3)
        @test v[!,1] == [1 2 3; 1 2 3]
        @test v[!,1:2] == cat([1 2 3; 1 2 3], [1 2 3; 1 2 3], dims=3)

        v = cat(v,v,dims=4)
        @test v[!,1] == cat([1 2 3; 1 2 3], [1 2 3; 1 2 3], dims=3)

        v[!,2] = zeros(2,3,2)
        @test all(v[:,:,:,2] .== 0)

        v = collect(1:3)
        v[!,1] = 5
        @test v[1] == 5
        v[!,1:2] = 5:6
        @test v[2] == 6

        v = copy([v v]')
        v[!,1] = [5,5]
        @test v[:,1] == [5,5]
        v[!,1:2] = [5 6; 5 6]
        @test v[:,1:2] == [5 6; 5 6]
        @test getwindow(v,2,1) == [5 6; 5 6]

        v = cat(v,v,dims=3)
        v[!,1] = [1 2 3; 1 2 3]
        v[!,1:2] = cat([1 2 3; 1 2 3], [1 2 3; 1 2 3], dims=3)

    end

    @testset "meanstd" begin
        @info "Testing meanstd"
        x = randn(100)
        m,s = meanstd(x)
        @test m ≈ mean(x)
        @test s ≈ std(x, corrected=false)
    end

    @testset "ZEuclidean" begin
        @info "Testing ZEuclidean"
        d = ZEuclidean()
        x,y = randn(100) .+ 1, 2randn(100)
        @test evaluate(d,x,y) ≈ d(x,y) ≈ evaluate(Euclidean(), znorm(x), znorm(y))
    end

    @testset "generic distace_profile" begin
        @info "Testing generic distace_profile"

        dist = (x, y) -> norm(x - y)
        Q = randn(10)
        T = randn(11)
        P = distance_profile(dist, Q, T)
        @test P[1] == dist(Q, T[1:end-1])
        @test P[2] == dist(Q, T[2:end])
        P2 = distance_profile!(zeros(2), dist, Q, T)
        @test P2 ≈ P
        @test_throws ArgumentError distance_profile(dist, T, Q)
    end

    @testset "Euclidean distance_profile" begin
        @info "Testing Euclidean distance_profile"

       Q = randn(5)
       T = [randn(5); Q; randn(5)]
       D = distance_profile(ZEuclidean(), Q, T)
       @test D[6] < 1e-6
       @test D[1] ≈ norm(znorm(Q) - znorm(T[1:5]))
    end

    @testset "running stats" begin
        @info "Testing running stats"
        l1 = l2 = 20
        w = 4
        for l1 = [20,30]
            for l2 = [20,30]
                x = rand(l1)
                y = rand(l2)
                for w = 4:2:10
                    mx,sx = sliding_mean_std(x, w)
                    @test length(mx) == length(sx) == length(x)-w+1
                    @test mx[1] ≈ mean(x[1:w])
                    @test sx[1] ≈ std(x[1:w], corrected=false)

                    @test mx[2] ≈ mean(x[2:w+1])
                    @test sx[2] ≈ std(x[2:w+1], corrected=false)

                    @test sliding_mean!(similar(mx), x, w) ≈ mx

                    my,sy = sliding_mean_std(y, w)
                    QT = window_dot(getwindow(x,w,1), y)
                    D = distance_profile(ZEuclidean(), QT, mx,sx,my,sy,w)
                    @test D[1] ≈ ZEuclidean()(x[1:w], y[1:w])        atol=1e-5
                    @test D[2] ≈ ZEuclidean()(x[1:w], y[1 .+ (1:w)]) atol=1e-5
                    @test D[5] ≈ ZEuclidean()(x[1:w], y[4 .+ (1:w)]) atol=1e-5

                    QT = window_dot(getwindow(y,w,1), y)
                    D = distance_profile(ZEuclidean(), QT,my,sy,w)
                    @test D[1] == Inf # This is convention is this method to not return trivial matches
                    @test D[2] ≈ ZEuclidean()(y[1:w], y[1 .+ (1:w)]) atol=1e-5
                    @test D[5] ≈ ZEuclidean()(y[1:w], y[4 .+ (1:w)]) atol=1e-5

                    entropy = x -> -sum(x.*log.(x))
                    ent = sliding_entropy(x, w)
                    @test length(ent) == length(x)-w+1
                    @test ent[1] ≈ entropy(x[1:w])
                    @test ent[2] ≈ entropy(x[2:w+1])

                    sum1 = x -> x./sum(x)
                    ent = sliding_entropy_normalized(x, w)
                    @test length(ent) == length(x)-w+1
                    @test ent[1] ≈ entropy(sum1(x)[1:w])
                    @test ent[2] ≈ entropy(sum1(x)[2:w+1])

                end

                x = rand(2, l1)
                y = rand(2, l2)
                for w = 4:2:10
                    mx,sx = sliding_mean_std(x, w)
                    @test lastlength(mx) == lastlength(sx) == lastlength(x)-w+1
                    @test mx[:,1] ≈ mean(x[:,1:w], dims=2)
                    @test sx[:,1] ≈ std(x[:,1:w], dims=2, corrected=false)

                    @test mx[:,2] ≈ mean(x[:,2:w+1], dims=2)
                    @test sx[:,2] ≈ std(x[:,2:w+1], dims=2, corrected=false)

                    entropy = x -> -sum(x.*log.(x))
                    ent = sliding_entropy(x, w)
                    @test length(ent) == lastlength(x)-w+1
                    @test ent[1] ≈ entropy(x[:,1:w])
                    @test ent[2] ≈ entropy(x[:,2:w+1])

                    sum1 = x -> x./sum(x, dims=2)
                    ent = sliding_entropy_normalized(x, w)
                    @test length(ent) == lastlength(x)-w+1
                    @test ent[1] ≈ entropy(sum1(x)[:,1:w])
                    @test ent[2] ≈ entropy(sum1(x)[:,2:w+1])

                end
            end
        end
    end

    @testset "SearchResultInterface" begin
        @info "Testing SearchResultInterface"

        tg        = randn(3)
        val       = 4
        ind       = 2
        batch_ind = 3
        pl        = randn(5)

        r = BatchSearchResult(tg, val, ind, batch_ind, pl)

        @test value(r)        == val
        @test value(1)        == 1
        @test location(r)     == ind
        @test payload(r)      == pl
        @test target(r)       == tg
        @test targetlength(r) == 3

        @test 1 < r < 100
        @test !(r < r)
        @test 2r == 8
        @test r == r
        @test sort([2r, r]) == [r, 2r]

        @test promote_rule(Float64, typeof(r)) == Float64
        @test convert(Float64, r) == val

        @test pl[r] == pl[ind:ind+length(tg)-1]
        @test ["1","2","3","4"][r] == "3"
    end

    @testset "Normalizers" begin
        @info "Testing Normalizers"
        include("test_normalizers.jl")

    end

end

# d = ZEuclidean()
# x = randn(100)
# @code_llvm meanstd(x)
# @code_llvm evaluate(d,x,x)
# @btime meanstd($x)
# @btime evaluate($d,$x,$x)

ext: jl


text:
module VortexHelperColorSwitch
using ..Ahorn, Maple

const colors = ["blue", "rose", "orange", "lime"]

@mapdef Entity "VortexHelper/ColorSwitch" ColorSwitch(
			x::Integer, y::Integer,
			width::Integer=16, height::Integer=16,
			blue::Bool=false, rose::Bool=false, orange::Bool=false, lime::Bool=false, random::Bool=false)

const placements = Ahorn.PlacementDict(
    "Color Switch (All, Cycle) (Vortex Helper)" => Ahorn.EntityPlacement(
        ColorSwitch,
		"rectangle",
		Dict{String, Any}(
            "blue" => true, "rose" => true, "orange" => true, "lime" => true
        )
	),
    "Color Switch (All, Random) (Vortex Helper)" => Ahorn.EntityPlacement(
        ColorSwitch,
		"rectangle",
		Dict{String, Any}(
            "blue" => true, "rose" => true, "orange" => true, "lime" => true, "random" => true
        )
	)
)

const block = "objects/VortexHelper/onoff/switch"
const tileTint = Ahorn.colorTupleType((0.5, 0.5, 0.5, 1.0))
const backColor = (40, 40, 40, 255) ./ 255

Ahorn.minimumSize(entity::ColorSwitch) = 16, 16
Ahorn.resizable(entity::ColorSwitch) = true, true

Ahorn.selection(entity::ColorSwitch) = Ahorn.getEntityRectangle(entity)

function renderColorSwitch(ctx::Ahorn.Cairo.CairoContext, x::Number, y::Number, width::Number, height::Number)
	tilesWidth = div(width, 8)
    tilesHeight = div(height, 8)

	Ahorn.drawRectangle(ctx, x + 2, y + 2, width - 4, height - 4, backColor)

    for i in 2:tilesWidth - 1
        Ahorn.drawImage(ctx, block, x + (i - 1) * 8, y, 8, 0, 8, 8, tint=tileTint)
        Ahorn.drawImage(ctx, block, x + (i - 1) * 8, y + height - 8, 8, 16, 8, 8, tint=tileTint)
    end

    for i in 2:tilesHeight - 1
        Ahorn.drawImage(ctx, block, x, y + (i - 1) * 8, 0, 8, 8, 8, tint=tileTint)
        Ahorn.drawImage(ctx, block, x + width - 8, y + (i - 1) * 8, 16, 8, 8, 8, tint=tileTint)
    end

    Ahorn.drawImage(ctx, block, x, y, 0, 0, 8, 8, tint=tileTint)
    Ahorn.drawImage(ctx, block, x + width - 8, y, 16, 0, 8, 8, tint=tileTint)
    Ahorn.drawImage(ctx, block, x, y + height - 8, 0, 16, 8, 8, tint=tileTint)
    Ahorn.drawImage(ctx, block, x + width - 8, y + height - 8, 16, 16, 8, 8, tint=tileTint)
end

function Ahorn.renderAbs(ctx::Ahorn.Cairo.CairoContext, entity::ColorSwitch, room::Maple.Room)
	x = Int(get(entity.data, "x", 0))
    y = Int(get(entity.data, "y", 0))

    width = Int(get(entity.data, "width", 16))
    height = Int(get(entity.data, "height", 16))

    renderColorSwitch(ctx, x, y, width, height)
end

end

max_stars_repo_name: catapillie/VortexHelper

max_issues_repo_name: catapillie/VortexHelper

max_forks_repo_name: catapillie/VortexHelper


text:
using PowerSystemCaseBuilder

show_systems()

show_categories()

show_systems(SIIPExampleSystems)

sys = build_system(SIIPExampleSystems, "5_bus_hydro_ed_sys")

# This file was generated using Literate.jl, https://github.com/fredrikekre/Literate.jl


text:
# function show_label(label::Label)
#     println("time=$(label.time), load=$(label.load), cost=$(label.cost), path=$(label.path)")
# end

function is_identical(label::Label, other_label::Label)
    if label.cost != other_label.cost
        return false
    elseif label.time != other_label.time
        return false
    elseif label.load != other_label.load
        return false
    else
        for i in 1:length(label.flag)
            if label.flag[i] != other_label.flag[i]
                return false
            end
        end
    end
    return true
    # is_same = label.path == other_label.path
    # has_same_values = label.cost == other_label.cost &&
    #                     label.time == other_label.time &&
    #                     label.load == other_label.load &&
    #                     label.flag == other_label.flag

    # return has_same_values
end

function dominate(label::Label, other_label::Label, pg::ESPPRC_Instance)
    # Check if label dominates other_label
    if label.cost > other_label.cost
        return false
    elseif label.time > other_label.time
        return false
    elseif label.load > other_label.load
        return false
    else
        for i in pg.critical_nodes
            if label.flag[i] > other_label.flag[i]
                return false
            end
        end
    end
    return true
end

function update_flag!(label::Label, pg::ESPPRC_Instance; direction="backward")
    if direction=="forward"
        v_j = label.path[end]
        label.flag[v_j] = 1
        for v_k in successors(v_j, pg)
            if label.flag[v_k] == 0
                is_reachable, _, _ = forward_reach(label, v_j, v_k, pg)
                if !is_reachable
                    label.flag[v_k] = 1
                end
            end
        end
    elseif direction=="backward"
        v_j = label.path[end]
        label.flag[v_j] = 1
        for v_k in predecessors(v_j, pg)
            if label.flag[v_k] == 0
                is_reachable, _, _ = backward_reach(label, v_j, v_k, pg)
                if !is_reachable
                    label.flag[v_k] = 1
                end
            end
        end
    elseif direction=="join"
        # do nothing
    end
end

function EFF!(Λ::Vector{Vector{Label}}, label::Label, v_j::Int, pg::ESPPRC_Instance)
    is_updated = false
    n_nodes = length(pg.service_time)

    # Delete existing lables, if dominated by new candidate `label`.
    n = 1
    while n <= length(Λ[v_j])
        other_label = Λ[v_j][n]
        if dominate(label, other_label, pg) && !is_identical(label, other_label)
            deleteat!(Λ[v_j], n)
        else
            n += 1
        end
    end

    # add the new candidate `label` to the label set, if not dominated.
    is_non_dominated = true
    for n in 1:length(Λ[v_j])
        other_label = Λ[v_j][n]
        if dominate(other_label, label, pg) || is_identical(label, other_label)
            is_non_dominated = false
            break
        end
    end
    if is_non_dominated
        push!(Λ[v_j], label)
        is_updated = true
    end

    return is_updated
end

function predecessors(v_i::Int, pg::ESPPRC_Instance)
    return pg.reverse_star[v_i]
end

function successors(v_i::Int, pg::ESPPRC_Instance)
    return pg.forward_star[v_i]
end

function forward_extend(λ_i::Label, v_i::Int, v_j::Int, pg::ESPPRC_Instance)
    is_reachable, new_time, new_load = forward_reach(λ_i, v_i, v_j, pg)

    if !is_reachable
        # λ_i.flag[v_j] = 1
        return nothing
    end
    new_cost = λ_i.cost + pg.cost[v_i, v_j]
    new_path = copy(λ_i.path)
    push!(new_path, v_j)

    global counter += 1
    label = Label(new_time, new_load, copy(λ_i.flag), new_cost, new_path)
    update_flag!(label, pg, direction="forward")

    return label
end

function backward_extend(λ_i::Label, v_i::Int, v_k::Int, pg::ESPPRC_Instance)
    # Currently at v_i
    # extending arc: (v_k, v_i)

    is_reachable, new_time, new_load = backward_reach(λ_i, v_i, v_k, pg)

    if !is_reachable
        # λ_i.flag[v_k] = 1
        return nothing
    end
    new_cost = pg.cost[v_k, v_i] + λ_i.cost
    new_path = copy(λ_i.path)
    push!(new_path, v_k)

    global counter += 1
    label = Label(new_time, new_load, copy(λ_i.flag), new_cost, new_path)
    update_flag!(label, pg, direction="backward")

    return label
end

function prepare_return_values!(labels::Vector{Label}, max_neg_routes::Int)
    if isempty(labels)
        return Label(0, 0, [], Inf, []), []
    else
        best_label = find_best_label!(labels)
        idx = findfirst(x -> x.cost >= 0.0, labels)
        if  idx == 1
            neg_cost_routes = []
        elseif isnothing(idx)
            neg_cost_routes = labels
        else
            idx = min(idx-1, max_neg_routes)
            neg_cost_routes = labels[1:idx]
        end
        return best_label, neg_cost_routes
    end
end

function join_labels!(final_labels::Vector{Label}, λ_i::Label, λ_j::Label, pg::ESPPRC_Instance)
    v_i = λ_i.path[end] # forward label
    v_j = λ_j.path[end] # backward label (the path is also stored reversed.)

    # Check no cycle
    new_flag = λ_i.flag .+ λ_j.flag
    # for i in pg.critical_nodes
    #     if new_flag[i] > 1
    #         return Inf
    #     end
    # end
    if !isempty(intersect(λ_i.path, λ_j.path, pg.critical_nodes))
        return Inf
    end

    # Check capacity
    new_load = λ_i.load + pg.load[v_i, v_j] + λ_j.load
    if new_load > pg.capacity
        return Inf
    end
    # Check time
    time_check = λ_i.time + pg.service_time[v_i] + pg.time[v_i, v_j] + pg.service_time[v_j] + λ_j.time
    if time_check > pg.max_T
        return Inf
    end

    new_path = copy(λ_i.path)
    append!(new_path, reverse(λ_j.path))
    new_cost = λ_i.cost + pg.cost[v_i, v_j] + λ_j.cost
    new_time = calculate_path_time(new_path, pg, check_feasible=true)

    new_label = Label(new_time, new_load, new_flag, new_cost, new_path)
    update_flag!(new_label, pg, direction="join")
    push!(final_labels, new_label)

    return new_cost
end

function select_node!(set_E::Vector{Int}, pg::ESPPRC_Instance)
    if isempty(set_E)
        @error("The candidate set is empty.")
    else
        return set_E[1]
    end
end

function forward_search!(v_i::Int, Λ_fw::Vector{Vector{Label}}, set_E::Vector{Int}, neg_cost_routes::Vector{Label}, pg::ESPPRC_Instance)
    max_T = pg.max_T :: Float64
    # Forward Extension
    for λ_i in Λ_fw[v_i]
        if λ_i.time <= 0.5 * max_T
            for v_j in successors(v_i, pg)
                if λ_i.flag[v_j] == 0 || !in(v_j, pg.critical_nodes)
                    label = forward_extend(λ_i, v_i, v_j, pg)
                    if !isnothing(label)
                        is_updated = EFF!(Λ_fw, label, v_j, pg)
                        if is_updated
                            global counter1 += 1
                            push!(set_E, v_j)
                        end
                        if v_j == pg.destination && label.cost < 0.0
                            push!(neg_cost_routes, label)
                        end
                    end
                end
            end
        end
    end
end

function backward_search!(v_i::Int, Λ_bw::Vector{Vector{Label}}, set_E::Vector{Int}, pg::ESPPRC_Instance)
    max_T = pg.max_T :: Float64
    for λ_i in Λ_bw[v_i]
        if λ_i.time <= 0.5 * max_T
            for v_k in predecessors(v_i, pg)
                if λ_i.flag[v_k] == 0 || !in(v_k, pg.critical_nodes)
                    label = backward_extend(λ_i, v_i, v_k, pg)
                    if !isnothing(label)
                        is_updated = EFF!(Λ_bw, label, v_k, pg)
                        if is_updated
                            global counter2 += 1
                            push!(set_E, v_k)
                        end
                    end
                end
            end
        end
    end
end

function join_label_sets(Λ_fw::Vector{Vector{Label}}, Λ_bw::Vector{Vector{Label}}, pg::ESPPRC_Instance)
    n_nodes = length(pg.early_time)
    set_N = 1:n_nodes

    # Finding the minimum cost among labels
    min_all_bw = Inf
    min_bw = fill(Inf, n_nodes)
    min_fw = fill(Inf, n_nodes)
    count_fw_labels = 0
    count_bw_labels = 0
    for v_i in set_N
        for λ_i in Λ_fw[v_i]
            min_fw[v_i] = min(min_fw[v_i], λ_i.cost)
            count_fw_labels += 1
        end
        for λ_i in Λ_bw[v_i]
            min_bw[v_i] = min(min_bw[v_i], λ_i.cost)
            min_all_bw = min(min_all_bw, λ_i.cost)
            count_bw_labels += 1
        end
    end
    UB = Inf

    final_labels = Label[]
    # Join between forward and backward paths
    for v_i in set_N
        min_c = minimum([pg.cost[v_i,j] for j in set_N if j!=v_i])
        if min_fw[v_i] + min_c + min_all_bw < UB
            for λ_i in Λ_fw[v_i]
                if λ_i.cost + min_c + min_all_bw < UB
                    for v_j in set_N
                        if λ_i.cost + pg.cost[v_i,v_j] + min_bw[v_j] < UB
                            for λ_j in Λ_bw[v_j]
                                if λ_i.cost + pg.cost[v_i,v_j] + λ_j.cost < UB
                                    new_cost = join_labels!(final_labels,λ_i, λ_j, pg)
                                    UB = min(UB, new_cost)
                                end
                            end
                        end
                    end
                end
            end
        end
    end
    return final_labels, count_fw_labels, count_bw_labels
end

function find_cycle_nodes(path::Vector{Int}, n_nodes::Int)
    visit_count = zeros(Int, n_nodes)
    for i in path
        visit_count[i] += 1
    end
    cycle_nodes = findall(x->x>1, visit_count)
    return cycle_nodes
end

function hascycle(path::Vector{Int})
    visit_count = zeros(Int, maximum(path))
    for i in path
        visit_count[i] += 1
    end
    has_cycle = !isnothing(findfirst(x->x>1, visit_count))
    return has_cycle
end

function remove_labels_with_cycle!(Λ::Vector{Vector{Label}}, pg::ESPPRC_Instance)
    n_nodes = length(pg.service_time)
    for v_j in 1:n_nodes
        n = 1
        while n <= length(Λ[v_j])
            label = Λ[v_j][n]
            if hascycle(label.path)
                deleteat!(Λ[v_j], n)
            else
                n += 1
            end
        end
    end
end

function monodirectional(org_pg::ESPPRC_Instance; max_neg_routes=MAX_INT::Int, DSSR=false)
    # Feillet, D., Dejax, P., Gendreau, M., Gueguen, C., 2004. An exact algorithm for the elementary shortest path problem with resource constraints: Application to some vehicle routing problems. Networks 44, 216–229. https://doi.org/10.1002/net.20033

    pg = deepcopy(org_pg)
    graph_reduction!(pg)
    pg.max_neg_routes = max_neg_routes

    n_nodes = length(pg.early_time)
    set_N = 1:n_nodes
    pg.max_T = Inf
    if DSSR
        pg.critical_nodes = Set(Int[])
    else
        pg.critical_nodes = Set(set_N)
    end

    neg_cost_routes = Label[]

    final_labels = Label[]
    best_label = nothing
    has_cycle = true
    DSSR_iter = 1
    global counter = 0

    # Searchinc
    while has_cycle
        # Initial Label Set
        Λ_fw = Vector{Vector{Label}}(undef, n_nodes)
        for v_i in set_N
            Λ_fw[v_i] = Label[]
        end

        # Label at the origin
        unreachable = zeros(Int, n_nodes)
        init_label = Label(pg.early_time[pg.origin], 0.0, unreachable, 0.0, [pg.origin])
        update_flag!(init_label, pg, direction="forward")
        push!(Λ_fw[pg.origin], init_label)

        # Inititial search nodes
        set_E = [pg.origin]

        while !isempty(set_E)
            # v_i = set_E[1]
            v_i = select_node!(set_E, pg) :: Int
            forward_search!(v_i, Λ_fw, set_E, neg_cost_routes, pg)

            if length(neg_cost_routes) >= max_neg_routes
                break
            end
            setdiff!(set_E, v_i)
        end

        best_label = find_best_label!(Λ_fw[pg.destination])
        cycle_nodes = find_cycle_nodes(best_label.path, n_nodes)
        if isempty(cycle_nodes)
            has_cycle = false
            final_labels = Λ_fw[pg.destination]

            # @show counter, counter1, counter2
            # @show length(final_labels)
            total_labels = 0
            for L in Λ_fw
                total_labels += length(L)
            end
            # @show total_labels
        else
            # @show cycle_nodes
            union!(pg.critical_nodes, cycle_nodes)
            DSSR_iter += 1
        end
    end
    # @show size(final_labels)

    if DSSR
        @show DSSR_iter
    end

    return prepare_return_values!(final_labels, max_neg_routes)

end

function bidirectional(org_pg::ESPPRC_Instance; max_neg_routes=MAX_INT::Int, DSSR=false)
    # Righini, G., Salani, M., 2006. Symmetry helps: Bounded bi-directional dynamic programming for the elementary shortest path problem with resource constraints. Discrete Optimization 3, 255–273. https://doi.org/10.1016/j.disopt.2006.05.007

    pg = deepcopy(org_pg)
    graph_reduction!(pg)

    n_nodes = length(pg.early_time)
    set_N = 1:n_nodes
    pg.max_T = calculate_max_T(pg)
    if DSSR
        pg.critical_nodes = Set(Int[])
    else
        pg.critical_nodes = Set(collect(set_N))
    end

    final_labels = Label[]
    best_label = nothing
    has_cycle = true
    DSSR_iter = 0
    global counter = 0
    global counter1 = 0
    global counter2 = 0

    # Search
    while has_cycle
        # Initial Label Sets
        Λ_fw = Vector{Vector{Label}}(undef, n_nodes)
        Λ_bw = Vector{Vector{Label}}(undef, n_nodes)
        for v_i in set_N
            Λ_fw[v_i] = Label[]
            Λ_bw[v_i] = Label[]
        end

        # Label at the origin
        unreachable = zeros(Int, n_nodes)
        init_label = Label(pg.early_time[pg.origin], 0.0, unreachable, 0.0, [pg.origin])
        update_flag!(init_label, pg, direction="forward")
        push!(Λ_fw[pg.origin], init_label)

        # Label at the destination
        unreachable = zeros(Int, n_nodes)
        term_label = Label(0.0, 0.0, unreachable, 0.0, [pg.destination])
        update_flag!(term_label, pg, direction="backward")
        push!(Λ_bw[pg.destination], term_label)

        # Inititial search nodes
        set_E = [pg.origin, pg.destination]

        forward_cpu_time = 0
        backward_cpu_time = 0
        join_cpu_time = 0

        # Search
        while !isempty(set_E)
            # v_i = set_E[1]
            v_i = select_node!(set_E, pg)
            tmp = time()
            forward_search!(v_i, Λ_fw, set_E, Label[], pg)
            forward_cpu_time += time() - tmp

            tmp = time()
            backward_search!(v_i, Λ_bw, set_E, pg)
            backward_cpu_time += time() - tmp

            setdiff!(set_E, v_i)
        end

        join_cpu_time = time()
        final_labels, count_fw_labels, count_bw_labels = join_label_sets(Λ_fw, Λ_bw, pg)
        join_cpu_time = time() - join_cpu_time
        # @show deci3.([forward_cpu_time, backward_cpu_time, join_cpu_time])

        best_label = find_best_label!(final_labels)
        cycle_nodes = find_cycle_nodes(best_label.path, n_nodes)
        if isempty(cycle_nodes)
            has_cycle = false

            # @show counter, counter1, counter2
            # @show length(final_labels)
            total_labels = 0
            for L in Λ_fw
                total_labels += length(L)
            end
            for L in Λ_bw
                total_labels += length(L)
            end
            # @show total_labels

        else
            union!(pg.critical_nodes, cycle_nodes)
            DSSR_iter += 1
        end
    end

    if DSSR
        @show DSSR_iter
    end

    # @show count_fw_labels, count_bw_labels, size(final_labels)
    return prepare_return_values!(final_labels, max_neg_routes)

end


text:
#### 2. Exercise
## Traversal of linked list. Finding the highest value
## Here you find both recursive and Normal-traversal examples
## Enjoy!

## Recursive function
function traverse_recursive_max(node, start_value)
    highest_value = start_value
    if (node.value > highest_value)
        highest_value = node.value
    end
    if node.next == nothing ## We are at the last node. Return to base!
        return highest_value
    end
    traverse_recursive_max(node.next,highest_value)
end

## Normal traversal function
function traverse_normal_max(node)
    currentNode = node
    highest_value = node.value
    while true
        if currentNode.next != nothing
            currentNode = currentNode.next
        else ## We are at the last node. Return to base!
            return highest_value
        end
        if currentNode.value > highest_value
            highest_value = currentNode.value
        end
    end
end

traversemax(node) = traverse_recursive_max(node,node.value)

function traversemax(node)
    # Timing both functions to check which one is faster
    @time traverse_recursive_max(node,node.value) #<- Winner!
    @time traverse_normal_max(node) #<- Looser...
end

###########################################################
####### Scaffolding for running tests on own machine #####
#########################################################
mutable struct Record
    next::Union{Record,Nothing}  # next kan peke på et Record-objekt eller ha verdien nothing.
    value::Int
end

function create_linked_list(length, value_range)
    # Lager listen bakfra.
    next = nothing
    record = nothing
    for i in 1:length
        record = Record(next, rand(value_range))  # valuerange kan f.eks. være 1:1000.
        next = record
    end
    return record
end

a = create_linked_list(1000,-10000:100000)
########################################################
####### End of Scaffolding ############################
######################################################

#### Testing out the functions with sample data (a)
traversemax(a)


text:
Times = Vector{Float64}

function read_number_of_time_steps(exo_id::ExoID)
    num_steps = ccall((:ex_inquire_int, libexodus), Int64,
                      (Int64, Int64),
                      exo_id, EX_INQ_TIME)
    return num_steps
end

function read_times(exo_id::ExoID)::Times
    num_steps = read_number_of_time_steps(exo_id)
    times = Vector{Float64}(undef, num_steps)
    error = ccall((:ex_get_all_times, libexodus), Int64,
                  (Int64, Ref{Float64}),
                  exo_id, times)
    exodus_error_check(error, "read_times")
    return times
end

function write_time(exo_id::ExoID, time_step::Int64, time_value::Float64)
    error = ccall((:ex_put_time, libexodus), ExodusError,
                  (ExoID, Int64, Ref{Float64}),
                  exo_id, time_step, time_value)
    exodus_error_check(error, "write_time")
end


text:
# Julia implementation of Polarisable Ion Tight Binding
#
# Starting with:
# Universal tight binding model for chemical reactions in solution and at surfaces. II. Water
# A. Y. Lozovoi1, T. J. Sheppard1, D. L. Pashov2, J. J. Kohanoff1, and A. T. Paxton2, a)
# The Journal of Chemical Physics 141, 044504 (2014);
# https://doi.org/10.1063/1.4890343
#
# TODO: Fix all the things.

#module PITB # PolarisableIonTightBinding ; OK, shorter form easier to play with

include("FunctionalForm.jl") # explicit form of pair-potentials
include("Lozovoi.jl") # parameters for 2014 Lozovoi paper; H20, corrected
include("PolynomialApproximation.jl") # usin ApproxFun to speedup evaluation

#end


text:
#Optimization------------------------------------------------
"Optimization output structure"
struct UnmarkedOpt
  coef::Array{Float64}
  vcov::Array{Float64}
  loglik::Float64
end

"Optimize a likelihood function loglik with np parameters"
function optimize_loglik(loglik, np)

  func = TwiceDifferentiable(vars -> loglik(vars), zeros(np);
                             autodiff=:forward)

  opt = optimize(func, zeros(np), LBFGS())
  param = Optim.minimizer(opt)
  hes = NLSolversBase.hessian!(func, param)
  vcov = inv(hes)
  loglik = -Optim.minimum(opt)
  UnmarkedOpt(param, vcov, loglik)
end

#Model structures--------------------------------------------
"Fitted model output type"
abstract type UnmarkedModel <: RegressionModel end

"List of fitted Unmarked models"
struct UnmarkedModels
  models::Array{UnmarkedModel}
end

#Methods for UnmarkedModels
function Base.getindex(um::UnmarkedModels, i::Int)
  return um.models[i]
end

function length(m::UnmarkedModels) length(m.models) end

"Submodel output structure"
struct UnmarkedSubmodel <: RegressionModel
  name::Symbol
  formula::FormulaTerm
  link::Link
  coef::Array
  vcov::Array
  coefnames::Array{String}
  data::DataFrame
end

function UnmarkedSubmodel(ud::UmDesign, opt::UnmarkedOpt)
  UnmarkedSubmodel(ud.name, ud.formula, ud.link, opt.coef[ud.idx],
                   opt.vcov[ud.idx,ud.idx], ud.coefnames, ud.data)
end

#Submodel extractors-----------------------------------------------
"Get detection model"
function detection(fit::UnmarkedModel)
  fit.submodels.det
end

"Get occupancy model"
function occupancy(fit::UnmarkedModel)
  fit.submodels.occ
end

"Get abundance model"
function abundance(fit::UnmarkedModel)
  fit.submodels.abun
end

#Get short model name-------------------------------------------------

function short_name(fit::Unmarked.UnmarkedSubmodel)
  out = string(string(fit.formula.lhs),"(",string(fit.formula.rhs),")")
  out = replace(out, " " => "")
  return replace(out, "1" => ".")
end

function short_name(fit::Unmarked.UnmarkedModel)
  join(map(x -> short_name(x), fit.submodels))
end

#Re-create design matrices from fitted models-------------------------

"Outer constructor that re-creates design matrices from fitted model"
function UmDesign(um::UnmarkedSubmodel)
  UmDesign(um.name, um.formula, um.link, um.data)
end

"Outer constructor that re-creates design matrices with newdata"
function UmDesign(um::UnmarkedSubmodel, newdata::DataFrame)
  UmDesign(um.name, um.formula, um.link, newdata)
end

#Show methods---------------------------------------------------------
function Base.show(io::IO, um::UnmarkedSubmodel)
  println()
  println(string(um.name, ": ", um.formula))
  print(coeftable(um))
end

function Base.show(io::IO, fit::UnmarkedModel)

  println()
  for i = 1:length(fit.submodels)
    println(string(fit.submodels[i].name, ": ", fit.submodels[i].formula))
    println(coeftable(fit.submodels[i]))
    println()
  end
  print("AIC: ", round(aic(fit), digits=4))

end

function Base.show(io::IO, um::UnmarkedModels)
  r = sortperm(aic.(um.models))
  a = round.(map(x->aic(x),um.models)[r], digits=2)
  da = round.(a .- minimum(a), digits=2)
  wt = exp.(-1 .* da ./ 2)
  wt = round.(wt ./ sum(wt), digits=2)
  tab = [r map(x->short_name(x),um.models)[r] a da wt]
  pretty_table(tab, ["No.", "Model", "AIC", "Δ AIC", "Weight"],
               alignment=[:l,:l,:r,:r,:r],
               formatters=ft_printf("%.2f",[3,4,5]))
end

#Misc. methods reguired for RegressionModel interface-----------------

#Coeftable
function coeftable(um::UnmarkedSubmodel; level::Real=0.95)

  c = coef(um)
  se = stderror(um)
  z = abs.(c ./ se)
  pval = map(x -> 2*ccdf(Normal(0,1), x), z)
  ci = se*quantile(Normal(), (1-level)/2)
  levstr = level*100
  levstr = isinteger(levstr) ? string(Integer(levstr)) : string(levstr)
  CoefTable(map(x->round.(x,digits=4), [c, se, z, pval, c+ci, c-ci]),
            ["Estimate", "SE", "z", "Pr(>|z|)",
             "Low $levstr%","Up $levstr%"],
            coefnames(um), 4, 3)
end

#Return coefficient values
function coef(x::UnmarkedModel)
  return vcat(map(x -> coef(x), x.submodels)...)
end

function coef(x::UnmarkedSubmodel)
  return x.coef
end

#Return names of coefficients
function coefnames(x::UnmarkedModel)
  return vcat(map(x -> coefnames(x), x.submodels)...)
end

function coefnames(x::UnmarkedSubmodel)
  return x.coefnames
end

#Variance-covariance matrix
function vcov(x::UnmarkedModel)
  return x.opt.vcov
end

function vcov(x::UnmarkedSubmodel)
  return x.vcov
end

#Standard error
function stderror(x::UnmarkedModel)
  v = vcov(x)
  return sqrt.(diag(v))
end

function stderror(x::UnmarkedSubmodel)
  sqrt.(diag(x.vcov))
end

#Log-likelihood
function loglikelihood(x::UnmarkedModel)
  return x.opt.loglik
end

#Deviance
function deviance(x::UnmarkedModel)
  return -2 * loglikelihood(x)
end

#Degrees of freedom
function dof(x::UnmarkedModel)
  return length(coef(x))
end

#Number of observations = number of independent sites
function nobs(x::UnmarkedModel)
  return size(x.data.y)[1]
end

#Model matrix
function modelmatrix(x::UnmarkedSubmodel)
  UmDesign(x).mat
end

max_stars_repo_name: kenkellner/julia-hme

max_issues_repo_name: kenkellner/julia-hme

max_forks_repo_name: kenkellner/julia-hme


text:
push!(LOAD_PATH,"../source/0.6/src/")

# include package
info("Include all...")
try
  include("../source/0.6/src/App.jl")
  include("../source/0.6/src/ThreadManager.jl")
catch e # do not exit this run!
  warn(e)
end
info("Include done.")

info("Create Docs...")
using Documenter, App

makedocs(
  build     = joinpath(@__DIR__, "../build/docs"),
  modules   = [
    CoreExtended,
    TimeManager,
    LoggerManager,
    RessourceManager,
    FileManager,
    Environment,
    JLScriptManager,
    WindowManager,
    MatrixMath,
    JLGEngine,
    App,
    ThreadManager
  ],
  clean     = true,
  doctest   = true, # :fix
  #linkcheck = true,
  strict    = false,
  checkdocs = :none,
  format    = :html, #:latex
  sitename  = "JGE",
  authors   = "Gilga",
  #analytics = "UA-89508993-1",
  #html_prettyurls = true,
  #html_canonical = "https://gilga.github.io/JGE/",

  pages = Any[ # Compat: `Any` for 0.4 compat
      "Home" => "index.md",
      "Manual" => Any[
          "manual/start.md",
      ],
      "Source Files" => Any[
          "files/App.md",
          "files/CoreExtended.md",
          "files/Environment.md",
          "files/FileManager.md",
          "files/JLScriptManager.md",
          "files/LoggerManager.md",
          "files/MatrixMath.md",
          "files/RessourceManager.md",
          "files/ThreadFunctions.md",
          "files/ThreadManager.md",
          "files/TimeManager.md",
          "files/WindowManager.md",
          "files/JLGEngine.md",
          "files/JLGEngine/CameraManager.md",
          "files/JLGEngine/ChunkManager.md",
          "files/JLGEngine/EntityManager.md",
          "files/JLGEngine/GameObjectManager.md",
          "files/JLGEngine/GraphicsManager.md",
          "files/JLGEngine/Management.md",
          "files/JLGEngine/MeshManager.md",
          "files/JLGEngine/ModelManager.md",
          "files/JLGEngine/RenderManager.md",
          "files/JLGEngine/ShaderManager.md",
          "files/JLGEngine/StorageManager.md",
          "files/JLGEngine/SzeneManager.md",
          "files/JLGEngine/TextureManager.md",
          "files/JLGEngine/TransformManager.md",
          "files/JLGEngine/ModelManager/MeshData.md",
          "files/JLGEngine/ModelManager/MeshFabric.md",
          "files/JLGEngine/ModelManager/MeshLoader_OBJ.md",
          "files/JLGEngine/LibGL/LibGL.md",
          "files/JLGEngine/LibGL/GLDebugControl.md",
          "files/JLGEngine/LibGL/GLExtendedFunctions.md",
          "files/JLGEngine/LibGL/GLLists.md",
          "files/JLGEngine/LibGL/GLSLParser.md",
          "files/JLGEngine/LibGL/GLSLRessources.md",
          "files/JLGEngine/LibGL/ShaderManager.md",
          "files/JLGEngine/LibGL/StorageManager.md",
          "files/JLGEngine/LibGL/TextureManager.md",
      ],
  ],
)

deploydocs(
  deps   = Deps.pip("mkdocs", "python-markdown-math"), #, "curl"
  repo = "https://github.com/Gilga/JGE.git",
  branch = "gh-pages",
  julia  = "0.6.2",
)

info("Docs done.")

max_stars_repo_name: Gilga/JGE

max_issues_repo_name: Gilga/JGE

max_forks_repo_name: Gilga/JGE